You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "DaanHoogland (via GitHub)" <gi...@apache.org> on 2026/05/08 12:43:42 UTC

[PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

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

   The test was creating an ISO and a VirtualMachine without adding them to self.cleanup, so they were never deleted after each test run.
   
   - Add iso and virtual_machine to self.cleanup (using append) so the base-class tearDown deletes them after each test.
   - Remove the explicit tearDown override — the base class cloudstackTestCase.tearDown already calls cleanup_resources(self.apiclient, reversed(self.cleanup)).
   - Remove the explicit tearDownClass override — the base class cloudstackTestCase.tearDownClass already handles cls._cleanup for both the apiclient and api_client attribute names.
   - Rename cls.api_client → cls.apiclient in setUpClass so the base-class tearDownClass can find the client.
   - Remove the now-unused cleanup_resources import from marvin.lib.utils.
   
   Relates to #3693
   
   ### Description
   
   This PR...
   <!--- 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: AUTOMATION 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)
   - [ ] 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)
   - [ ] Build/CI
   - [ ] Test (unit or integration test code)
   
   ### 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?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   <!-- 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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4689242567

   @blueorangutan test keepEnv


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#discussion_r3208983179


##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -92,66 +84,82 @@ def setUp(self):
         self.cleanup = [self.account]
         return
 
-    def tearDown(self):
-        try:
-            self.debug("Cleaning up the resources")
-            cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
-        except Exception as e:
-            self.debug("Warning! Exception in tearDown: %s" % e)
-
     @attr(
         tags=[
             "advanced",
             "eip",
             "advancedns",
             "basic",
-            "sg"],
-        required_hardware="true")
+            "sg"
+        ],
+        required_hardware="true"
+    )
     def test_deploy_vm_from_iso(self):
         """Test Deploy Virtual Machine from ISO
         """
 
         # Validate the following:
-        # 1. deploy VM using ISO
-        # 2. listVM command should return the deployed VM. State of this VM
-        #    should be "Running".
-        self.hypervisor = self.testClient.getHypervisorInfo()
-        if self.hypervisor.lower() in ['lxc']:
-            self.skipTest(
-                "vm deploy from ISO feature is not supported on %s" %
-                self.hypervisor.lower())
+        # 1. Create an ISO
+        # 2. Deploy a VM from the ISO
+        # 3. VM should be in 'Running' state
 
         self.iso = Iso.create(
             self.apiclient,
-            self.testdata["configurableData"]["bootableIso"],
+            self.testdata["iso"],

Review Comment:
   This test now registers `self.testdata["iso"]`, which in the default Marvin test data is not bootable (`bootable: False`). That changes the test’s intent (“deploy VM from ISO”) and can cause the deploy to fail or the VM not to boot from the ISO. Use the bootable ISO definition (e.g. `testdata["configurableData"]["bootableIso"]`) or ensure the services dict sets `bootable=True` for this test.
   



##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -92,66 +84,82 @@ def setUp(self):
         self.cleanup = [self.account]
         return
 
-    def tearDown(self):
-        try:
-            self.debug("Cleaning up the resources")
-            cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
-        except Exception as e:
-            self.debug("Warning! Exception in tearDown: %s" % e)
-
     @attr(
         tags=[
             "advanced",
             "eip",
             "advancedns",
             "basic",
-            "sg"],
-        required_hardware="true")
+            "sg"
+        ],
+        required_hardware="true"
+    )
     def test_deploy_vm_from_iso(self):
         """Test Deploy Virtual Machine from ISO
         """
 
         # Validate the following:
-        # 1. deploy VM using ISO
-        # 2. listVM command should return the deployed VM. State of this VM
-        #    should be "Running".
-        self.hypervisor = self.testClient.getHypervisorInfo()
-        if self.hypervisor.lower() in ['lxc']:
-            self.skipTest(
-                "vm deploy from ISO feature is not supported on %s" %
-                self.hypervisor.lower())
+        # 1. Create an ISO
+        # 2. Deploy a VM from the ISO
+        # 3. VM should be in 'Running' state
 
         self.iso = Iso.create(
             self.apiclient,
-            self.testdata["configurableData"]["bootableIso"],
+            self.testdata["iso"],
             account=self.account.name,
-            domainid=self.account.domainid,
-            zoneid=self.zone.id
+            domainid=self.account.domainid
+        )
+        self.cleanup.append(self.iso)
+
+        self.debug("ISO created with ID: %s" % self.iso.id)
+
+        list_iso_response = Iso.list(
+            self.apiclient,
+            id=self.iso.id
+        )
+        self.assertEqual(
+            isinstance(list_iso_response, list),
+            True,
+            "Check list response returns a valid list"
         )
