Skip to content

api,server: add params for updatehypervisorcapabilities API - #5473

Merged
sureshanaparti merged 7 commits into
apache:4.16from
shapeblue:add-params-updatehypervisorcapabilities
Feb 3, 2022
Merged

api,server: add params for updatehypervisorcapabilities API#5473
sureshanaparti merged 7 commits into
apache:4.16from
shapeblue:add-params-updatehypervisorcapabilities

Conversation

@shwstppr

Copy link
Copy Markdown
Contributor

Description

Allows updating following capabilities for a hypervisor, version:

  • Max DATA volumes limit
  • Storage motion supported
  • Max hosts per cluster
  • VM snapshot enabled

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?

Using cmk:

(local) 🦌 > list hypervisorcapabilities id=7e83442b-19ed-11ec-93bc-645d8651f45a
{
  "count": 1,
  "hypervisorCapabilities": [
    {
      "hypervisor": "Simulator",
      "hypervisorversion": "default",
      "id": "7e83442b-19ed-11ec-93bc-645d8651f45a",
      "maxdatavolumeslimit": 6,
      "maxguestslimit": 50,
      "securitygroupenabled": true,
      "storagemotionenabled": true,
      "vmsnapshotenabled": false
    }
  ]
}
(local) 🦅 > update hypervisorcapabilities id=7e83442b-19ed-11ec-93bc-645d8651f45a maxdatavolumeslimit=32 maxguestslimit=64 securitygroupenabled=false storagemotionenabled=false vmsnapshotenabled=true maxhostspercluster=10
{
  "null": {
    "hypervisor": "Simulator",
    "hypervisorversion": "default",
    "id": "7e83442b-19ed-11ec-93bc-645d8651f45a",
    "maxdatavolumeslimit": 32,
    "maxguestslimit": 64,
    "maxhostspercluster": 10,
    "securitygroupenabled": false,
    "storagemotionenabled": false,
    "vmsnapshotenabled": true
  }
}

Allows updating following capabilities for a hypervisor, version:
- Max DATA volumes limit
- Storage motion supported
- Max hosts per cluster
- VM snapshot enabled

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

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

@shwstppr

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File

@shwstppr shwstppr closed this Sep 24, 2021
@shwstppr shwstppr reopened this Sep 24, 2021
@yadvr
yadvr changed the base branch from main to 4.16 November 15, 2021 10:09
@yadvr yadvr added this to the 4.16.1.0 milestone Nov 25, 2021
@sureshanaparti

Copy link
Copy Markdown
Contributor

@shwstppr Is this PR ready?

@shwstppr
shwstppr marked this pull request as ready for review January 17, 2022 06:08

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

code looks generally good but I think in this case a simple integration test is in order.
a simple
update -> list -> verify -> update -> list -> verify
what do you think @shwstppr ?

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr

Copy link
Copy Markdown
Contributor Author

@DaanHoogland can you please have a look at the integration test added in the last commit. Should it be under components or smoke?

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

thanks for the test @shwstppr , some code suggestions and I see one issue in the test. Can you explain please?

Comment thread test/integration/smoke/test_hypervisor_capabilities.py Outdated
Comment thread test/integration/smoke/test_hypervisor_capabilities.py Outdated
Comment thread test/integration/smoke/test_hypervisor_capabilities.py Outdated
Comment thread test/integration/smoke/test_hypervisor_capabilities.py
Comment thread test/integration/smoke/test_hypervisor_capabilities.py Outdated
Comment thread test/integration/smoke/test_hypervisor_capabilities.py Outdated
shwstppr and others added 3 commits January 28, 2022 23:14
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Comment thread tools/marvin/marvin/lib/base.py

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

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_01_check_hypervisor_max_data_volume_limit Error 89.58 test_hypervisor_capabilities.py
test_01_check_hypervisor_vm_snapshot Error 43.71 test_hypervisor_capabilities.py

@DaanHoogland

Copy link
Copy Markdown
Contributor

@shwstppr , these trillian failures seem related to the changes, can you have a look?

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

except the failing tests, rest LGTM

@shwstppr

Copy link
Copy Markdown
Contributor Author

@DaanHoogland will check and update

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr

shwstppr commented Feb 2, 2022

Copy link
Copy Markdown
Contributor Author

@DaanHoogland as discussed, moved test to component and made fixes.

  • Detach volume was failing intermittently for multiple disks so added a stop VM statement
  • VM snapshots for a running VM is not supported on KVM so skipped that test for KVM.

Tested VMware and KVM. KVM logs below:

[root@pr5473-t3104-kvm-centos7-marvin marvin]# nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=./pr5473-t3104-kvm-centos7-advanced-cfg -s -a tags=advanced --hypervisor=KVM tests/component/test_hypervisor_capabilities.py 

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /marvin/MarvinLogs/Feb_02_2022_06_34_09_97PJFK All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: test_01_check_hypervisor_max_data_volume_limit | Status : SUCCESS ===

=== Final results are now copied to: /marvin//MarvinLogs/test_hypervisor_capabilities_1R6CDP ===
[root@pr5473-t3104-kvm-centos7-marvin marvin]# cat /marvin//MarvinLogs/test_hypervisor_capabilities_1R6CDP/results.txt 
Test hypervisor maxdatavolumeslimit effect ... === TestName: test_01_check_hypervisor_max_data_volume_limit | Status : SUCCESS ===
ok
Test hypervisor vmsnapshotenabled effect ... SKIP: Skipping test: Reason -  VM Snapshot of running VM is not supported for KVM

----------------------------------------------------------------------
Ran 2 tests in 90.896s

OK (SKIP=1)

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File

@sureshanaparti
sureshanaparti merged commit 62b806a into apache:4.16 Feb 3, 2022
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.

6 participants