Browse Source

Use status_timeout when starting a partition

We now specify the status timeout when starting a partition. The
zhmcclient will wait that amount of seconds for the partition
to become active (or another valid start status).

Without explicitly setting it, the zhmcclient will wait for 900 seconds.

In the past we waited that 900 seconds + the 60 extra seconds, as we
were calling partition.wait_for_completion right after the start of
the partition again.

Change-Id: I483efc5808c1a91993dbde936c27b82302640f9e
Andreas Scheuring 1 year ago
parent
commit
8dfa83747d
1 changed files with 2 additions and 9 deletions
  1. 2
    9
      nova_dpm/virt/dpm/vm.py

+ 2
- 9
nova_dpm/virt/dpm/vm.py View File

@@ -406,9 +406,7 @@ class PartitionInstance(object):
406 406
                 status=utils.PartitionState.STOPPED, status_timeout=60)
407 407
 
408 408
         if self.partition.get_property('status') not in STARTED_STATUSES:
409
-            self.partition.start(True)
410
-            self.partition.wait_for_status(
411
-                status=STARTED_STATUSES, status_timeout=60)
409
+            self.partition.start(True, status_timeout=STATUS_TIMEOUT)
412 410
 
413 411
     def _ensure_status_transitioned(self):
414 412
         partition_state = self.partition.get_property('status')
@@ -438,12 +436,7 @@ class PartitionInstance(object):
438 436
             status=utils.PartitionState.STOPPED,
439 437
             status_timeout=STATUS_TIMEOUT)
440 438
 
441
-        self.partition.start(True)
442
-        # TODO(preethipy): The below method to be removed once the bug
443
-        # on DPM(701894) is fixed to return correct status on API return
444
-        self.partition.wait_for_status(
445
-            status=utils.PartitionState.RUNNING,
446
-            status_timeout=STATUS_TIMEOUT)
439
+        self.partition.start(True, status_timeout=STATUS_TIMEOUT)
447 440
 
448 441
     def get_partition(self):
449 442
         """Get the zhmcclient partition object for this PartitionInstance

Loading…
Cancel
Save