Skip to content

Conversation

@Pearl1594
Copy link
Contributor

@Pearl1594 Pearl1594 commented Sep 1, 2021

Description

PR #5337 added a check to bypass username / password check for a specific hypervisor type, however, Simulator envs leverage discoverHosts ( https://github.com/apache/cloudstack/blob/main/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java#L643 ) for simulating addition of a secondary store, wherein "SecondaryStorage" is passed as hypervisor type and this leads to a failure at https://github.com/apache/cloudstack/blob/main/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java#L692 - i.e., the username and password check fails which in turn leads to the template properties - "size" not being set at https://github.com/apache/cloudstack/blob/main/plugins/hypervisors/simulator/src/main/java/com/cloud/resource/SimulatorSecondaryDiscoverer.java#L77. Thus, we have been noticing a few travis failures:

+------------------------+--------------------+-------+------------------------+
|          Test          |       Result       | Time  |       Test file        |
+========================+====================+=======+========================+

| test_00_deploy_vm_root | builtins.TypeError | 0.001 | test_deploy_vm_root_re |
| _resize                |                    |       | size                   |
+------------------------+--------------------+-------+------------------------+

| test_02_deploy_vm_root | builtins.TypeError | 0     | test_deploy_vm_root_re |
| _resize                |                    |       | size                   |
+------------------------+--------------------+-------+------------------------+


+------------------------+--------------------+-------+------------------------+
|          Test          |       Result       | Time  |       Test file        |
+========================+====================+=======+========================+
| test_01_reset_vm_on_re | builtins.Exception | 1.129 | test_reset_vm_on_reboo |
| boot                   |                    |       | t                      |
+------------------------+--------------------+-------+------------------------+

This PR fixes the above mentioned issue

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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Ran the specific tests on a simulator based env and they passed

$ nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=setup/dev/advanced.cfg -s -a tags=xx --hypervisor=simulator test/integration/smoke/test_deploy_vm_root_resize.py 

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /tmp/MarvinLogs/Sep_01_2021_18_53_26_ZLX8G2. All logs will be available here ====

=== Marvin Init Logging Successful===

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

=== TestName: test_02_deploy_vm_root_resize | Status : SUCCESS ===



$ nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=setup/dev/advanced.cfg -s -a tags=xx --hypervisor=simulator test/integration/smoke/test_reset_vm_on_reboot.py

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /tmp/MarvinLogs/Sep_01_2021_18_55_53_P0C5BP. All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
None
2147483648
=== TestName: test_01_reset_vm_on_reboot | Status : SUCCESS ===


@nvazquez
Copy link
Contributor

nvazquez commented Sep 1, 2021

@blueorangutan package

@blueorangutan
Copy link

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

@nvazquez nvazquez added this to the 4.16.0.0 milestone Sep 1, 2021
@blueorangutan
Copy link

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

@Pearl1594
Copy link
Contributor Author

@blueorangutan test

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, thanks @Pearl1594

@weizhouapache
Copy link
Member

travis test passed.
now close and reopen to run test again.

@Pearl1594
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File

@yadvr yadvr merged commit 37761c6 into apache:main Sep 2, 2021
@blueorangutan
Copy link

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

Test Result Time (s) Test File

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.

6 participants