Derived paramters for one HCI role works, but not for more than one HCI role

Bug #1926627 reported by John Fulton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
John Fulton

Bug Description

Suppose I deploy with two types of HCI node ComputeHCI and ComputeHCI2, e.g.:

  parameter_defaults:
    ComputeHCI2Count: 1
    ComputeHCI2HostnameFormat: '%stackname%-computehci2-%index%'
    ComputeHCICount: 2
    ComputeHCIHostnameFormat: '%stackname%-computehci-%index%'

Then I deploy like this:

  openstack overcloud deploy
  ...
  -p /usr/share/openstack-tripleo-heat-templates/plan-samples/plan-environment-derived-params.yaml
  ...

The derivation produces this file:

 ~/overcloud-deploy/overcloud/tripleo-heat-templates/user-environments/derived_parameters.yaml

and it only has the derivation for the last role it evaluated:

$ cat derived_parameters.yaml
parameter_defaults:
  ComputeHCI2Parameters:
    NovaReservedHostMemory: 20480
$

It should look like this instead:

parameter_defaults:
  ComputeHCIParameters:
    NovaReservedHostMemory: # some other number
  ComputeHCI2Parameters:
    NovaReservedHostMemory: 20480

I can see the value getting computed for both roles [1], it's just not being persisted when the workflow runs for the subsequent run.

[1]
2021-04-29 14:24:21.502907 | 24420180-73f1-46e6-ffb7-0000000000fd | OK | Show HCI derived paramters results | localhost | result={
    "changed": false,
    "msg": {
        "changed": false,
        "derived_parameters": {
            "ComputeHCIParameters": {
                "NovaReservedHostMemory": 20480
            }
        },
...
2021-04-29 14:24:25.480015 | 24420180-73f1-46e6-ffb7-000000000186 | TASK | Show HCI derived paramters results
2021-04-29 14:24:25.505038 | 24420180-73f1-46e6-ffb7-000000000186 | OK | Show HCI derived paramters results | localhost | result={
    "changed": false,
    "msg": {
        "changed": false,
        "derived_parameters": {
            "ComputeHCI2Parameters": {
                "NovaReservedHostMemory": 20480
            }
        },

Changed in tripleo:
importance: Undecided → Medium
tags: removed: victoria-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (master)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/788831
Committed: https://opendev.org/openstack/tripleo-ansible/commit/756454f4b6d2bd5efc2346979e6a5a829012cc05
Submitter: "Zuul (22348)"
Branch: master

commit 756454f4b6d2bd5efc2346979e6a5a829012cc05
Author: John Fulton <email address hidden>
Date: Thu Apr 29 21:50:09 2021 +0000

    Add append option to tripleo_derive_hci_parameters module

    The module already has the parameter new_heat_environment_path,
    which is a path to a file that gets overwritten each time the
    module is called. Add append_new_heat_environment_path, which
    is a new bool parameter that defaults to false to perserve the
    existing behavior. If the new parameter is true, then merge the
    new derived paramters into the file without loosing the existing
    derived paramters already in the file.

    To close bug 1926627, use new_heat_environment_path with the new
    option in the existing role loop. Also, remove the unnecessary
    task to write out the derived_parameter_result variable because
    we now write it in the previous task.

    Closes-Bug: #1926627
    Change-Id: Iabb0cbda57fabf27d0e5d8b1cc75706785ecd967

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 3.1.0

This issue was fixed in the openstack/tripleo-ansible 3.1.0 release.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.