-        try:
-            # Download the ISO
-            self.iso.download(self.apiclient)
-        except Exception as e:
-            raise Exception("Exception while downloading ISO %s: %s"
-                            % (self.iso.id, e))
-
-        self.debug("Registered ISO: %s" % self.iso.name)
-        self.debug("Deploying instance in the account: %s" %
-                   self.account.name)
+
+        self.iso.download(self.apiclient)
+
+        # Deploy Virtual Machine
         self.virtual_machine = VirtualMachine.create(
             self.apiclient,
             self.testdata["virtual_machine"],
             accountid=self.account.name,
             domainid=self.account.domainid,
-            templateid=self.iso.id,
             serviceofferingid=self.service_offering.id,
             diskofferingid=self.disk_offering.id,
-            hypervisor=self.hypervisor
+            mode=self.zone.networktype
         )

Review Comment:
   `VirtualMachine.create(...)` no longer passes `templateid=self.iso.id`, so the VM will be deployed from `self.testdata["virtual_machine"]["template"]` (set to the normal test template in `setUp`), not from the ISO. This makes the later `vm_response.isoid == self.iso.id` assertion incorrect and breaks the “deploy from ISO” behavior. Pass the ISO id as `templateid` (or set `services["template"]` to the ISO id for this call).



##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -92,66 +84,82 @@ def setUp(self):
         self.cleanup = [self.account]
         return
 
-    def tearDown(self):
-        try:
-            self.debug("Cleaning up the resources")
-            cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
-        except Exception as e:
-            self.debug("Warning! Exception in tearDown: %s" % e)
-
     @attr(
         tags=[
             "advanced",
             "eip",
             "advancedns",
             "basic",
-            "sg"],
-        required_hardware="true")
+            "sg"
+        ],
+        required_hardware="true"
+    )
     def test_deploy_vm_from_iso(self):
         """Test Deploy Virtual Machine from ISO
         """
 
         # Validate the following:
-        # 1. deploy VM using ISO
-        # 2. listVM command should return the deployed VM. State of this VM
-        #    should be "Running".
-        self.hypervisor = self.testClient.getHypervisorInfo()
-        if self.hypervisor.lower() in ['lxc']:
-            self.skipTest(
-                "vm deploy from ISO feature is not supported on %s" %
-                self.hypervisor.lower())
+        # 1. Create an ISO
+        # 2. Deploy a VM from the ISO
+        # 3. VM should be in 'Running' state
 
         self.iso = Iso.create(
             self.apiclient,
-            self.testdata["configurableData"]["bootableIso"],
+            self.testdata["iso"],
             account=self.account.name,
-            domainid=self.account.domainid,
-            zoneid=self.zone.id
+            domainid=self.account.domainid
+        )
+        self.cleanup.append(self.iso)
+
+        self.debug("ISO created with ID: %s" % self.iso.id)
+
+        list_iso_response = Iso.list(
+            self.apiclient,
+            id=self.iso.id
+        )
+        self.assertEqual(
+            isinstance(list_iso_response, list),
+            True,
+            "Check list response returns a valid list"
         )
-        try:
-            # Download the ISO
-            self.iso.download(self.apiclient)
-        except Exception as e:
-            raise Exception("Exception while downloading ISO %s: %s"
-                            % (self.iso.id, e))
-
-        self.debug("Registered ISO: %s" % self.iso.name)
-        self.debug("Deploying instance in the account: %s" %
-                   self.account.name)
+
+        self.iso.download(self.apiclient)
+
+        # Deploy Virtual Machine
         self.virtual_machine = VirtualMachine.create(
             self.apiclient,
             self.testdata["virtual_machine"],
             accountid=self.account.name,
             domainid=self.account.domainid,
-            templateid=self.iso.id,
             serviceofferingid=self.service_offering.id,
             diskofferingid=self.disk_offering.id,
-            hypervisor=self.hypervisor
+            mode=self.zone.networktype
         )
+        self.cleanup.append(self.virtual_machine)
+
+        self.debug("VM created with ID: %s" % self.virtual_machine.id)
 
