Skip to content

server: try with all supported hypervisors (ordered, no duplications) when deploy a virtual router#7877

Merged
DaanHoogland merged 3 commits intoapache:4.18from
weizhouapache:4.18-fix-deploy-vr-multiple-hypervisors
Aug 25, 2023
Merged

server: try with all supported hypervisors (ordered, no duplications) when deploy a virtual router#7877
DaanHoogland merged 3 commits intoapache:4.18from
weizhouapache:4.18-fix-deploy-vr-multiple-hypervisors

Conversation

@weizhouapache
Copy link
Copy Markdown
Member

@weizhouapache weizhouapache commented Aug 17, 2023

Description

This PR fixes #7433

It was a bit strange that cloudstack only tries to deploy VRs with at most two hypervisors. If there are more than 2 hypervisors (e.g. kvm/vmware/xen) on the environment, the VR deployment might fail.

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?

  • create an env with 3 hosts (1 kvm,1 vmware,1 xen)
  • create a vm on isolated network on each hypervisor (3 networks and 3 vms in total)
  • restart networks with cleanup, all work
  • disable 2 of 3 hypervisors. for example, kvm is enabled, vmware/xen are disabled.
  • restart networks with cleanup, all work
  • disable kvm/xen host, and enable vmware
  • restart networks with cleanup, all work
  • disable kvm/vmware host, and enable xen
  • restart networks with cleanup, all work

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@weizhouapache weizhouapache added this to the 4.18.1.0 milestone Aug 17, 2023
@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SF] 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.

@weizhouapache weizhouapache changed the title server: try with all supported hypervisors (ordered, no duplicatios) when deploy a virtual router server: try with all supported hypervisors (ordered, no duplications) when deploy a virtual router Aug 17, 2023
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 17, 2023

Codecov Report

Merging #7877 (d00b96c) into 4.18 (d8a5c89) will increase coverage by 0.01%.
Report is 17 commits behind head on 4.18.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               4.18    #7877      +/-   ##
============================================
+ Coverage     13.04%   13.05%   +0.01%     
- Complexity     9067     9083      +16     
============================================
  Files          2720     2720              
  Lines        257234   257386     +152     
  Branches      40102    40127      +25     
============================================
+ Hits          33552    33612      +60     
- Misses       219472   219553      +81     
- Partials       4210     4221      +11     
Files Changed Coverage Δ
...va/com/cloud/network/router/NetworkHelperImpl.java 3.68% <0.00%> (-0.14%) ⬇️

... and 15 files with indirect coverage changes

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

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-7469)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 49789 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7877-t7469-kvm-centos7.zip
Smoke tests completed. 107 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 702.20 test_kubernetes_clusters.py

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

so we only try once but for all possible hypervisors. this makes sense.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Aug 22, 2023

Should we merge this @weizhouapache @DaanHoogland or do we need manual QA ?

@weizhouapache
Copy link
Copy Markdown
Member Author

Should we merge this @weizhouapache @DaanHoogland or do we need manual QA ?

@rohityadavcloud
would be better to test it before merge. let me create a env with 3 hypervisors and ask you guys to test it.

@weizhouapache weizhouapache marked this pull request as draft August 22, 2023 14:05
@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SF] 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 [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6859

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SF] 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 [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6865

@weizhouapache weizhouapache force-pushed the 4.18-fix-deploy-vr-multiple-hypervisors branch from 410caeb to 674d5ae Compare August 23, 2023 10:21
@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SF] 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.

@weizhouapache weizhouapache force-pushed the 4.18-fix-deploy-vr-multiple-hypervisors branch from 674d5ae to d00b96c Compare August 23, 2023 11:13
@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SF] 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 [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6867

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6869

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File

@weizhouapache
Copy link
Copy Markdown
Member Author

@DaanHoogland
this is ready for review/testing

what I have tested are

  • create an env with 3 hosts (1 kvm,1 vmware,1 xen)
  • create a vm on isolated network on each hypervisor (3 networks and 3 vms in total)
  • restart networks with cleanup, all work
  • disable 2 of 3 hypervisors. for example, kvm is enabled, vmware/xen are disabled.
  • restart networks with cleanup, all work
  • disable kvm/xen host, and enable vmware
  • restart networks with cleanup, all work
  • disable kvm/vmware host, and enable xen
  • restart networks with cleanup, all work

@weizhouapache weizhouapache marked this pull request as ready for review August 24, 2023 06:42
@DaanHoogland DaanHoogland self-assigned this Aug 24, 2023
@DaanHoogland
Copy link
Copy Markdown
Contributor

DaanHoogland commented Aug 25, 2023

@weizhouapache,
I tested ok as described, but I also tested maintenance. In the above scenario I put the vmware host to disabled and the xenhost to maintenance. Now the ssvm came up on the kvm host and the cpvm kept retrying. I am not sure if this is the same issue or should be fixed in a new PR though. As said, the described scenario works as it says on the tin.

errata:
After more than 6 retries the cpvm came up on the kvm host. v-2-13-VM instead of the expected v-2-6-VM. In hind sight the ssvm also took an extra try; s-2-7-VM came up where s-2-5-VM was expected.

@DaanHoogland
Copy link
Copy Markdown
Contributor

I verified with a VR as well, and in the end all start on the available host irrespective of hypervisor type. merging

@DaanHoogland DaanHoogland merged commit b19db10 into apache:4.18 Aug 25, 2023
@DaanHoogland DaanHoogland deleted the 4.18-fix-deploy-vr-multiple-hypervisors branch August 25, 2023 09:49
@weizhouapache
Copy link
Copy Markdown
Member Author

I verified with a VR as well, and in the end all start on the available host irrespective of hypervisor type. merging

thanks @DaanHoogland !

@DaanHoogland DaanHoogland removed their assignment Nov 16, 2023
Sign up for free to 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.

4 participants