Fix Heat condition for RHEL registration yum update

There were 2 problems with this condition making the
rhel-registration.yal template broken:

"conditions" should be "condition"

The condition should refer to just a condition name defined in the
"conditions:" section of the template.

When Id84d156cd28413309981d5943242292a3a6fa807 was backported to ocata
and newton, it broke RHEL registration on those branches, and fails
with:

===
ERROR: Failed to validate: Failed to validate: resources[0]: Failed to
validate: resources.NodeExtraConfig: "conditions" is not a valid keyword
inside a resource definition'
===

I14d5c72cf86423808e81f1d8406098d5fd635e66 also needs to be backported to
resolve the issue.

Change-Id: I14d5c72cf86423808e81f1d8406098d5fd635e66
Closes-Bug: #1709916
(cherry picked from commit 589b18dafc)
This commit is contained in:
James Slagle 2017-08-10 13:42:31 -04:00
parent ab5a63bf8c
commit f9ded9307b
2 changed files with 16 additions and 2 deletions

View File

@ -60,6 +60,12 @@ parameters:
When enabled, the system will perform a yum update after performing the
RHEL Registration process.
conditions:
update_requested:
equals:
- {get_param: UpdateOnRHELRegistration}
- true
resources:
RHELRegistration:
@ -171,8 +177,7 @@ resources:
UpdateDeploymentAfterRHELRegistration:
type: OS::Heat::SoftwareDeployment
depends_on: RHELRegistrationDeployment
conditions:
update_requested: {get_param: UpdateOnRHELRegistration}
condition: update_requested
properties:
name: UpdateDeploymentAfterRHELRegistration
config: {get_resource: YumUpdateConfigurationAfterRHELRegistration}

View File

@ -0,0 +1,9 @@
---
fixes:
- |
Fix Heat condition for RHEL registration yum update
There were 2 problems with this condition making the
rhel-registration.yaml template broken: "conditions" should be "condition"
and the condition should refer to just a condition name defined in the
"conditions:" section of the template. See
https://bugs.launchpad.net/tripleo/+bug/1709916