-        response = self.virtual_machine.getState(
+        list_vm_response = VirtualMachine.list(
             self.apiclient,
-            VirtualMachine.RUNNING)
-        self.assertEqual(response[0], PASS, response[1])
+            id=self.virtual_machine.id
+        )
+
+        self.assertEqual(
+            isinstance(list_vm_response, list),
+            True,
+            "Check list response returns a valid list"
+        )
+        vm_response = list_vm_response[0]
+
+        self.assertEqual(
+            vm_response.state,
+            "Running",

Review Comment:
   The previous version used `self.virtual_machine.getState(..., VirtualMachine.RUNNING)` which polls until the VM transitions to Running. The new code lists once and immediately asserts `state == "Running"`, which is prone to race/flakiness right after deploy. Consider restoring `getState` (or another wait) before asserting state.
   



##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -92,66 +84,82 @@ def setUp(self):
         self.cleanup = [self.account]
         return
 
-    def tearDown(self):
-        try:
-            self.debug("Cleaning up the resources")
-            cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
-        except Exception as e:
-            self.debug("Warning! Exception in tearDown: %s" % e)
-
     @attr(
         tags=[
             "advanced",
             "eip",
             "advancedns",
             "basic",
-            "sg"],
-        required_hardware="true")
+            "sg"
+        ],
+        required_hardware="true"
+    )
     def test_deploy_vm_from_iso(self):
         """Test Deploy Virtual Machine from ISO
         """
 
         # Validate the following:
-        # 1. deploy VM using ISO
-        # 2. listVM command should return the deployed VM. State of this VM
-        #    should be "Running".
-        self.hypervisor = self.testClient.getHypervisorInfo()
-        if self.hypervisor.lower() in ['lxc']:
-            self.skipTest(
-                "vm deploy from ISO feature is not supported on %s" %
-                self.hypervisor.lower())
+        # 1. Create an ISO
+        # 2. Deploy a VM from the ISO
+        # 3. VM should be in 'Running' state

