Skip to content

nasbackup: fix agent.log is cleaned when backup stopped vm#13641

Open
weizhouapache wants to merge 1 commit into
apache:mainfrom
weizhouapache:4.23-fix-nasbackup-clean-agent-log
Open

nasbackup: fix agent.log is cleaned when backup stopped vm#13641
weizhouapache wants to merge 1 commit into
apache:mainfrom
weizhouapache:4.23-fix-nasbackup-clean-agent-log

Conversation

@weizhouapache

Copy link
Copy Markdown
Member

Description

This PR fixes the issue that when backing up a stopped vm, agent.log is cleaned up and all previous logs disappear.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Copilot AI review requested due to automatic review settings July 17, 2026 09:44
@weizhouapache weizhouapache added this to the 4.23.0 milestone Jul 17, 2026

Copilot AI left a comment

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.

Pull request overview

This PR fixes unintended truncation of the KVM agent log during NAS backups of stopped VMs by changing the qemu-img convert logging redirection to append rather than overwrite /var/log/cloudstack/agent/agent.log.

Changes:

  • Append qemu-img convert stdout to the agent log (>>) in the stopped-VM backup path to prevent log loss.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 19.64%. Comparing base (75748a5) to head (94b3675).

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13641      +/-   ##
============================================
- Coverage     19.65%   19.64%   -0.01%     
  Complexity    19792    19792              
============================================
  Files          6368     6368              
  Lines        575107   575107              
  Branches      70370    70370              
============================================
- Hits         113016   113008       -8     
- Misses       449808   449813       +5     
- Partials      12283    12286       +3     
Flag Coverage Δ
uitests 3.41% <ø> (ø)
unittests 20.92% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18603

@winterhazel winterhazel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good (did not test).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants