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
kvm: support multiple local storage pools #6147
kvm: support multiple local storage pools #6147
Conversation
@blueorangutan package |
@weizhouapache a 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. |
String[] localStorageRelativePaths = _localStoragePath.split(CONFIG_VALUES_SEPARATOR); | ||
String[] localStorageUUIDs = _localStorageUUID.split(CONFIG_VALUES_SEPARATOR, -1); | ||
if (localStorageRelativePaths.length != localStorageUUIDs.length) { | ||
throw new ConfigurationException("The path and UUID of local storage pools have different length"); |
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.
I think that instead of killing the agent we can log the error and continue with at least the default local storage and UUID
...ypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
Outdated
Show resolved
Hide resolved
...ypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
Outdated
Show resolved
Hide resolved
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2945 |
@blueorangutan package |
@weizhouapache a 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: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2948 |
@blueorangutan test |
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-3688)
|
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.
Nice work, @weizhouapache.
CLGTM, I did not test it though.
I suggested only a minor (non-blocking) change in the var names.
...ypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
Outdated
Show resolved
Hide resolved
@blueorangutan package |
@weizhouapache a 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: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2963 |
@blueorangutan test |
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-3706)
|
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 - but needs testing. Pl see if unit tests may be added.
@rohityadavcloud |
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.
LGTM - manually tested on existing KVM environment:
- Enabled zone local storage use
- Edit agent.properties and create local directories on a host, restart agent
- Local storage pools added
- Tested migration of volumes across the pools
Description
This PR fixes #5987
The steps to support multiple storage pools
(1) if zone does not support local storage, go to zone details and edit zone, check "Enable local storage for User VMs"
(2) create local directories on kvm hosts
(3) edit /etc/cloudstack/agent/agent.properties, add extra directories and UUIDs (can be generated by
uuidgen
)local.storage.uuid=a43943c1-1759-4073-9db1-bc0ea19203aa,f5b1220b-4446-42dc-a872-cffd281f9f8c
local.storage.path=/var/lib/libvirt/images,/var/lib/libvirt/images2
(4) restart cloudstack-agent
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?