From 189d648f951456e146d04c879a7df62e1b82cdcd Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Mon, 11 Nov 2024 16:05:59 -0500 Subject: [PATCH] csi: remove redundant namespace field from volume status output (#24432) The `volume status :id` command outputs the namespace for a CSI volume twice. Drop the second output. Ref: https://github.com/hashicorp/nomad/pull/24382#discussion_r1837097250 --- .changelog/24432.txt | 3 +++ command/volume_status_csi.go | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .changelog/24432.txt diff --git a/.changelog/24432.txt b/.changelog/24432.txt new file mode 100644 index 00000000000..f4fcf787bbf --- /dev/null +++ b/.changelog/24432.txt @@ -0,0 +1,3 @@ +```release-note:bug +csi: Removed redundant namespace output from volume status command +``` diff --git a/command/volume_status_csi.go b/command/volume_status_csi.go index 85d302743c2..31fdeeb2331 100644 --- a/command/volume_status_csi.go +++ b/command/volume_status_csi.go @@ -205,11 +205,9 @@ func (c *VolumeStatusCommand) formatBasic(vol *api.CSIVolume) (string, error) { fmt.Sprintf("Controllers Expected|%d", vol.ControllersExpected), fmt.Sprintf("Nodes Healthy|%d", vol.NodesHealthy), fmt.Sprintf("Nodes Expected|%d", vol.NodesExpected), - fmt.Sprintf("Access Mode|%s", vol.AccessMode), fmt.Sprintf("Attachment Mode|%s", vol.AttachmentMode), fmt.Sprintf("Mount Options|%s", csiVolMountOption(vol.MountOptions, nil)), - fmt.Sprintf("Namespace|%s", vol.Namespace), } // Exit early