Writing ansible_host_vars fails with KeyError when nodes are blacklisted

Bug #1856661 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Rabi Mishra

Bug Description

traceback:
og_http_response /usr/lib/python3.6/site-packages/heatclient/common/http.py:157
2019-12-14 08:36:19.608 7 WARNING mistral.executors.default_executor [req-87d0caa7-676d-4d5c-88aa-597987f8b1c4 1bc009e3d7fb42b9abf4eef05215b29d 2db6649885974116812a53f312ab2151 - default default] The action raised an exception [action_ex_id=76933980-353e-4222-9598-1280f4853ca7, msg=''compute-1'', action_cls='<class 'mistral.actions.action_factory.GetOvercloudConfig'>', attributes='{}', params='{'container': 'overcloud', 'container_config': 'overcloud-config'}']: KeyError: 'compute-1'
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor Traceback (most recent call last):
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor File "/usr/lib/python3.6/site-packages/mistral/executors/default_executor.py", line 133, in _do_run_action
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor result = action.run(action_ctx)
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor File "/usr/lib/python3.6/site-packages/tripleo_common/actions/config.py", line 87, in run
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor commit_message=message)
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor File "/usr/lib/python3.6/site-packages/tripleo_common/utils/config.py", line 551, in download_config
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor self.write_config(stack, name, config_dir, config_type)
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor File "/usr/lib/python3.6/site-packages/tripleo_common/utils/config.py", line 511, in write_config
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor default_flow_style=False) if role_host_vars else None)
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor KeyError: 'compute-1'
2019-12-14 08:36:19.608 7 ERROR mistral.executors.default_executor

balcklist.yaml environment:

parameter_defaults:
  DeploymentServerBlacklist:
    - compute-1

Rabi Mishra (rabi)
Changed in tripleo:
importance: Undecided → High
assignee: nobody → Rabi Mishra (rabi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

Fix proposed to branch: master
Review: https://review.opendev.org/699359

Changed in tripleo:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/699359
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=d407c96d17020a15395ba4f6537e03e596caedaa
Submitter: Zuul
Branch: master

commit d407c96d17020a15395ba4f6537e03e596caedaa
Author: Rabi Mishra <email address hidden>
Date: Tue Dec 17 12:32:54 2019 +0530

    Ensure blacklisted nodes are not included in server_names

    'ServerIdData' map actually returns 'None' ids for blacklisted
    nodes for a role, as 'nova_server_resource' output is
    evaluated with condition 'server_not_blacklisted'. This
    results in get_server_names() returning these blacklisted
    nodes with something like 'None: compute-1' and results
    in issues when we write ansible_host_vars. As we don't intend to
    write ansible_host_vars for blacklisted nodes, we can ignore
    these from 'server_names'.

    Closes-bug: #1856661
    Change-Id: Iafecc885abac5583c07bc046bc4d541f5e1e1c00

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/700129

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/700155

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/stein)

Reviewed: https://review.opendev.org/700155
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=13b77d3670ccd69530850fe72c6dba33e663cc64
Submitter: Zuul
Branch: stable/stein

commit 13b77d3670ccd69530850fe72c6dba33e663cc64
Author: Rabi Mishra <email address hidden>
Date: Tue Dec 17 12:32:54 2019 +0530

    Ensure blacklisted nodes are not included in server_names

    'ServerIdData' map actually returns 'None' ids for blacklisted
    nodes for a role, as 'nova_server_resource' output is
    evaluated with condition 'server_not_blacklisted'. This
    results in get_server_names() returning these blacklisted
    nodes with something like 'None: compute-1' and results
    in issues when we write ansible_host_vars. As we don't intend to
    write ansible_host_vars for blacklisted nodes, we can ignore
    these from 'server_names'.

    Closes-bug: #1856661
    Change-Id: Iafecc885abac5583c07bc046bc4d541f5e1e1c00
    (cherry picked from commit d407c96d17020a15395ba4f6537e03e596caedaa)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/train)

Reviewed: https://review.opendev.org/700129
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=fe282fc5ff17578c0a3dd3b4cd3ea1a8d092636e
Submitter: Zuul
Branch: stable/train

commit fe282fc5ff17578c0a3dd3b4cd3ea1a8d092636e
Author: Rabi Mishra <email address hidden>
Date: Tue Dec 17 12:32:54 2019 +0530

    Ensure blacklisted nodes are not included in server_names

    'ServerIdData' map actually returns 'None' ids for blacklisted
    nodes for a role, as 'nova_server_resource' output is
    evaluated with condition 'server_not_blacklisted'. This
    results in get_server_names() returning these blacklisted
    nodes with something like 'None: compute-1' and results
    in issues when we write ansible_host_vars. As we don't intend to
    write ansible_host_vars for blacklisted nodes, we can ignore
    these from 'server_names'.

    Closes-bug: #1856661
    Change-Id: Iafecc885abac5583c07bc046bc4d541f5e1e1c00
    (cherry picked from commit d407c96d17020a15395ba4f6537e03e596caedaa)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 12.1.0

This issue was fixed in the openstack/tripleo-common 12.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common stein-eol

This issue was fixed in the openstack/tripleo-common stein-eol 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.