Damans227 commented on code in PR #13538:
URL: https://github.com/apache/cloudstack/pull/13538#discussion_r3624895465


##########
scripts/vm/hypervisor/kvm/nasbackup.sh:
##########
@@ -117,6 +134,12 @@ backup_running_vm() {
   while read -r disk fullpath; do
     if [[ "$fullpath" == /dev/drbd/by-res/* ]]; then
         volUuid=$(get_linstor_uuid_from_path "$fullpath")
+    elif [[ "$fullpath" == /dev/drbd[0-9]* ]]; then
+        if ! volUuid=$(get_linstor_uuid_from_device "$fullpath"); then

Review Comment:
   Nit: this `if ! volUuid=$(get_linstor_uuid_from_device ...); then echo ...; 
cleanup; exit 1; fi` block is repeated identically 3 times in this file (here, 
and again around the other two callers). Might be worth factoring into a small 
helper given the existing 
`get_linstor_uuid_from_device`/`get_linstor_uuid_from_path` pattern.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to