Navigation Menu

Skip to content
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

Merged
merged 5 commits into from Mar 25, 2022

Conversation

weizhouapache
Copy link
Member

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

  • 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)

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?

@weizhouapache
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@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");
Copy link
Contributor

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

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2945

@weizhouapache
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@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.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2948

@nvazquez
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-3688)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 31666 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6147-t3688-kvm-centos7.zip
Smoke tests completed. 92 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@weizhouapache weizhouapache marked this pull request as ready for review March 22, 2022 11:04
Copy link
Contributor

@GutoVeronezi GutoVeronezi left a 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.

@weizhouapache
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@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.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2963

@weizhouapache
Copy link
Member Author

@blueorangutan test

@blueorangutan
Copy link

@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-3706)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 32120 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6147-t3706-kvm-centos7.zip
Smoke tests completed. 92 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

Copy link
Member

@rohityadavcloud rohityadavcloud left a 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.

@weizhouapache
Copy link
Member Author

Code LGTM - but needs testing. Pl see if unit tests may be added.

@rohityadavcloud
good point. I have just added unit tests as per your comment.

Copy link
Contributor

@nvazquez nvazquez left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[KVM] Enable CloudStack to use multiple LOCAL storage pools
5 participants