Repository navigation
Conversation
Patching the secondary storage VM extracts cloud-scripts.tgz as root, which also carries /var/www/html/userdata. The folder then belongs to root and new download links (volumes, templates, ISOs) fail with "mkdir: cannot create directory ... Permission denied" until the SSVM is rebooted. Give /var/www back to www-data after the extract, the same as the boot setup does. Fixes apache#14726
Collaborator
Author
|
@blueorangutan package |
|
@RosiKyu 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. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the SSVM web-root ownership fix.
No open issues 🎉
What changed in this PR
Fixes download-link creation after patching a secondary storage VM (SSVM), addressing #14726 without requiring a reboot.
Changes:
- Restores
www-data:www-dataownership recursively under/var/wwwimmediately after extracting the patch archive, matching boot-time setup. - Limits the ownership correction to SSVMs, leaving console proxy and router patching unchanged.
| File | Description |
|---|---|
systemvm/patch-sysvms.sh |
Restores SSVM web-root ownership after archive extraction so new download directories remain writable. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14727 +/- ##
======================================
Coverage 3.86% 3.86%
======================================
Files 494 494
Lines 42888 42888
Branches 8141 8141
======================================
Hits 1657 1657
Misses 40999 40999
Partials 232 232
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
After
patchSystemVmon the secondary storage VM, creating a new download link (volume, template, ISO) fails with "mkdir: cannot create directory '/var/www/html/userdata/{id}/': Permission denied" until the SSVM is rebooted.The patch extracts
cloud-scripts.tgzas root, and the archive also carries/var/www/html/userdata, so the folder ends up owned by root. The SSVM creates the download folders there aswww-data. On boot,setup_apache2runschown www-data:www-data -R /var/www, which is why a reboot fixes it.This PR does the same
chowninpatch-sysvms.shright after the extract, for the secondary storage VM only.Fixes #14726
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
KVM lab on a main nightly (one SSVM, NFS secondary storage). The changed
patch-sysvms.shwas put on the KVM host that runs the SSVM, in place of the packaged one./var/www,/var/www/htmland/var/www/html/userdataare owned bywww-dataafter the patch.How did you try to break this feature and the system with this change?