Review Comment:
   The LXC hypervisor skip was removed. Other ISO-deploy tests in this repo still skip LXC (e.g. `test/integration/component/test_stopped_vm.py`), because deploy-from-ISO isn’t supported there. Without the skip, this test will fail when run against LXC environments.



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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4440892854

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


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4543076918

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  no SystemVM templates. 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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4494110992

   <b>[SF] Trillian test result (tid-16107)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 68016 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13136-t16107-kvm-ol8.zip
   Smoke tests completed. 124 look OK, 6 have errors, 21 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_vm_backup_create_vm_from_backup | `Failure` | 608.00 | test_backup_recovery_nas.py
   test_vm_backup_lifecycle | `Error` | 0.14 | test_backup_recovery_nas.py
   test_deploy_vm_from_iso | `Failure` | 5.01 | test_deploy_vm_iso.py
   test_deploy_vm_from_iso | `Error` | 5.02 | test_deploy_vm_iso.py
   test_01_port_fwd_on_src_nat | `Error` | 3.52 | test_network.py
   test_02_port_fwd_on_non_src_nat | `Error` | 0.01 | test_network.py
   ContextSuite context=TestPortForwarding>:teardown | `Error` | 1.04 | test_network.py
   ContextSuite context=TestPrivateVlansL2Networks>:setup | `Error` | 2.06 | test_network.py
   ContextSuite context=TestPublicIP>:setup | `Error` | 3.08 | test_network.py
   test_reboot_router | `Error` | 1.02 | test_network.py
   test_releaseIP | `Error` | 1.02 | test_network.py
   test_releaseIP_using_IP | `Error` | 1.02 | test_network.py
   ContextSuite context=TestRouterRules>:setup | `Error` | 2.05 | test_network.py
   ContextSuite context=TestSharedNetwork>:setup | `Error` | 3.07 | test_network.py
   ContextSuite context=TestSharedNetworkWithConfigDrive>:setup | `Error` | 4.09 | test_network.py
   test_01_create_vm_snapshots | `Failure` | 606.87 | test_vm_snapshots.py
   test_02_revert_vm_snapshots | `Failure` | 600.71 | test_vm_snapshots.py
   test_03_delete_vm_snapshots | `Failure` | 0.03 | test_vm_snapshots.py
   test_01_create_volume | `Failure` | 611.81 | test_volumes.py
   test_01_root_volume_encryption | `Failure` | 703.46 | test_volumes.py
   test_02_data_volume_encryption | `Failure` | 647.59 | test_volumes.py
   test_03_root_and_data_volume_encryption | `Failure` | 666.35 | test_volumes.py
   test_02_attach_volume | `Failure` | 1270.34 | test_volumes.py
   test_02_attach_volume | `Failure` | 1270.36 | test_volumes.py
   test_03_download_attached_volume | `Failure` | 666.56 | test_volumes.py
   test_04_delete_attached_volume | `Failure` | 661.43 | test_volumes.py
   test_05_detach_volume | `Failure` | 754.33 | test_volumes.py
   test_06_download_detached_volume | `Failure` | 850.83 | test_volumes.py
   test_07_resize_fail | `Failure` | 662.32 | test_volumes.py
   test_08_resize_volume | `Failure` | 670.51 | test_volumes.py
   test_09_delete_detached_volume | `Failure` | 664.09 | test_volumes.py
   test_10_list_volumes | `Failure` | 658.53 | test_volumes.py
   test_11_attach_volume_with_unstarted_vm | `Failure` | 765.58 | test_volumes.py
   test_12_resize_volume_with_only_size_parameter | `Failure` | 665.89 | test_volumes.py
   test_13_migrate_volume_and_change_offering | `Failure` | 799.34 | test_volumes.py
   test_14_delete_volume_delete_protection | `Failure` | 664.69 | test_volumes.py
   ContextSuite context=TestSharedFSLifecycle>:setup | `Error` | 0.00 | test_sharedfs_lifecycle.py
   all_test_ipv4_routing | `Skipped` | --- | test_ipv4_routing.py
   all_test_ipv6_infra | `Skipped` | --- | test_ipv6_infra.py
   all_test_list_volumes | `Skipped` | --- | test_list_volumes.py
   all_test_loadbalance | `Skipped` | --- | test_loadbalance.py
   all_test_login | `Skipped` | --- | test_login.py
   all_test_metrics_api | `Skipped` | --- | test_metrics_api.py
   all_test_migration | `Skipped` | --- | test_migration.py
   all_test_network_traffic_type_api | `Skipped` | --- | test_network_traffic_type_api.py
   all_test_nic_adapter_type | `Skipped` | --- | test_nic_adapter_type.py
   all_test_nic | `Skipped` | --- | test_nic.py
   all_test_non_contigiousvlan | `Skipped` | --- | test_non_contigiousvlan.py
   all_test_purge_expunged_vms | `Skipped` | --- | test_purge_expunged_vms.py
   all_test_pvlan | `Skipped` | --- | test_pvlan.py
   all_test_quarantined_ips | `Skipped` | --- | test_quarantined_ips.py
   all_test_usage | `Skipped` | --- | test_usage.py
   all_test_vm_autoscaling | `Skipped` | --- | test_vm_autoscaling.py
   all_test_vm_deployment_planner | `Skipped` | --- | test_vm_deployment_planner.py
   all_test_vm_life_cycle | `Skipped` | --- | test_vm_life_cycle.py
   all_test_vm_strict_host_tags | `Skipped` | --- | test_vm_strict_host_tags.py
   all_test_host_maintenance | `Skipped` | --- | test_host_maintenance.py
   all_test_hostha_kvm | `Skipped` | --- | test_hostha_kvm.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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4858868197

   verified, let’s merge @weizhouapache ???


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#discussion_r3302628423


##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -129,16 +110,29 @@ def test_deploy_vm_from_iso(self):
             domainid=self.account.domainid,
             zoneid=self.zone.id
         )
+        self.cleanup.append(self.iso)
+
+        self.debug("ISO created with ID: %s" % self.iso.id)
+
+        list_iso_response = Iso.list(
+            self.apiclient,
+            id=self.iso.id
+        )
+        self.assertEqual(
+            isinstance(list_iso_response, list),
+            True,
+            "Check list response returns a valid list"
+        )

Review Comment:
   ```suggestion
   
           self.debug("ISO created with ID: %s" % self.iso.id)
   ```



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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4407758917

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=13136) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=13136&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=13136&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=13136&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=13136&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=13136&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=13136)
   
   


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4680270225

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  no SystemVM templates. 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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4407369893

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. 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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4499399785

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


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#discussion_r3302848906


##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -149,9 +143,35 @@ def test_deploy_vm_from_iso(self):
             diskofferingid=self.disk_offering.id,
             hypervisor=self.hypervisor
         )
