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


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtTakeBackupCommandWrapper.java:
##########
@@ -34,14 +34,25 @@
 import org.apache.cloudstack.backup.TakeBackupCommand;
 import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
 
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.FileOutputStream;

Review Comment:
   Nit: `java.io.FileOutputStream` import placed after 
`java.io.OutputStreamWriter`, breaks alphabetical order within the `java.io` 
group.



##########
scripts/vm/hypervisor/kvm/nasbackup.sh:
##########
@@ -87,6 +91,75 @@ sanity_checks() {
   log -ne "Environment Sanity Checks successfully passed"
 }
 
+encrypt_backup() {
+  local backup_dir="$1"
+  if [[ -z "$ENCRYPT_PASSFILE" ]]; then
+    return
+  fi
+  if [[ ! -f "$ENCRYPT_PASSFILE" ]]; then
+    echo "Encryption passphrase file not found: $ENCRYPT_PASSFILE"
+    return 1
+  fi
+  log -ne "Encrypting backup files with LUKS"
+  # Preserve compression if it was requested upstream — otherwise the
+  # encrypt-step re-convert produces an uncompressed (but encrypted) qcow2,
+  # silently discarding the compression work done earlier (Copilot review).

Review Comment:
   Nit: this comment (and the similar one in `verify_backup` below) references 
"(Copilot review)" inline, looks like an artifact of an AI-assisted review that 
shouldn't ship in the comment text.



-- 
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