Commit 3909e93
committed
evacuate: respect original SHUTOFF state in --wait completion
When running `openstack server evacuate --wait`, the command would hang
indefinitely if the instance was originally in SHUTOFF state, because
only “ACTIVE” was treated as a successful completion. We now capture
the server’s status before evacuation and dynamically include
“SHUTOFF” in the `success_status` list if the instance was already
shut off. This ensures that a shutoff instance is accepted as a valid
completion without requiring manual intervention.
Unit tests have been added and updated to cover both:
- pre-evacuation ACTIVE → success_status=['active']
- pre-evacuation SHUTOFF → success_status=['active','shutoff']
Closes-Bug: #2103426
Change-Id: I86ad1cd173a144b16fde1dbac87819fab2d7a50a1 parent a49a290 commit 3909e93
File tree
2 files changed
+34
-0
lines changed- openstackclient
- compute/v2
- tests/unit/compute/v2
2 files changed
+34
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3879 | 3879 | | |
3880 | 3880 | | |
3881 | 3881 | | |
| 3882 | + | |
| 3883 | + | |
| 3884 | + | |
| 3885 | + | |
| 3886 | + | |
3882 | 3887 | | |
3883 | 3888 | | |
3884 | 3889 | | |
| 3890 | + | |
3885 | 3891 | | |
3886 | 3892 | | |
3887 | 3893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7000 | 7000 | | |
7001 | 7001 | | |
7002 | 7002 | | |
| 7003 | + | |
7003 | 7004 | | |
7004 | 7005 | | |
7005 | 7006 | | |
| |||
7137 | 7138 | | |
7138 | 7139 | | |
7139 | 7140 | | |
| 7141 | + | |
| 7142 | + | |
| 7143 | + | |
| 7144 | + | |
| 7145 | + | |
| 7146 | + | |
| 7147 | + | |
| 7148 | + | |
| 7149 | + | |
| 7150 | + | |
| 7151 | + | |
| 7152 | + | |
| 7153 | + | |
| 7154 | + | |
| 7155 | + | |
| 7156 | + | |
| 7157 | + | |
| 7158 | + | |
| 7159 | + | |
| 7160 | + | |
| 7161 | + | |
| 7162 | + | |
| 7163 | + | |
| 7164 | + | |
| 7165 | + | |
| 7166 | + | |
| 7167 | + | |
7140 | 7168 | | |
7141 | 7169 | | |
7142 | 7170 | | |
| |||
0 commit comments