+        self.cleanup.append(self.virtual_machine)
+
+        self.debug("VM created with ID: %s" % self.virtual_machine.id)
+
+        list_vm_response = VirtualMachine.list(
+            self.apiclient,
+            id=self.virtual_machine.id
+        )
 
-        response = self.virtual_machine.getState(
+        self.assertEqual(
+            isinstance(list_vm_response, list),
+            True,
+            "Check list response returns a valid list"
+        )
+        vm_response = list_vm_response[0]
+        vm_state = self.virtual_machine.getState(
             self.apiclient,
-            VirtualMachine.RUNNING)
-        self.assertEqual(response[0], PASS, response[1])
+            VirtualMachine.RUNNING
+        )
+
+        self.assertEqual(
+            vm_state,
+            VirtualMachine.RUNNING,
+            "Check virtual machine is in running state"
+        )

Review Comment:
   ```suggestion
          response = self.virtual_machine.getState(
               self.apiclient,
               VirtualMachine.RUNNING)
           self.assertEqual(response[0], PASS, response[1])
   ```



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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4407025503

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


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4406700391

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. 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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4407355329

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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4485292746

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


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4680288595

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=13136) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=13136&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=13136&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=13136&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=13136&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=13136&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=13136)
   
   


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4440955193

   <b>[SF] Trillian Build Failed (tid-16089)<b/>


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4543611432

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=13136) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=13136&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=13136&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=13136&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=13136&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=13136&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=13136)
   
   


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4499373730

   @blueorangutan test keepEnv


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4680265218

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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4858936105

   > verified, let’s merge @weizhouapache ???
   
   yes @DaanHoogland 


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4407725843

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


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4545647052

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


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4545633988

   @blueorangutan test keepEnv


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4543054118

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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#discussion_r3305063361


##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -149,9 +142,34 @@ def test_deploy_vm_from_iso(self):
             diskofferingid=self.disk_offering.id,
             hypervisor=self.hypervisor
         )
+        self.cleanup.append(self.virtual_machine)
+
+        self.debug("VM created with ID: %s" % self.virtual_machine.id)
+
+        list_vm_response = VirtualMachine.list(
+            self.apiclient,
+            id=self.virtual_machine.id
+        )
 
-        response = self.virtual_machine.getState(
+        self.assertEqual(
+            isinstance(list_vm_response, list),
+            True,
+            "Check list response returns a valid list"
+        )
+        vm_response = list_vm_response[0]
+        vm_state = self.virtual_machine.getState(
+            self.apiclient,
+            VirtualMachine.RUNNING
+        )
+
+       response = self.virtual_machine.getState(
             self.apiclient,
             VirtualMachine.RUNNING)
         self.assertEqual(response[0], PASS, response[1])
+

Review Comment:
   Line 165 is mis-indented (`response = ...` starts one space earlier than the surrounding block), which will raise an `IndentationError` and prevent this test module from importing/running. Also `getState()` is called twice (once assigned to `vm_state` but never used). Please fix the indentation and keep a single `getState()` call, asserting on its result.
   



##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -129,16 +110,28 @@ def test_deploy_vm_from_iso(self):
             domainid=self.account.domainid,
             zoneid=self.zone.id
         )
+        self.cleanup.append(self.iso)
+
+        self.debug("ISO created with ID: %s" % self.iso.id)
+        list_iso_response = Iso.list(
+            self.apiclient,
+            id=self.iso.id
+        )
+        while not isinstance(list_iso_response, list):
+            list_iso_response = Iso.list(
+                self.apiclient,
+                id=self.iso.id
+            )

Review Comment:
   The `while not isinstance(list_iso_response, list): ...` loop can spin indefinitely (and at 100% CPU) if `Iso.list()` keeps returning `None` (common when the resource isn't visible yet) and there is no sleep/timeout. Since `list_iso_response` isn't used afterwards, consider removing this polling; otherwise, poll `isready`/availability with a bounded timeout and `time.sleep()` between attempts.
   



##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -149,9 +142,34 @@ def test_deploy_vm_from_iso(self):
             diskofferingid=self.disk_offering.id,
             hypervisor=self.hypervisor
         )
+        self.cleanup.append(self.virtual_machine)
+
+        self.debug("VM created with ID: %s" % self.virtual_machine.id)
+
+        list_vm_response = VirtualMachine.list(
+            self.apiclient,
+            id=self.virtual_machine.id
+        )
 
