Merge pull request #10261 from rook/mergify/bp/release-1.9/pr-10246
osd: exit immediately if pvc block has not changed (backport #10246)
This commit is contained in:
1 file changed
+2
-1
@@ -213,7 +213,8 @@ if [ -b "$PVC_DEST" ]; then
|
||||
PVC_SOURCE_MAJ_MIN=$(stat --format '%%t%%T' $PVC_SOURCE)
|
||||
PVC_DEST_MAJ_MIN=$(stat --format '%%t%%T' $PVC_DEST)
|
||||
if [[ "$PVC_SOURCE_MAJ_MIN" == "$PVC_DEST_MAJ_MIN" ]]; then
|
||||
CP_ARGS+=(--no-clobber)
|
||||
echo "PVC $PVC_DEST already exists and has the same major and minor as $PVC_SOURCE: "$PVC_SOURCE_MAJ_MIN""
|
||||
exit 0
|
||||
else
|
||||
echo "PVC's source major/minor numbers changed"
|
||||
CP_ARGS+=(--remove-destination)
|
||||
|
||||
Reference in new issue
Block a user