Skip to content

Commit c86c49c

Browse files
authored
Merge pull request #2251 from motiejus/release-1.23-blkid
[btrfs csi driver] fix blkid argument
2 parents 75dba5b + 17897ac commit c86c49c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/gce-pd-csi-driver/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ func (ns *GCENodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStage
538538

539539
// Part 6: if configured, write sysfs values
540540
if len(btrfsSysfs) > 0 {
541-
args := []string{"--match-tag", "UUID", "--output", "value", stagingTargetPath}
541+
args := []string{"--match-tag", "UUID", "--output", "value", devicePath}
542542
cmd := ns.Mounter.Exec.Command("blkid", args...)
543543
var stderr bytes.Buffer
544544
cmd.SetStderr(&stderr)

pkg/gce-pd-csi-driver/node_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ func TestNodeStageVolume(t *testing.T) {
958958
},
959959
{
960960
cmd: "blkid",
961-
args: fmt.Sprintf("--match-tag UUID --output value %v", stagingPath),
961+
args: fmt.Sprintf("--match-tag UUID --output value /dev/disk/fake-path"),
962962
stdout: btrfsUUID + "\n",
963963
},
964964
},
@@ -1027,7 +1027,7 @@ func TestNodeStageVolume(t *testing.T) {
10271027
},
10281028
{
10291029
cmd: "blkid",
1030-
args: fmt.Sprintf("--match-tag UUID --output value %v", stagingPath),
1030+
args: fmt.Sprintf("--match-tag UUID --output value /dev/disk/fake-path"),
10311031
stdout: btrfsUUID + "\n",
10321032
},
10331033
},

0 commit comments

Comments
 (0)