RHEL registration broken due to conditions syntax in UpdateDeploymentAfterRHELRegistration

Bug #1709916 reported by James Slagle on 2017-08-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Critical
James Slagle

Bug Description

The resource defintion in rhel-registration.yaml is:

  UpdateDeploymentAfterRHELRegistration:
    type: OS::Heat::SoftwareDeployment
    depends_on: RHELRegistrationDeployment
    conditions:
      update_requested: {get_param: UpdateOnRHELRegistration}
    properties:
      name: UpdateDeploymentAfterRHELRegistration
      config: {get_resource: YumUpdateConfigurationAfterRHELRegistration}
      server: {get_param: server}
      actions:
        if:
          - deployment_actions_empty
          - []
          - ['CREATE'] # Only do this on CREATE

"conditions" should be "condition"
and it the condition specification is not valid either

Changed in tripleo:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → James Slagle (james-slagle)
milestone: none → pike-rc1

Reviewed: https://review.openstack.org/492632
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=589b18dafc5f9a79d39bfb0a1d8ecbc0d3d34627
Submitter: Jenkins
Branch: master

commit 589b18dafc5f9a79d39bfb0a1d8ecbc0d3d34627
Author: James Slagle <email address hidden>
Date: Thu Aug 10 13:42:31 2017 -0400

    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.

    Change-Id: I14d5c72cf86423808e81f1d8406098d5fd635e66
    Closes-Bug: #1709916

Changed in tripleo:
status: In Progress → Fix Released

This issue was fixed in the openstack/tripleo-heat-templates 7.0.0.0rc1 release candidate.

Reviewed: https://review.openstack.org/546141
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=f9ded9307b08cdfada3a469cc4ee46b919040aad
Submitter: Zuul
Branch: stable/ocata

commit f9ded9307b08cdfada3a469cc4ee46b919040aad
Author: James Slagle <email address hidden>
Date: Thu Aug 10 13:42:31 2017 -0400

    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 589b18dafc5f9a79d39bfb0a1d8ecbc0d3d34627)

tags: added: in-stable-ocata

Reviewed: https://review.openstack.org/546144
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=2735cfc17f3f31776b73f31f817b752b2c5dbb81
Submitter: Zuul
Branch: stable/newton

commit 2735cfc17f3f31776b73f31f817b752b2c5dbb81
Author: James Slagle <email address hidden>
Date: Thu Aug 10 13:42:31 2017 -0400

    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 589b18dafc5f9a79d39bfb0a1d8ecbc0d3d34627)

tags: added: in-stable-newton

This issue was fixed in the openstack/tripleo-heat-templates 6.2.11 release.

This issue was fixed in the openstack/tripleo-heat-templates 5.3.11 release.

Reviewed: https://review.openstack.org/558541
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=28b5de719ee2b7c3cdeedafc5e0376f70f8a3a91
Submitter: Zuul
Branch: stable/newton

commit 28b5de719ee2b7c3cdeedafc5e0376f70f8a3a91
Author: Emilien Macchi <email address hidden>
Date: Tue Apr 3 08:43:13 2018 -0700

    rhel-registration: update template version

    ... so we actually supports the "conditions" block.
    Note: 2016-10-14 is actually the latest Newton template version.
    Source: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#newton

    Related-Bug: #1709916
    Change-Id: I0ca705625109c71a429982faf61027bcfe6d26a7

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers