You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaced base_snapshot_name with base_snapshot_id in the
GetMetadataRequest Kubernetes SnapshotMetadata API.
The iterator package now accepts both the previous snapshot name or
CSI handle with preference given to the handle.
usageFmt=`This command displays metadata on the content of a VolumeSnapshot object.
50
54
If a previous VolumeSnapshot object is also specified then the metadata
51
55
describes the content changes between the two snapshots, which must both
52
-
be from the same PersistentVolume.
56
+
be from the same PersistentVolume. The previous VolumeSnapshot object can
57
+
be specified either by name or by its CSI snapshot handle, obtained from
58
+
the Status.SnapshotHandle field of its associated VolumeSnapshotContent
59
+
object. The CSI handle takes precedence over the name, in case both are
60
+
specified.
53
61
54
62
The command is usually invoked in a Pod in the cluster, as the gRPC client
55
63
needs to resolve the DNS address in the SnapshotMetadataService CR.
@@ -75,6 +83,7 @@ func parseFlags() {
75
83
76
84
stringFlag(&args.Namespace, "namespace", "n", "", "The Namespace containing the VolumeSnapshot objects.")
77
85
stringFlag(&args.SnapshotName, "snapshot", "s", "", "The name of the VolumeSnapshot for which metadata is to be displayed.")
86
+
stringFlag(&args.PrevSnapshotID, "previous-snapshot-id", "P", "", "The CSI handle of an earlier VolumeSnapshot against which changed block metadata is to be displayed.")
78
87
stringFlag(&args.PrevSnapshotName, "previous-snapshot", "p", "", "The name of an earlier VolumeSnapshot against which changed block metadata is to be displayed.")
79
88
stringFlag(&outputFormat, "output-format", "o", "table", "The format of the output. Possible values: \"table\" or \"json\".")
usageFmt=`This command verifies allocated blocks of a VolumeSnapshot object.
50
55
If a previous VolumeSnapshot object is also specified then changed blocks between
51
56
the two snapshots, which must both be from the same PersistentVolume, are verified.
57
+
The previous VolumeSnapshot object can be specified either by name or by its CSI
58
+
snapshot handle, obtained from the Status.SnapshotHandle field of its associated
59
+
VolumeSnapshotContent object. The CSI handle takes precedence over the name, in
60
+
case both are specified.
52
61
53
62
The command is usually invoked in a Pod in the cluster, as the gRPC client
54
63
needs to resolve the DNS address in the SnapshotMetadataService CR.
@@ -73,10 +82,11 @@ func parseFlags() {
73
82
}
74
83
75
84
stringFlag(&args.Namespace, "namespace", "n", "", "The Namespace containing the VolumeSnapshot objects.")
76
-
stringFlag(&args.SnapshotName, "snapshot", "s", "", "The name of the VolumeSnapshot for which metadata is to be displayed.")
77
-
stringFlag(&args.PrevSnapshotName, "previous-snapshot", "p", "", "The name of an earlier VolumeSnapshot against which changed block metadata is to be displayed.")
85
+
stringFlag(&args.SnapshotName, "snapshot", "s", "", "The name of the VolumeSnapshot for which metadata is to be verified.")
86
+
stringFlag(&args.PrevSnapshotID, "previous-snapshot-id", "P", "", "The CSI handle of an earlier VolumeSnapshot against which changed block metadata is to be verified.")
87
+
stringFlag(&args.PrevSnapshotName, "previous-snapshot", "p", "", "The name of an earlier VolumeSnapshot against which changed block metadata is to be verified.")
78
88
stringFlag(&sourceDevicePath, "source-device-path", "src", "", "Path of the source device. This device should be the PVC in block mode restored from the snapshot which is passed as the '-snapshot' flag.")
79
-
stringFlag(&targetDevicePath, "target-device-path", "tgt", "", "Path of the target device. This device should be a PVC in block mode restored from the snapshot which is passed as the '-previous-snapshot' flag or a fresh PVC in block mode in case the flag is not passed.")
89
+
stringFlag(&targetDevicePath, "target-device-path", "tgt", "", "Path of the target device. This device should be a PVC in block mode restored from the snapshot which is passed as the '-previous-snapshot' or '-previous-snapshot-id' flags, or a fresh PVC in block mode in case the flags are not passed.")
80
90
81
91
ifhome:=homedir.HomeDir(); home!="" {
82
92
flag.StringVar(&kubeConfig, "kubeconfig", filepath.Join(home, ".kube", "config"), "Path to the kubeconfig file.")
0 commit comments