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
|
@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. |
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% 20.80% +16.94%
- Complexity 0 20920 +20920
============================================
Files 494 6053 +5559
Lines 42888 548451 +505563
Branches 8141 73279 +65138
============================================
+ Hits 1657 114126 +112469
- Misses 40999 420960 +379961
- Partials 232 13365 +13133
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:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 20092 |
|
@blueorangutan test |
|
@RosiKyu a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-17594)
|
|
I tested the PR packages on a KVM lab (one SSVM, NFS secondary storage):
|
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?