Skip to content
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9755ba5
Merge pull request #1 from apache/main
daviftorres Oct 21, 2025
e476a68
Merge branch 'apache:main' into main
daviftorres Nov 4, 2025
de4adaa
Merge branch 'apache:main' into main
daviftorres Nov 18, 2025
efafe00
Merge branch 'apache:main' into main
daviftorres Mar 6, 2026
6e9af51
Merge branch 'apache:main' into main
daviftorres Mar 26, 2026
b6b5bfd
Merge branch 'apache:main' into main
daviftorres Mar 31, 2026
4684396
Merge branch 'apache:main' into main
daviftorres Mar 31, 2026
c3e1471
Merge branch 'apache:main' into main
daviftorres Jun 15, 2026
4928151
Suppress errors in disk usage calculation
daviftorres Jun 15, 2026
0efaf6d
Merge branch 'main' into nas-backup-failed
daviftorres Jun 16, 2026
6e832f1
Update nasbackup.sh
daviftorres Jun 17, 2026
1c0287d
Implement timeout for unmounting in nasbackup.sh
daviftorres Jun 17, 2026
9217905
Merge branch 'main' into nas-backup-failed
daviftorres Jun 17, 2026
edc80b1
Change echo to echo -n for backup size output
daviftorres Jun 17, 2026
9ebd2d3
Merge branch 'main' into nas-backup-failed
daviftorres Jun 18, 2026
3ed133c
Merge branch 'main' into nas-backup-failed
daviftorres Jun 22, 2026
553e419
Merge branch 'main' into nas-backup-failed
daviftorres Jun 23, 2026
3450fa8
Add timeout variable and log output redirection
daviftorres Jun 24, 2026
291a8b8
Update nasbackup.sh
daviftorres Jun 24, 2026
dd2ea71
Merge branch 'main' into nas-backup-failed
daviftorres Jun 24, 2026
e1aea1b
Fix output redirection in nasbackup.sh
daviftorres Jun 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions scripts/vm/hypervisor/kvm/nasbackup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ BACKUP_DIR=""
DISK_PATHS=""
QUIESCE=""
logFile="/var/log/cloudstack/agent/agent.log"

TIMEOUT=60

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TIMEOUT=60
UNMOUNT_TIMEOUT=60

EXIT_CLEANUP_FAILED=20

log() {
Expand Down Expand Up @@ -196,10 +196,12 @@ backup_running_vm() {

# Print statistics
virsh -c qemu:///system domjobinfo $VM --completed
du -sb $dest | cut -f1

umount $mount_point
rmdir $mount_point
backup_size=$(du -sb "$dest" 2>>$logFile | cut -f1) || backup_size=0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
backup_size=$(du -sb "$dest" 2>>$logFile | cut -f1) || backup_size=0
backup_size=$(du -sb "$dest" 2>>$logFile | cut -f1) || { log -ne "WARNING: du failed for $dest, reporting size
as 0"; backup_size=0; }


timeout $TIMEOUT umount "$mount_point" 2>>$logFile || true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
timeout $TIMEOUT umount "$mount_point" 2>>$logFile || true
timeout $UNMOUNT_TIMEOUT umount "$mount_point" 2>>$logFile || { log "WARNING: umount of $mount_point failed or timed out"; true; }

rmdir "$mount_point" 2>>$logFile || true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rmdir "$mount_point" 2>>$logFile || true
rmdir "$mount_point" 2>>$logFile || { log "WARNING: rmdir of $mount_point failed"; true; }


echo "$backup_size"
}

backup_stopped_vm() {
Expand Down
Loading