You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "vishesh92 (via GitHub)" <gi...@apache.org> on 2026/03/13 09:07:29 UTC

[PR] Fix xcpng test failures [cloudstack]

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

   ### Description
   
   This PR fixes xcpng test failures
   <!--- 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] Fix xcpng test failures [cloudstack]

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

   @DaanHoogland a [SL] Trillian-Jenkins test job (ol9 mgmt + xcpng83) 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] Fix xcpng test failures [cloudstack]

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

   <b>[SF] Trillian test result (tid-15657)</b>
   Environment: xcpng83 (x2), zone: Advanced Networking with Mgmt server ol9
   Total time taken: 61254 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12812-t15657-xcpng83.zip
   Smoke tests completed. 140 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestClusterDRS>:setup | `Error` | 0.00 | test_cluster_drs.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] Fix xcpng test failures [cloudstack]

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

   <b>[SF] Trillian test result (tid-15650)</b>
   Environment: xcpng82 (x2), zone: Advanced Networking with Mgmt server ol9
   Total time taken: 68813 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12812-t15650-xcpng82.zip
   Smoke tests completed. 140 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_volume_usage | `Failure` | 97.86 | test_usage.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] Fix xcpng test failures [cloudstack]

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


-- 
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] Fix xcpng test failures [cloudstack]

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

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/12812?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 4.15%. Comparing base ([`56dc119`](https://app.codecov.io/gh/apache/cloudstack/commit/56dc11980f6081fc8ce860c102aec1f474493625?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7ea21ab`](https://app.codecov.io/gh/apache/cloudstack/commit/7ea21ab2c1ee863c15598dd939d23d45980c0cb6?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 (56dc119) and HEAD (7ea21ab). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (56dc119) | HEAD (7ea21ab) |
   >|------|------|------|
   >|unittests|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               4.20   #12812       +/-   ##
   =============================================
   - Coverage     16.25%    4.15%   -12.11%     
   =============================================
     Files          5662      404     -5258     
     Lines        500167    32966   -467201     
     Branches      60740     5893    -54847     
   =============================================
   - Hits          81318     1370    -79948     
   + Misses       409763    31420   -378343     
   + Partials       9086      176     -8910     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/12812/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/12812/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.15% <ø> (ø)` | |
   | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/12812/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/12812?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] Fix xcpng test failures [cloudstack]

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

   @blueorangutan test ol9 xcpng83


-- 
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] Fix xcpng test failures [cloudstack]

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

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


-- 
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] Fix xcpng test failures [cloudstack]

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


##########
test/integration/component/maint/test_redundant_router_deployment_planning.py:
##########
@@ -636,142 +638,144 @@ def test_RvR_multiprimarystorage(self):
             self.apiclient.updateCluster(cmd)
             self.debug("Enabled first cluster for testing..")
 
-        # Creating network using the network offering created
-        self.debug("Creating network with network offering: %s" %
-                                                    self.network_offering.id)
-        network = Network.create(
-                                self.apiclient,
-                                self.services["network"],
-                                accountid=self.account.name,
-                                domainid=self.account.domainid,
-                                networkofferingid=self.network_offering.id,
-                                zoneid=self.zone.id
-                                )
-        self.debug("Created network with ID: %s" % network.id)
-
-        networks = Network.list(
-                                self.apiclient,
-                                id=network.id,
-                                listall=True
-                                )
-        self.assertEqual(
-            isinstance(networks, list),
-            True,
-            "List networks should return a valid response for created network"
-             )
-        nw_response = networks[0]
-
-        self.debug("Network state: %s" % nw_response.state)
-        self.assertEqual(
-                    nw_response.state,
-                    "Allocated",
-                    "The network should be in allocated state after creation"
-                    )
-
-        self.debug("Listing routers for network: %s" % network.name)
-        routers = Router.list(
-                              self.apiclient,
-                              networkid=network.id,
-                              listall=True
-                              )
-        self.assertEqual(
-            routers,
-            None,
-            "Routers should not be spawned when network is in allocated state"
-            )
-
-        self.debug("Retrieving the list of hosts in the cluster")
-        hosts = Host.list(
-                          self.apiclient,
-                          clusterid=enabled_cluster.id,
-                          listall=True
-                          )
-        self.assertEqual(
-                         isinstance(hosts, list),
-                         True,
-                         "List hosts should not return an empty response"
-                         )
-        host = hosts[0]
-
-        self.debug("Deploying VM in account: %s" % self.account.name)
-
-        # Spawn an instance in that network
-        virtual_machine = VirtualMachine.create(
-                                  self.apiclient,
-                                  self.services["virtual_machine"],
-                                  accountid=self.account.name,
-                                  domainid=self.account.domainid,
-                                  serviceofferingid=self.service_offering.id,
-                                  networkids=[str(network.id)],
-                                  hostid=host.id
-                                  )
-        self.debug("Deployed VM in network: %s" % network.id)
+        try:
+            # Creating network using the network offering created
+            self.debug("Creating network with network offering: %s" %
+                                                        self.network_offering.id)
+            network = Network.create(
+                                    self.apiclient,
+                                    self.services["network"],
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
+                                    networkofferingid=self.network_offering.id,
+                                    zoneid=self.zone.id
+                                    )
+            self.debug("Created network with ID: %s" % network.id)
+
+            networks = Network.list(
+                                    self.apiclient,
+                                    id=network.id,
+                                    listall=True
+                                    )
+            self.assertEqual(
+                isinstance(networks, list),
+                True,
+                "List networks should return a valid response for created network"
+                 )
+            nw_response = networks[0]
+
+            self.debug("Network state: %s" % nw_response.state)
+            self.assertEqual(
+                        nw_response.state,
+                        "Allocated",
+                        "The network should be in allocated state after creation"
+                        )
 
-        vms = VirtualMachine.list(
+            self.debug("Listing routers for network: %s" % network.name)
+            routers = Router.list(
                                   self.apiclient,
-                                  id=virtual_machine.id,
+                                  networkid=network.id,
                                   listall=True
                                   )
-        self.assertEqual(
-                         isinstance(vms, list),
-                         True,
-                         "List Vms should return a valid list"
-                         )
-        vm = vms[0]
-        self.assertEqual(
-                         vm.state,
-                         "Running",
-                         "Vm should be in running state after deployment"
-                         )
-
-        self.debug("Listing routers for network: %s" % network.name)
-        routers = Router.list(
+            self.assertEqual(
+                routers,
+                None,
+                "Routers should not be spawned when network is in allocated state"
+                )
+
+            self.debug("Retrieving the list of hosts in the cluster")
+            hosts = Host.list(
                               self.apiclient,
-                              networkid=network.id,
+                              clusterid=enabled_cluster.id,
                               listall=True
                               )
-        self.assertEqual(
-                    isinstance(routers, list),
-                    True,
-                    "list router should return Primary and backup routers"
-                    )
-        self.assertEqual(
-                    len(routers),
-                    2,
-                    "Length of the list router should be 2 (Backup & Primary)"
-                    )
-        self.assertNotEqual(
-                    routers[0].hostid,
-                    routers[1].hostid,
-                    "Both the routers should be in different storage pools"
-                            )
-        self.debug("Enabling remaining pods if any..")
-        pods = Pod.list(
-                        self.apiclient,
-                        zoneid=self.zone.id,
-                        listall=True,
-                        allocationstate="Disabled"
+            self.assertEqual(
+                             isinstance(hosts, list),
+                             True,
+                             "List hosts should not return an empty response"
+                             )
+            host = hosts[0]
+
+            self.debug("Deploying VM in account: %s" % self.account.name)
+
+            # Spawn an instance in that network
+            virtual_machine = VirtualMachine.create(
+                                      self.apiclient,
+                                      self.services["virtual_machine"],
+                                      accountid=self.account.name,
+                                      domainid=self.account.domainid,
+                                      serviceofferingid=self.service_offering.id,
+                                      networkids=[str(network.id)],
+                                      hostid=host.id
+                                      )
+            self.debug("Deployed VM in network: %s" % network.id)
+
+            vms = VirtualMachine.list(
+                                      self.apiclient,
+                                      id=virtual_machine.id,
+                                      listall=True
+                                      )
+            self.assertEqual(
+                             isinstance(vms, list),
+                             True,
+                             "List Vms should return a valid list"
+                             )
+            vm = vms[0]
+            self.assertEqual(
+                             vm.state,
+                             "Running",
+                             "Vm should be in running state after deployment"
+                             )
+
+            self.debug("Listing routers for network: %s" % network.name)
+            routers = Router.list(
+                                  self.apiclient,
+                                  networkid=network.id,
+                                  listall=True
+                                  )
+            self.assertEqual(
+                        isinstance(routers, list),
+                        True,
+                        "list router should return Primary and backup routers"
                         )
-        if pods is not None:
-            for pod in pods:
-                cmd = updatePod.updatePodCmd()
-                cmd.id = pod.id
-                cmd.allocationstate = 'Enabled'
-                self.apiclient.updatePod(cmd)
-
-        clusters = Cluster.list(
-                                self.apiclient,
-                                allocationstate="Disabled",
-                                podid=enabled_pod.id,
-                                listall=True
+            self.assertEqual(
+                        len(routers),
+                        2,
+                        "Length of the list router should be 2 (Backup & Primary)"
+                        )
+            self.assertNotEqual(
+                        routers[0].hostid,
+                        routers[1].hostid,
+                        "Both the routers should be in different storage pools"
                                 )
-
-        if clusters is not None:
-            for cluster in clusters:
-                    cmd = updateCluster.updateClusterCmd()
-                    cmd.id = cluster.id
+        finally:
+            self.debug("Enabling remaining pods if any..")
+            pods = Pod.list(
+                            self.apiclient,
+                            zoneid=self.zone.id,
+                            listall=True,
+                            allocationstate="Disabled"
+                            )
+            if pods is not None:
+                for pod in pods:
+                    cmd = updatePod.updatePodCmd()
+                    cmd.id = pod.id
                     cmd.allocationstate = 'Enabled'
-                    self.apiclient.updateCluster(cmd)
+                    self.apiclient.updatePod(cmd)
+
+            clusters = Cluster.list(
+                                    self.apiclient,
+                                    allocationstate="Disabled",
+                                    podid=enabled_pod.id,
+                                    listall=True
+                                    )
+
+            if clusters is not None:
+                for cluster in clusters:
+                        cmd = updateCluster.updateClusterCmd()
+                        cmd.id = cluster.id
+                        cmd.allocationstate = 'Enabled'
+                        self.apiclient.updateCluster(cmd)

Review Comment:
   The loop body under `for cluster in clusters:` is over-indented, which hurts readability and can violate Python style/linting (even if it still executes). Align the indentation of lines 775–778 to a single level inside the `for` block.
   



##########
test/integration/component/maint/test_redundant_router_deployment_planning.py:
##########
@@ -636,142 +638,144 @@ def test_RvR_multiprimarystorage(self):
             self.apiclient.updateCluster(cmd)
             self.debug("Enabled first cluster for testing..")
 
-        # Creating network using the network offering created
-        self.debug("Creating network with network offering: %s" %
-                                                    self.network_offering.id)
-        network = Network.create(
-                                self.apiclient,
-                                self.services["network"],
-                                accountid=self.account.name,
-                                domainid=self.account.domainid,
-                                networkofferingid=self.network_offering.id,
-                                zoneid=self.zone.id
-                                )
-        self.debug("Created network with ID: %s" % network.id)
-
-        networks = Network.list(
-                                self.apiclient,
-                                id=network.id,
-                                listall=True
-                                )
-        self.assertEqual(
-            isinstance(networks, list),
-            True,
-            "List networks should return a valid response for created network"
-             )
-        nw_response = networks[0]
-
-        self.debug("Network state: %s" % nw_response.state)
-        self.assertEqual(
-                    nw_response.state,
-                    "Allocated",
-                    "The network should be in allocated state after creation"
-                    )
-
-        self.debug("Listing routers for network: %s" % network.name)
-        routers = Router.list(
-                              self.apiclient,
-                              networkid=network.id,
-                              listall=True
-                              )
-        self.assertEqual(
-            routers,
-            None,
-            "Routers should not be spawned when network is in allocated state"
-            )
-
-        self.debug("Retrieving the list of hosts in the cluster")
-        hosts = Host.list(
-                          self.apiclient,
-                          clusterid=enabled_cluster.id,
-                          listall=True
-                          )
-        self.assertEqual(
-                         isinstance(hosts, list),
-                         True,
-                         "List hosts should not return an empty response"
-                         )
-        host = hosts[0]
-
-        self.debug("Deploying VM in account: %s" % self.account.name)
-
-        # Spawn an instance in that network
-        virtual_machine = VirtualMachine.create(
-                                  self.apiclient,
-                                  self.services["virtual_machine"],
-                                  accountid=self.account.name,
-                                  domainid=self.account.domainid,
-                                  serviceofferingid=self.service_offering.id,
-                                  networkids=[str(network.id)],
-                                  hostid=host.id
-                                  )
-        self.debug("Deployed VM in network: %s" % network.id)
+        try:
+            # Creating network using the network offering created
+            self.debug("Creating network with network offering: %s" %
+                                                        self.network_offering.id)
+            network = Network.create(
+                                    self.apiclient,
+                                    self.services["network"],
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
+                                    networkofferingid=self.network_offering.id,
+                                    zoneid=self.zone.id
+                                    )
+            self.debug("Created network with ID: %s" % network.id)
+
+            networks = Network.list(
+                                    self.apiclient,
+                                    id=network.id,
+                                    listall=True
+                                    )
+            self.assertEqual(
+                isinstance(networks, list),
+                True,
+                "List networks should return a valid response for created network"
+                 )
+            nw_response = networks[0]
+
+            self.debug("Network state: %s" % nw_response.state)
+            self.assertEqual(
+                        nw_response.state,
+                        "Allocated",
+                        "The network should be in allocated state after creation"
+                        )
 
-        vms = VirtualMachine.list(
+            self.debug("Listing routers for network: %s" % network.name)
+            routers = Router.list(
                                   self.apiclient,
-                                  id=virtual_machine.id,
+                                  networkid=network.id,
                                   listall=True
                                   )
-        self.assertEqual(
-                         isinstance(vms, list),
-                         True,
-                         "List Vms should return a valid list"
-                         )
-        vm = vms[0]
-        self.assertEqual(
-                         vm.state,
-                         "Running",
-                         "Vm should be in running state after deployment"
-                         )
-
-        self.debug("Listing routers for network: %s" % network.name)
-        routers = Router.list(
+            self.assertEqual(
+                routers,
+                None,
+                "Routers should not be spawned when network is in allocated state"
+                )
+
+            self.debug("Retrieving the list of hosts in the cluster")
+            hosts = Host.list(
                               self.apiclient,
-                              networkid=network.id,
+                              clusterid=enabled_cluster.id,
                               listall=True
                               )
-        self.assertEqual(
-                    isinstance(routers, list),
-                    True,
-                    "list router should return Primary and backup routers"
-                    )
-        self.assertEqual(
-                    len(routers),
-                    2,
-                    "Length of the list router should be 2 (Backup & Primary)"
-                    )
-        self.assertNotEqual(
-                    routers[0].hostid,
-                    routers[1].hostid,
-                    "Both the routers should be in different storage pools"
-                            )
-        self.debug("Enabling remaining pods if any..")
-        pods = Pod.list(
-                        self.apiclient,
-                        zoneid=self.zone.id,
-                        listall=True,
-                        allocationstate="Disabled"
+            self.assertEqual(
+                             isinstance(hosts, list),
+                             True,
+                             "List hosts should not return an empty response"
+                             )
+            host = hosts[0]
+
+            self.debug("Deploying VM in account: %s" % self.account.name)
+
+            # Spawn an instance in that network
+            virtual_machine = VirtualMachine.create(
+                                      self.apiclient,
+                                      self.services["virtual_machine"],
+                                      accountid=self.account.name,
+                                      domainid=self.account.domainid,
+                                      serviceofferingid=self.service_offering.id,
+                                      networkids=[str(network.id)],
+                                      hostid=host.id
+                                      )
+            self.debug("Deployed VM in network: %s" % network.id)
+
+            vms = VirtualMachine.list(
+                                      self.apiclient,
+                                      id=virtual_machine.id,
+                                      listall=True
+                                      )
+            self.assertEqual(
+                             isinstance(vms, list),
+                             True,
+                             "List Vms should return a valid list"
+                             )
+            vm = vms[0]
+            self.assertEqual(
+                             vm.state,
+                             "Running",
+                             "Vm should be in running state after deployment"
+                             )
+
+            self.debug("Listing routers for network: %s" % network.name)
+            routers = Router.list(
+                                  self.apiclient,
+                                  networkid=network.id,
+                                  listall=True
+                                  )
+            self.assertEqual(
+                        isinstance(routers, list),
+                        True,
+                        "list router should return Primary and backup routers"
                         )
-        if pods is not None:
-            for pod in pods:
-                cmd = updatePod.updatePodCmd()
-                cmd.id = pod.id
-                cmd.allocationstate = 'Enabled'
-                self.apiclient.updatePod(cmd)
-
-        clusters = Cluster.list(
-                                self.apiclient,
-                                allocationstate="Disabled",
-                                podid=enabled_pod.id,
-                                listall=True
+            self.assertEqual(
+                        len(routers),
+                        2,
+                        "Length of the list router should be 2 (Backup & Primary)"
+                        )
+            self.assertNotEqual(
+                        routers[0].hostid,
+                        routers[1].hostid,
+                        "Both the routers should be in different storage pools"

Review Comment:
   The assertion compares `hostid` values, but the failure message claims the routers should be in different *storage pools*. Either update the message to reflect the actual check (different hosts), or change the assertion to compare the appropriate storage/pool identifier field if that’s the intent.
   



##########
test/integration/smoke/test_public_ip_range.py:
##########
@@ -286,20 +286,22 @@ def base_system_vm(self, services, systemvmtype):
         cmd.allocationstate = 'Disabled'
         self.apiclient.updateZone(cmd)
 
-        # Delete System VM and IP range, so System VM can get IP from original ranges
-        self.debug("Destroying System VM: %s" % systemvm_id)
-        cmd = destroySystemVm.destroySystemVmCmd()
-        cmd.id = systemvm_id
-        self.apiclient.destroySystemVm(cmd)
-
-        domain_id = self.public_ip_range.vlan.domainid
-        self.public_ip_range.delete(self.apiclient)
-
-        # Enable Zone
-        cmd = updateZone.updateZoneCmd()
-        cmd.id = self.zone.id
-        cmd.allocationstate = 'Enabled'
-        self.apiclient.updateZone(cmd)
+        try:
+            # Delete System VM and IP range, so System VM can get IP from original ranges
+            self.debug("Destroying System VM: %s" % systemvm_id)
+            cmd = destroySystemVm.destroySystemVmCmd()
+            cmd.id = systemvm_id
+            self.apiclient.destroySystemVm(cmd)
+
+            domain_id = self.public_ip_range.vlan.domainid
+            self.public_ip_range.delete(self.apiclient)
+
+        finally:
+            # Enable Zone
+            cmd = updateZone.updateZoneCmd()
+            cmd.id = self.zone.id
+            cmd.allocationstate = 'Enabled'
+            self.apiclient.updateZone(cmd)

Review Comment:
   As written, an exception in the `finally` clean-up (e.g., `updateZone`) can mask the original test failure/exception from the `try` block. Consider making the clean-up best-effort (catch/log exceptions in `finally`) or preserving the original exception (store it, attempt cleanup, then re-raise the original) so failures remain actionable.
   



-- 
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] Fix xcpng test failures [cloudstack]

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

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


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