You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/06/23 13:08:39 UTC

[GitHub] [cloudstack] DaanHoogland opened a new pull request #5146: (auto) formatting and cleanup fixes

DaanHoogland opened a new pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146


   ### Description
   
   This PR fixes recent travis failures in travis job 5
   <!--- 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
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [x] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   run in lab env (similar to trillian)
   ```
   Test Volume creation for all Disk Offerings (incl. custom) ... === TestName: test_01_create_volume | Status : SUCCESS ===
   ok
   Attach a created Volume to a Running VM ... === TestName: test_02_attach_volume | Status : SUCCESS ===
   ok
   Download a Volume attached to a VM ... === TestName: test_03_download_attached_volume | Status : SUCCESS ===
   ok
   Delete a Volume attached to a VM ... === TestName: test_04_delete_attached_volume | Status : SUCCESS ===
   ok
   Detach a Volume attached to a VM ... === TestName: test_05_detach_volume | Status : SUCCESS ===
   ok
   Download a Volume unattached to an VM ... === TestName: test_06_download_detached_volume | Status : SUCCESS ===
   ok
   Test resize (negative) non-existent volume ... === TestName: test_07_resize_fail | Status : SUCCESS ===
   ok
   Test resize a volume ... === TestName: test_08_resize_volume | Status : SUCCESS ===
   ok
   Delete a Volume unattached to an VM ... === TestName: test_09_delete_detached_volume | Status : SUCCESS ===
   ok
   test_10_list_volumes (test_volumes.TestVolumes) ... === TestName: test_10_list_volumes | Status : SUCCESS ===
   ok
   Attach a created Volume to a unstarted VM ... === TestName: test_11_attach_volume_with_unstarted_vm | Status : SUCCESS ===
   ok
   test_11_migrate_volume_and_change_offering (test_volumes.TestVolumes) ... === TestName: test_11_migrate_volume_and_change_offering | Status : SUCCESS ===
   ok
   
   ----------------------------------------------------------------------
   Ran 12 tests in 2755.733s
   
   OK
   ```
   
   <!-- 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] slavkap commented on pull request #5146: (auto) formatting and cleanup fixes for test_volumes

