unable to update a non-healthy nova keypair
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
huangtianhua |
Bug Description
Updating will not work well when a key pair will be marked as unhealthy.
In the following scenario I first try an update to make sure that updating works, then I marked as unhealthy and retried updating.
(Mitaka)
$ heat --version
1.2.0
I trimmed the outputs below...
$ cat templates/
heat_template_
parameters:
key_name:
type: string
default: heat_key_test
key_save:
type: string
default: false
resources:
KeyPair:
type: OS::Nova::KeyPair
properties:
name: { get_param: key_name }
save_
outputs:
PublicKey:
value: { get_attr: [KeyPair, public_key] }
PrivateKey:
value: { get_attr: [KeyPair, private_key] }
$ heat stack-create -f templates/
| id | stack_name | stack_status | creation_time | updated_time |
| 8ee2b931-
[stack@undercloud ~]$ heat stack-list
| id | stack_name | stack_status | creation_time | updated_time |
| 8ee2b931-
[stack@undercloud ~]$ heat stack-update -f templates/
| id | stack_name | stack_status | creation_time | updated_time |
| 8ee2b931-
[stack@undercloud ~]$ heat stack-list
| id | stack_name | stack_status | creation_time | updated_time |
| 8ee2b931-
[stack@undercloud ~]$ heat resource-
[stack@undercloud ~]$ heat stack-list
| id | stack_name | stack_status | creation_time | updated_time |
| 8ee2b931-
[stack@undercloud ~]$ heat resource-list test0
| resource_name | physical_
| KeyPair | heat_key_test | OS::Nova::KeyPair | CHECK_FAILED | 2016-06-30T04:35:25 |
[stack@undercloud ~]$ heat stack-update -f templates/
| id | stack_name | stack_status | creation_time | updated_time |
| 8ee2b931-
[stack@undercloud ~]$ heat resource-list test0
| resource_name | physical_
| KeyPair | | OS::Nova::KeyPair | CREATE_FAILED | 2016-06-30T04:36:41 |
[stack@undercloud ~]$ heat stack-list
| id | stack_name | stack_status | creation_time | updated_time |
| 8ee2b931-
$ heat stack-show test0
| stack_status | UPDATE_FAILED |
| stack_status_reason | Conflict: resources.KeyPair: Key pair 'heat_key_test' |
| | already exists. (HTTP 409) (Request-ID: req- |
| | 2011c328-
| stack_user_
Changed in heat: | |
assignee: | nobody → huangtianhua (huangtianhua) |
Changed in heat: | |
importance: | Undecided → Medium |
This because we entered the updateReplace for *_FAILED resource. We tried to create a new keypair named 'heat_key_test', but the old one exists.