-        response = self.virtual_machine.getState(
+        self.assertEqual(
+            isinstance(list_vm_response, list),
+            True,
+            "Check list response returns a valid list"
+        )

Review Comment:
   After asserting `list_vm_response` is a list, the code immediately indexes `[0]` without verifying it’s non-empty. `VirtualMachine.list(..., id=...)` can return an empty list transiently; this would raise `IndexError` and make the test flaky. Add an assertion that `len(list_vm_response) != 0` (or retry with timeout) before accessing the first element.
   



##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -92,35 +84,24 @@ def setUp(self):
         self.cleanup = [self.account]
         return
 
-    def tearDown(self):
-        try:
-            self.debug("Cleaning up the resources")
-            cleanup_resources(self.apiclient, self.cleanup)
-            self.debug("Cleanup complete!")
-        except Exception as e:
-            self.debug("Warning! Exception in tearDown: %s" % e)
-
     @attr(
         tags=[
             "advanced",
             "eip",
             "advancedns",
             "basic",
-            "sg"],
-        required_hardware="true")
+            "sg"
+        ],
+        required_hardware="true"
+    )
     def test_deploy_vm_from_iso(self):
         """Test Deploy Virtual Machine from ISO
         """
 
         # Validate the following:
-        # 1. deploy VM using ISO
-        # 2. listVM command should return the deployed VM. State of this VM
-        #    should be "Running".
-        self.hypervisor = self.testClient.getHypervisorInfo()
-        if self.hypervisor.lower() in ['lxc']:
-            self.skipTest(
-                "vm deploy from ISO feature is not supported on %s" %
-                self.hypervisor.lower())
+        # 1. Create an ISO
+        # 2. Deploy a VM from the ISO
+        # 3. VM should be in 'Running' state
 
         self.iso = Iso.create(

Review Comment:
   The previous LXC hypervisor guard was removed. Other integration tests still skip ISO-based VM deployment on LXC (e.g. `test_stopped_vm.py`), and attempting this on LXC is expected to fail. Please restore the `if self.hypervisor.lower() in ['lxc']:` + `self.skipTest(...)` check here to keep the test suite portable across hypervisors.



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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4846994101

   > @DaanHoogland 
   > any more work needed ?
   
   No, would be good, but not sure if it was verified that the test data was indeed cleaned. It has been long time 😞


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4485289374

   @blueorangutan test


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#discussion_r3302628423


##########
test/integration/smoke/test_deploy_vm_iso.py:
##########
@@ -129,16 +110,29 @@ def test_deploy_vm_from_iso(self):
             domainid=self.account.domainid,
             zoneid=self.zone.id
         )
+        self.cleanup.append(self.iso)
+
+        self.debug("ISO created with ID: %s" % self.iso.id)
+
+        list_iso_response = Iso.list(
+            self.apiclient,
+            id=self.iso.id
+        )
+        self.assertEqual(
+            isinstance(list_iso_response, list),
+            True,
+            "Check list response returns a valid list"
+        )

