apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.83k stars 1.07k forks source link

test: fix test failure on ubuntu 24.04: "top: unknown option 'n'" #9262

Closed weizhouapache closed 1 week ago

weizhouapache commented 2 weeks ago

Description

This PR fixes the smoke test failure test_service_offering.py on Ubuntu 24.04

======================================================================
ERROR: Test CPU Cap on KVM
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/marvin/lib/decoratorGenerators.py", line 30, in test_wrapper
    return test(self, *args, **kwargs)
  File "/marvin/tests/smoke/test_service_offerings.py", line 1049, in test_01_service_offering_cpu_limit_use
    host_cpu_usage_before = round(float(host_cpu_usage_before_str))
ValueError: could not convert string to float: "top: unknown option 'n'"
-------------------- >> begin captured stdout << ---------------------
=== TestName: test_01_service_offering_cpu_limit_use | Status : EXCEPTION ===

Types of changes

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

Bug Severity

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 14.95%. Comparing base (00fe25a) to head (53c0d9a). Report is 2 commits behind head on 4.19.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 4.19 #9262 +/- ## ============================================ - Coverage 14.95% 14.95% -0.01% + Complexity 11017 11013 -4 ============================================ Files 5378 5378 Lines 469935 469935 Branches 59493 58185 -1308 ============================================ - Hits 70301 70289 -12 - Misses 391847 391860 +13 + Partials 7787 7786 -1 ``` | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9262/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/9262/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.29% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9262/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `15.66% <ø> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

DaanHoogland commented 2 weeks ago

@blueorangutan package

blueorangutan commented 2 weeks ago

@DaanHoogland a [SL] 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 commented 2 weeks ago

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

DaanHoogland commented 2 weeks ago

@blueorangutan test matrix

blueorangutan commented 2 weeks ago

@DaanHoogland a [SL] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

blueorangutan commented 2 weeks ago

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

Test Result Time (s) Test File
test_02_trigger_shutdown Failure 341.67 test_safe_shutdown.py
blueorangutan commented 2 weeks ago

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

Test Result Time (s) Test File
test_02_trigger_shutdown Failure 341.62 test_safe_shutdown.py
blueorangutan commented 2 weeks ago

[SF] Trillian test result (tid-10478) Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8 Total time taken: 48217 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9262-t10478-vmware-67u3.zip Smoke tests completed. 129 look OK, 2 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_02_balanced_drs_algorithm Failure 132.27 test_cluster_drs.py
test_02_trigger_shutdown Failure 341.64 test_safe_shutdown.py
DaanHoogland commented 2 weeks ago

@blueorangutan help

blueorangutan commented 2 weeks ago

@DaanHoogland [SL] I understand these words: "help", "hello", "thanks", "package", "test" Test command usage: test [mgmt os] [hypervisor] [keepEnv] [qemuEv] [basicZone|securityGroups] Mgmt OS options: ['centos7', 'centos6', 'alma9', 'suse15', 'alma8', 'ubuntu18', 'ubuntu22', 'ubuntu20', 'rocky8', 'ubuntu24'] Hypervisor options: ['kvm-centos6', 'kvm-centos7', 'kvm-rocky8', 'kvm-alma8', 'kvm-alma9', 'kvm-ubuntu18', 'kvm-ubuntu20', 'kvm-ubuntu22', 'kvm-ubuntu24', 'kvm-suse15', 'vmware-55u3', 'vmware-60u2', 'vmware-65u2', 'vmware-67u3', 'vmware-70u1', 'vmware-70u2', 'vmware-70u3', 'vmware-80', 'vmware-80u1', 'xenserver-65sp1', 'xenserver-71', 'xenserver-74', 'xcpng74', 'xcpng76', 'xcpng80', 'xcpng81', 'xcpng82'] Note: when keepEnv is passed, you need to specify mgmt server os and hypervisor or use the matrix command. when qemuEv is passed, it will deploy KVM hyperviosr hosts with qemu-kvm-ev, else it will default to stock qemu. When basicZone and/or securityGroups are passed it will create a zone of the last type specified (default is Advanced) Package command usage: package [all(default value),kvm,xen,vmware,hyperv,ovm] - a comma separated list can be passed with package command to bundle the required hypervisor's systemVM templates. Not passing any argument will bundle all - kvm,xen and vmware templates.

Blessed contributors for kicking Trillian test jobs: ['rohityadavcloud', 'shwstppr', 'vishesh92', 'Pearl1594', 'harikrishna-patnala', 'nvazquez', 'DaanHoogland', 'weizhouapache', 'borisstoyanov', 'vladimirpetrov', 'kiranchavala', 'andrijapanicsb', 'NuxRo', 'rajujith', 'alexandremattioli', 'sureshanaparti', 'mlsorensen', 'oscaralvaro', 'abh1sar']

DaanHoogland commented 2 weeks ago

@blueorangutan test ubuntu24 kvm-ubuntu24

blueorangutan commented 2 weeks ago

@DaanHoogland a [SL] Trillian-Jenkins test job (ubuntu24 mgmt + kvm-ubuntu24) has been kicked to run smoke tests

blueorangutan commented 1 week ago

