Pearl1594 opened a new pull request #5399:
URL: https://github.com/apache/cloudstack/pull/5399


   ### Description
   
   PR https://github.com/apache/cloudstack/pull/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
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally 
changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to 
reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be 
closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- 
*********************************************************************************
 -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE 
DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- 
*********************************************************************************
 -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] 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
   - [X] 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 ===
   
   
   ```
   
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to