Review Comment:
   ```suggestion
           self.cleanup.append(self.iso)
   
           self.debug("ISO created with ID: %s" % self.iso.id)
           list_iso_response = Iso.list(
               self.apiclient,
               id=self.iso.id
           )
           while not isinstance(list_iso_response, list):
               list_iso_response = Iso.list(
                   self.apiclient,
                   id=self.iso.id
               )
   ```



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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4543521972

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


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4406681831

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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache merged PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4680665714

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


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4689248113

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


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4523736064

   <b>[SF] Trillian test result (tid-16162)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 54290 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13136-t16162-kvm-ol8.zip
   Smoke tests completed. 149 look OK, 2 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_deploy_vm_from_iso | `Failure` | 5.01 | test_deploy_vm_iso.py
   test_deploy_vm_from_iso | `Error` | 5.02 | test_deploy_vm_iso.py
   test_hostha_enable_ha_when_host_in_maintenance | `Error` | 306.88 | test_hostha_kvm.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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4440888550

   @blueorangutan test


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4406505994

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/13136?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 3.51%. Comparing base ([`72b99a3`](https://app.codecov.io/gh/apache/cloudstack/commit/72b99a3f8ce2265d51dd42526afaf1b399f378f3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b1ed1a5`](https://app.codecov.io/gh/apache/cloudstack/commit/b1ed1a5c4fc65ac3408f986f86361a729402eca2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   > :exclamation:  There is a different number of reports uploaded between BASE (72b99a3) and HEAD (b1ed1a5). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (72b99a3) | HEAD (b1ed1a5) |
   >|------|------|------|
   >|unittests|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               main   #13136       +/-   ##
   =============================================
   - Coverage     18.08%    3.51%   -14.58%     
   =============================================
     Files          6037      464     -5573     
     Lines        542546    40154   -502392     
     Branches      66432     7559    -58873     
   =============================================
   - Hits          98146     1413    -96733     
   + Misses       433378    38551   -394827     
   + Partials      11022      190    -10832     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/13136/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/13136/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.51% <ø> (ø)` | |
   | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/13136/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   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.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/13136?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4509207384

   <b>[SF] Trillian test result (tid-16128)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 82440 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13136-t16128-kvm-ol8.zip
   Smoke tests completed. 143 look OK, 8 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_vm_backup_create_vm_from_backup | `Failure` | 607.98 | test_backup_recovery_nas.py
   test_vm_backup_lifecycle | `Error` | 1.17 | test_backup_recovery_nas.py
   test_deploy_vm_from_iso | `Failure` | 4.86 | test_deploy_vm_iso.py
   test_deploy_vm_from_iso | `Error` | 4.87 | test_deploy_vm_iso.py
   test_08_arping_in_ssvm | `Failure` | 5.28 | test_diagnostics.py
   test_isolate_network_password_server | `Failure` | 13.70 | test_password_server.py
   ContextSuite context=TestSharedFSLifecycle>:setup | `Error` | 0.00 | test_sharedfs_lifecycle.py
   test_10_attachAndDetach_iso | `Failure` | 607.29 | test_vm_life_cycle.py
   test_01_create_vm_snapshots | `Failure` | 606.77 | test_vm_snapshots.py
   test_02_revert_vm_snapshots | `Failure` | 600.78 | test_vm_snapshots.py
   test_03_delete_vm_snapshots | `Failure` | 0.18 | test_vm_snapshots.py
   test_01_create_volume | `Failure` | 612.28 | test_volumes.py
   test_01_root_volume_encryption | `Failure` | 706.18 | test_volumes.py
   test_02_data_volume_encryption | `Failure` | 645.21 | test_volumes.py
   test_03_root_and_data_volume_encryption | `Failure` | 664.12 | test_volumes.py
   test_02_attach_volume | `Failure` | 1273.14 | test_volumes.py
   test_02_attach_volume | `Failure` | 1273.16 | test_volumes.py
   test_03_download_attached_volume | `Failure` | 663.23 | test_volumes.py
   test_04_delete_attached_volume | `Failure` | 666.58 | test_volumes.py
   test_05_detach_volume | `Failure` | 753.61 | test_volumes.py
   test_06_download_detached_volume | `Failure` | 879.78 | test_volumes.py
   test_07_resize_fail | `Failure` | 664.43 | test_volumes.py
   test_08_resize_volume | `Failure` | 670.27 | test_volumes.py
   test_09_delete_detached_volume | `Failure` | 665.26 | test_volumes.py
   test_10_list_volumes | `Failure` | 663.74 | test_volumes.py
   test_11_attach_volume_with_unstarted_vm | `Failure` | 766.60 | test_volumes.py
   test_12_resize_volume_with_only_size_parameter | `Failure` | 669.89 | test_volumes.py
   test_13_migrate_volume_and_change_offering | `Failure` | 806.51 | test_volumes.py
   test_14_delete_volume_delete_protection | `Failure` | 665.63 | 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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4551927612

   <b>[SF] Trillian test result (tid-16185)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 50426 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13136-t16185-kvm-ol8.zip
   Smoke tests completed. 150 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   runTest | `Error` | 0.00 | test_deploy_vm_iso.py
   runTest | `Error` | 0.00 | test_deploy_vm_iso.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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4696442275

   <b>[SF] Trillian test result (tid-16297)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 49930 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13136-t16297-kvm-ol8.zip
   Smoke tests completed. 151 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-4843200066

   @DaanHoogland 
   any more work needed ?


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


Re: [PR] test: cleanup resources in test_deploy_vm_iso, use base class tearDown [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13136:
URL: https://github.com/apache/cloudstack/pull/13136#issuecomment-5462613192

   @blueorangutan sweep


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