[SF] Trillian test result (tid-10505) Environment: kvm-ubuntu24 (x2), Advanced Networking with Mgmt server u24 Total time taken: 46141 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9262-t10505-kvm-ubuntu24.zip Smoke tests completed. 129 look OK, 2 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_oobm_background_powerstate_sync Failure 21.03 test_outofbandmanagement.py
test_oobm_enabledisable_across_clusterzones Error 37.51 test_outofbandmanagement.py
test_oobm_issue_power_cycle Error 20.11 test_outofbandmanagement.py
test_oobm_issue_power_off Error 20.13 test_outofbandmanagement.py
test_oobm_issue_power_on Error 20.14 test_outofbandmanagement.py
test_oobm_issue_power_reset Error 20.14 test_outofbandmanagement.py
test_oobm_issue_power_soft Error 20.10 test_outofbandmanagement.py
test_oobm_issue_power_status Error 20.13 test_outofbandmanagement.py
test_oobm_multiple_mgmt_server_ownership Failure 28.42 test_outofbandmanagement.py
test_oobm_zchange_password Error 7.54 test_outofbandmanagement.py
test_hostha_kvm_host_degraded Error 10.18 test_hostha_kvm.py
test_hostha_kvm_host_fencing Error 8.64 test_hostha_kvm.py
test_hostha_kvm_host_recovering Error 9.62 test_hostha_kvm.py
weizhouapache commented 1 week ago

[SF] Trillian test result (tid-10505) Environment: kvm-ubuntu24 (x2), Advanced Networking with Mgmt server u24 Total time taken: 46141 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9262-t10505-kvm-ubuntu24.zip Smoke tests completed. 129 look OK, 2 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File test_oobm_background_powerstate_sync Failure 21.03 test_outofbandmanagement.py test_oobm_enabledisable_across_clusterzones Error 37.51 test_outofbandmanagement.py test_oobm_issue_power_cycle Error 20.11 test_outofbandmanagement.py test_oobm_issue_power_off Error 20.13 test_outofbandmanagement.py test_oobm_issue_power_on Error 20.14 test_outofbandmanagement.py test_oobm_issue_power_reset Error 20.14 test_outofbandmanagement.py test_oobm_issue_power_soft Error 20.10 test_outofbandmanagement.py test_oobm_issue_power_status Error 20.13 test_outofbandmanagement.py test_oobm_multiple_mgmt_server_ownership Failure 28.42 test_outofbandmanagement.py test_oobm_zchange_password Error 7.54 test_outofbandmanagement.py test_hostha_kvm_host_degraded Error 10.18 test_hostha_kvm.py test_hostha_kvm_host_fencing Error 8.64 test_hostha_kvm.py test_hostha_kvm_host_recovering Error 9.62 test_hostha_kvm.py

comparing with https://github.com/apache/cloudstack/pull/9263#issuecomment-2177265906, the test "test_service_offering.py" has no failures with this PR cc @DaanHoogland @sureshanaparti

DaanHoogland commented 1 week ago

looks good @weizhouapache , one more try out of insanity @blueorangutan test ubuntu24 kvm-ubuntu24

blueorangutan commented 1 week ago

@DaanHoogland a [SL] Trillian-Jenkins test job (ubuntu24 mgmt + kvm-ubuntu24) has been kicked to run smoke tests

weizhouapache commented 1 week ago

looks good @weizhouapache , one more try out of insanity

Thanks @sureshanaparti @DaanHoogland Let's try another os

@blueorangutan test a9 kvm-alma9

blueorangutan commented 1 week ago

@weizhouapache [SL] unsupported parameters provided. Supported mgmt server os are: centos7, centos6, alma9, suse15, alma8, ubuntu18, ubuntu22, ubuntu20, rocky8, ubuntu24. Supported hypervisors are: kvm-centos6, kvm-centos7, kvm-rocky8, kvm-alma8, kvm-alma9, kvm-ubuntu18, kvm-ubuntu20, kvm-ubuntu22, kvm-ubuntu24, kvm-suse15, vmware-55u3, vmware-60u2, vmware-65u2, vmware-67u3, vmware-70u1, vmware-70u2, vmware-70u3, vmware-80, vmware-80u1, xenserver-65sp1, xenserver-71, xenserver-74, xcpng74, xcpng76, xcpng80, xcpng81, xcpng82

weizhouapache commented 1 week ago

@blueorangutan test alma9 kvm-alma9

blueorangutan commented 1 week ago

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

blueorangutan commented 1 week ago

[SF] Trillian test result (tid-10524) Environment: kvm-ubuntu24 (x2), Advanced Networking with Mgmt server u24 Total time taken: 47161 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9262-t10524-kvm-ubuntu24.zip Smoke tests completed. 129 look OK, 2 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_oobm_background_powerstate_sync Failure 22.18 test_outofbandmanagement.py
test_oobm_enabledisable_across_clusterzones Error 32.66 test_outofbandmanagement.py
test_oobm_issue_power_cycle Error 20.18 test_outofbandmanagement.py
test_oobm_issue_power_off Error 20.16 test_outofbandmanagement.py
test_oobm_issue_power_on Error 20.07 test_outofbandmanagement.py
test_oobm_issue_power_reset Error 19.04 test_outofbandmanagement.py
test_oobm_issue_power_soft Error 19.11 test_outofbandmanagement.py
test_oobm_issue_power_status Error 19.01 test_outofbandmanagement.py
test_oobm_multiple_mgmt_server_ownership Failure 27.36 test_outofbandmanagement.py
test_oobm_zchange_password Error 7.59 test_outofbandmanagement.py
test_hostha_kvm_host_degraded Error 10.85 test_hostha_kvm.py
test_hostha_kvm_host_fencing Error 7.58 test_hostha_kvm.py
test_hostha_kvm_host_recovering Error 10.62 test_hostha_kvm.py
blueorangutan commented 1 week ago

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

Test Result Time (s) Test File
sureshanaparti commented 1 week ago

test_service_offering.py has no failures, manually verified cmds in Rocky Linux 8.4, Oracle Linux 8.6.