Posted by GitBox <gi...@apache.org>.
slavkap commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-867420117


   @DaanHoogland now job 5 has passed [https://travis-ci.com/github/apache/cloudstack/builds/230665717](https://travis-ci.com/github/apache/cloudstack/builds/230665717)
   I'll run the tests later today on my dev. env.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #5146: (auto) formatting and cleanup fixes

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-866828333


   🤞 Travis result 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5146: (auto) formatting and cleanup fixes for test_volumes

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-867417158


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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #5146: (auto) formatting and cleanup fixes

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-866907997


   yes @weizhouapache I saw intermitted failures and successes as well as described above. Would be nice if we can make ci more relyable though :( .


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5146: (auto) formatting and cleanup fixes for test_volumes

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-868159643


   <b>Trillian test result (tid-1087)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 53417 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5146-t1087-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
   Intermittent failure detected: /marvin/tests/smoke/test_router_dhcphosts.py
   Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
   Intermittent failure detected: /marvin/tests/smoke/test_routers.py
   Intermittent failure detected: /marvin/tests/smoke/test_usage.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
   Smoke tests completed. 85 look OK, 3 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_router_dhcphosts | `Failure` | 11.25 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPHosts>:teardown | `Error` | 20.87 | test_router_dhcphosts.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Failure` | 344.04 | test_routers_network_ops.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 519.76 | test_vpc_redundant.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Error` | 519.78 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 530.12 | test_vpc_redundant.py
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #5146: (auto) formatting and cleanup fixes for test_volumes

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-870351492


   Travis passing, smoketests LGTM - failures don't seem related to this PR.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5146: (auto) formatting and cleanup fixes

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-866911339


   Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 337


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #5146: (auto) formatting and cleanup fixes

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-866868423


   ah, just realised the failing tests above require hardware so won't run in travis.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #5146: (auto) formatting and cleanup fixes for test_volumes

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-870351492


   Travis passing, smoketests LGTM - failures don't seem related to this PR.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] slavkap commented on a change in pull request #5146: (auto) formatting and cleanup fixes

Posted by GitBox <gi...@apache.org>.
slavkap commented on a change in pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#discussion_r657201861



##########
File path: test/integration/smoke/test_volumes.py
##########
@@ -383,29 +367,22 @@ def setUp(self):
                     available")
 
     def tearDown(self):
-        #Clean up, terminate the created volumes
-        if self.attached:
-            self.virtual_machine.get_ssh_client(reconnect = True)
-
-            self.virtual_machine.detach_volume(self.apiClient, self.volume)
-
         if self.virtual_machine.hypervisor == "KVM":
             self.virtual_machine.stop(self.apiClient)
+            if self.attached:
+                self.virtual_machine.detach_volume(self.apiClient, self.volume)
             self.virtual_machine.start(self.apiClient)
-            self.virtual_machine.get_ssh_client(reconnect = True)
-
+            self.virtual_machine.get_ssh_client(reconnect=True)

Review comment:
       ```suggestion
           if self.virtual_machine.hypervisor == "KVM":
               self.virtual_machine.stop(self.apiClient)
               if self.attached:
                   self.virtual_machine.detach_volume(self.apiClient, self.volume)
               self.virtual_machine.start(self.apiClient)
               try:
                   self.virtual_machine.get_ssh_client(reconnect=True)
               except Exception as err:
                   self.fail("SSH failed for Virtual machine: %s due to %s" % 
                   self.virtual_machine.ipaddress, err)
           elif self.attached:
               self.virtual_machine.detach_volume(self.apiClient, self.volume)
                
   ```
   Actually, it should be like this. The detach should be executed no matter what type is the hypervisor




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5146: (auto) formatting and cleanup fixes for test_volumes

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-867456831


   Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 350


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd merged pull request #5146: (auto) formatting and cleanup fixes for test_volumes

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146


   


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd merged pull request #5146: (auto) formatting and cleanup fixes for test_volumes

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146


   


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #5146: (auto) formatting and cleanup fixes for test_volumes

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-867401418


   @slavkap @rhtyd in a real environment it runs fine. I think this job 5 failure is either simulator or travis specific.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] slavkap commented on pull request #5146: (auto) formatting and cleanup fixes

Posted by GitBox <gi...@apache.org>.
slavkap commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-866907945


   @DaanHoogland, again the volume isn't detached between tests `test_03_download_attached_volume` and `test_04_delete_attached_volume`. I guess the ssh connection timed out. That's why the tests have failed (my assumptions)


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #5146: (auto) formatting and cleanup fixes

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-866852063


   I ran a second test locally:
   ```
   Test Volume creation for all Disk Offerings (incl. custom) ... === TestName: test_01_create_volume | Status : SUCCESS ===
   ok
   Attach a created Volume to a Running VM ... === TestName: test_02_attach_volume | Status : SUCCESS ===
   ok
   Download a Volume attached to a VM ... === TestName: test_03_download_attached_volume | Status : SUCCESS ===
   ok
   Delete a Volume attached to a VM ... === TestName: test_04_delete_attached_volume | Status : SUCCESS ===
   ok
   Detach a Volume attached to a VM ... === TestName: test_05_detach_volume | Status : SUCCESS ===
   ok
   Download a Volume unattached to an VM ... === TestName: test_06_download_detached_volume | Status : FAILED ===
   FAIL
   Test resize (negative) non-existent volume ... === TestName: test_07_resize_fail | Status : SUCCESS ===
   ok
   Test resize a volume ... === TestName: test_08_resize_volume | Status : SUCCESS ===
   ok
   Delete a Volume unattached to an VM ... === TestName: test_09_delete_detached_volume | Status : SUCCESS ===
   ok
   test_10_list_volumes (test_volumes.TestVolumes) ... === TestName: test_10_list_volumes | Status : SUCCESS ===
   ok
   Attach a created Volume to a unstarted VM ... === TestName: test_11_attach_volume_with_unstarted_vm | Status : SUCCESS ===
   ok
   # Validates the following ... === TestName: test_11_migrate_volume_and_change_offering | Status : EXCEPTION ===
   ERROR
   === TestName: test_11_migrate_volume_and_change_offering | Status : EXCEPTION ===
   ERROR
   
   ```
   so looks like I only partly fixed it and am still dependent on circumstances :(


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on pull request #5146: (auto) formatting and cleanup fixes

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-866896527


   @DaanHoogland fyi, I run test_volumes.py twice without any issue. no code changes in main branch. I think travis test failures might not be related to  test_volumes.py .


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #5146: (auto) formatting and cleanup fixes for test_volumes

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#issuecomment-867416485


   @blueorangutan package 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] slavkap commented on a change in pull request #5146: (auto) formatting and cleanup fixes

Posted by GitBox <gi...@apache.org>.
slavkap commented on a change in pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#discussion_r657201861



##########
File path: test/integration/smoke/test_volumes.py
##########
@@ -383,29 +367,22 @@ def setUp(self):
                     available")
 
     def tearDown(self):
-        #Clean up, terminate the created volumes
-        if self.attached:
-            self.virtual_machine.get_ssh_client(reconnect = True)
-
-            self.virtual_machine.detach_volume(self.apiClient, self.volume)
-
         if self.virtual_machine.hypervisor == "KVM":
             self.virtual_machine.stop(self.apiClient)
+            if self.attached:
+                self.virtual_machine.detach_volume(self.apiClient, self.volume)
             self.virtual_machine.start(self.apiClient)
-            self.virtual_machine.get_ssh_client(reconnect = True)
-
+            self.virtual_machine.get_ssh_client(reconnect=True)

Review comment:
       ```suggestion
               try:
                   self.virtual_machine.get_ssh_client(reconnect=True)
               except Exception as err:
                   self.fail("SSH failed for Virtual machine: %s due to %s" %
                         self.virtual_machine.ipaddress, err)
   ```
   To catch it if it fails here




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org