-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix the stored system VMs paths when introducing the first secondary storage of a new zone #11605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.20
Are you sure you want to change the base?
Fix the stored system VMs paths when introducing the first secondary storage of a new zone #11605
Conversation
|
@blueorangutan package |
|
@bernardodemarco a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11605 +/- ##
=========================================
Coverage 16.17% 16.17%
- Complexity 13294 13296 +2
=========================================
Files 5656 5656
Lines 498082 498101 +19
Branches 60415 60424 +9
=========================================
+ Hits 80569 80583 +14
+ Misses 408551 408549 -2
- Partials 8962 8969 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14938 |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 14957 |
weizhouapache
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
not tested yet
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
|
@blueorangutan package |
|
@rosi-shapeblue a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15457 |
Description
When a new zone is added to an environment, ACS replicates the metadata of system VMs templates (stored in the
cloud.template_store_reftable) to the secondary storage of the new zone. However, the install path of the templates are stored astemplate/tmpl/1/<template-id>, in which1represents the ID of the system's account. Thus, ACS does not consider the possibility that a cloud operator could have manually registered the template.So, if an operator with account with ID
2, for example, registers a system VM template with ID200, the template's install path will be stored as/template/tmpl/1/200and not as/template/tmpl/2/200. Additionally, if one system VM template is manually copied from one secondary storage to another, when deploying the system VMs of the new zones, the operation will fail, because the inexistent path (/template/tmpl/1/200) will be accessed in the storage.Therefore, changes have been made to consider the accounts that registered system VM templates when replicating the templates install paths in the DB. With that, in the previous example, the template's install path will be stored as
template/tmpl/2/200and the deployment of system VMs will not fail.Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Before applying the PR's changes, I performed the following actions:
SYSTEM/mnt/sec-nfs-01/template/tmpl/2/204/mnt/sec-nfs-01/template/tmpl/2/204/*were replicated to/mnt/sec-nfs-02/template/tmpl/2/204/*WARN [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-15:ctx-4b83a953 job-66/job-101 ctx-e16507fd) (logid:19ac32a3) Unable to contact resource. com.cloud.exception.StorageUnavailableException: Resource [StoragePool:2] is unreachable: Unable to create volume [{"name":"ROOT-15","uuid":"d243b010-2068-487b-a4a3-a85e153f1c17"}] due to [com.cloud.utils.exception.CloudRuntimeException: org.libvirt.LibvirtException: internal error: Child process (/usr/bin/mount -o nodev,nosuid,noexec 192.168.100.230:/mnt/sec-nfs-02/template/tmpl/1/204 /mnt/eb24a377-ec10-3cfe-aa7c-91ecd46d8b9f) unexpected exit status 32: Created symlink /run/systemd/system/remote-fs.target.wants/rpc-statd.service → /usr/lib/systemd/system/rpc-statd.service. mount.nfs: mounting 192.168.100.230:/mnt/sec-nfs-02/template/tmpl/1/204 failed, reason given by server: No such file or directoryAfter applying the PR's changes, I verified that: