Skip to content

Support multiple ceph monitors - #6792

Merged
DaanHoogland merged 15 commits into
apache:mainfrom
weizhouapache:4.18-multiple-ceph-monitors
Oct 21, 2022
Merged

Support multiple ceph monitors#6792
DaanHoogland merged 15 commits into
apache:mainfrom
weizhouapache:4.18-multiple-ceph-monitors

Conversation

@weizhouapache

@weizhouapacheweizhouapache commented Sep 30, 2022

Copy link
Copy Markdown
Member

Description

This PR adds the support for multiple ceph monitors on UI and API.

image

What have been tested and work

What have been tested but do not work (I believe they are not caused by this PR)

  • vm live migration with volume to another RBD primary storage
  • direct download to RBD primary storage
  • VM snapshots on RBD primary storage

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

Screenshots (if appropriate):

How Has This Been Tested?

in agent.log
Executing: qemu-img convert -O qcow2 -U --image-opts driver=raw,file.filename=rbd:cloudstack/c2a23920-9b0f-4e38-b68c-2ca2d040d9c5@79c0cb77-3733-4621-9555-9d8ba6d169b8:mon_host=10.0.32.254,10.0.32.207,10.0.32.208:auth_supported=cephx:id=cloudstack:key=AQDwHTNjjHXRKRAAJb+AToFr6x4a1AvKUc4Ksg==:rbd_default_format=2:client_mount_timeout=30 /mnt/7ceab3e8-1091-3c9e-84f9-2a1e20eb4051/snapshots/2/1490/79c0cb77-3733-4621-9555-9d8ba6d169b8
qemu-img: warning: short-form boolean option '10.0.32.207' deprecatedPlease use 10.0.32.207=on insteadqemu-img: Could not open 'driver=raw,file.filename=rbd:cloudstack/c2a23920-9b0f-4e38-b68c-2ca2d040d9c5@79c0cb77-3733-4621-9555-9d8ba6d169b8:mon_host=10.0.32.254,10.0.32.207,10.0.32.208:auth_supported=cephx:id=cloudstack:key=AQDwHTNjjHXRKRAAJb+AToFr6x4a1AvKUc4Ksg==:rbd_default_format=2:client_mount_timeout=30': Could not open 'rbd:cloudstack/c2a23920-9b0f-4e38-b68c-2ca2d040d9c5@79c0cb77-3733-4621-9555-9d8ba6d169b8:mon_host=10.0.32.254': No such file or directory
volume snapshot fails on RBD storage with the following error
qemu-img: Could not open 'driver=raw,file.filename=rbd:cloudstack/test_wei.img:mon_host=10.0.32.254:auth_supported=cephx:id=cloudstack:key=AQDwHTNjjHXRKRAAJb+AToFr6x4a1AvKUc4Ksg==:rbd_default_format=2:client_mount_timeout=30': Could not open 'rbd:cloudstack/test_wei.img:mon_host=10.0.32.254:auth_supported=cephx:id=cloudstack:key=AQDwHTNjjHXRKRAAJb+AToFr6x4a1AvKUc4Ksg==:rbd_default_format=2:client_mount_timeout=30': No such file or directory
However, it works without using image options
Therefore, do not pass the image options if the image format is not QCOW2 and LUKS.
@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapacheweizhouapache mentioned this pull request Sep 30, 2022
5 tasks
@blueorangutan

Copy link
Copy Markdown

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

@widowido left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good! Just a few IPv6 requests

@codecov

codecovBot commented Sep 30, 2022

Copy link
Copy Markdown

Codecov Report

Merging #6792 (7ad0b52) into main (713a236) will increase coverage by 0.03%.
The diff coverage is 55.17%.

@@ Coverage Diff @@## main #6792 +/- ##
============================================
+ Coverage 10.60% 10.63% +0.03% - Complexity 6849 6866 +17 
============================================
Files 2466 2466 Lines 244549 244563 +14 Branches 38262 38265 +3 ============================================
+ Hits 25936 26014 +78 + Misses 215331 215262 -69 - Partials 3282 3287 +5 
Impacted FilesCoverage Δ
...ypervisor/kvm/resource/LibvirtDomainXMLParser.java48.49% <0.00%> (ø)
...cycle/CloudStackPrimaryDataStoreLifeCycleImpl.java0.00% <0.00%> (ø)
.../cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java70.45% <70.00%> (+0.18%)⬆️
...om/cloud/hypervisor/kvm/resource/LibvirtVMDef.java67.04% <85.71%> (+2.88%)⬆️
...hypervisor/kvm/resource/LibvirtStoragePoolDef.java77.77% <100.00%> (+1.98%)⬆️
...isor/kvm/resource/LibvirtStoragePoolXMLParser.java60.65% <100.00%> (+60.65%)⬆️
...apache/cloudstack/utils/qemu/QemuImageOptions.java73.07% <100.00%> (+16.55%)⬆️
...rg/apache/cloudstack/quota/QuotaStatementImpl.java36.28% <0.00%> (-3.99%)⬇️
... and 2 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@wido
I have made some changes to support ceph monitors with IPv6 addresses. some test cases are added as well.

I am seriously wondering if you are using ceph with IPv6 address in your production, because I faced some blocker issues in my testing
(1) failed to copy template to ceph storage when deploy a vm. this is fixed by 4a242a7
(2) failed to take volume snapshot, this is also fixed by commit 4a242a7
(3) failed to start vm
when I create storage pool, the ipv6 addresses must have brackets ("[" and "]"), but the brackets must be removed in vm definition xml. this is fixed by 34f8732

With all commits in this PR, the RBD storage pools with single or multiple Ipv4/ipv6 monitors work well in my testing.
I will continue on testing.
now it is ready for code reviews. @wido@DaanHoogland@rohityadavcloud@borisstoyanov

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a Jenkins job has been kicked to build packages. It will be bundled with

SystemVM template(s). I'll keep you posted as I make progress.

@sonarqubecloud

Copy link
Copy Markdown

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test ubuntu22 kvm-ubuntu22

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-5075)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41746 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6792-t5075-kvm-centos7.zip
Smoke tests completed. 104 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-5076)
Environment: kvm-ubuntu22 (x2), Advanced Networking with Mgmt server u22
Total time taken: 43956 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6792-t5076-kvm-ubuntu22.zip
Smoke tests completed. 103 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_08_upgrade_kubernetes_ha_clusterFailure592.41test_kubernetes_clusters.py

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

when testing this PR we have found an issue that

  • centos7 kvm host can NOT connect to ceph 17 (single monitor or multiple monitors)
  • centos7 kvm host can connecto to ceph 15

thanks @NuxRo

@NuxRoNuxRo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some testing, looks good to me!

@DaanHooglandDaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@DaanHooglandDaanHoogland added this to the 4.18.0.0 milestone Oct 21, 2022
@DaanHooglandDaanHoogland self-assigned this Oct 21, 2022
@DaanHoogland

Copy link
Copy Markdown
Contributor

@wido by the looks of it all your comments are met, right?

@yadvr
yadvr marked this pull request as ready for review October 21, 2022 08:23
@yadvr

Copy link
Copy Markdown
Member

LGTM - let's merge this @DaanHoogland ?

@DaanHoogland

Copy link
Copy Markdown
Contributor

We are not in "freeze" @rohityadavcloud ;)

@zap51

zap51 commented Jul 23, 2023

Copy link
Copy Markdown
Contributor

@rohityadavcloud@DaanHoogland A PR has been created on Ceph to include this.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@weizhouapache@blueorangutan@wido@DaanHoogland@yadvr@zap51@NuxRo