scale-down/up tripleoclient deployment.py:get_overcloud_hosts() returns list with empty string

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

Bug Description

After scaling down and then adding the same node back to scale up as described in [1] the overcloud deployment fails with the following while enable_ssh_admin ran:

  2022-09-22 14:12:22,051 p=75560 u=stack n=ansible | ERROR! Invalid empty host name provided:

Inspection of tripleoclient/constants.py ANSIBLE_HOSTS_FILENAME shows an empty entry:

$ cat ./overcloud-deploy/dcn1/cli-enable-ssh-admin/hosts.yaml
192.168.34.89,,192.168.34.32,192.168.34.34
$

I.e. there shouldn't be ",," above.

[1] https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/provisioning/baremetal_provision.html#scaling-the-overcloud

Revision history for this message
John Fulton (jfulton-org) wrote :

Added print statements in the get_overcloud_hosts() function [1] showed that

The get_role_net_ip_map() function returned something like this

[{'ctlplane': ['192.168.34.89', '', '192.168.34.32'],
 'internal_api': ['172.25.2.249', '', '172.25.2.66'],
 'storage': ['172.23.2.169', '', '172.23.2.34'],
 'storage_mgmt': ['172.18.2.244', '', '172.18.2.83'],
 'tenant': ['172.19.2.176', '', '172.19.2.136']},

{'ctlplane': ['192.168.34.34'],
 'internal_api': ['172.25.2.109'],
 'storage': ['172.23.2.244'],
 'storage_mgmt': ['172.18.2.24'],
 'tenant': ['172.19.2.148']}]

Does the scaled down node (with provisioned:false) have an entry with no value?

[1] https://github.com/openstack/python-tripleoclient/blob/master/tripleoclient/workflows/deployment.py#L83

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

Reviewed: https://review.opendev.org/c/openstack/python-tripleoclient/+/858977
Committed: https://opendev.org/openstack/python-tripleoclient/commit/6916f55c9a2e9eacc9874627009c5cddc3f42b1b
Submitter: "Zuul (22348)"
Branch: master

commit 6916f55c9a2e9eacc9874627009c5cddc3f42b1b
Author: John Fulton <email address hidden>
Date: Thu Sep 22 15:48:51 2022 -0400

    get_overcloud_hosts() should not return a list with empty strings

    The get_overcloud_hosts() function was returning a list of IPs
    with empty strings, e.g. ['192.168.34.89', '', '192.168.34.32'],
    after a node was scaled down via `openstack overcloud node delete`.
    Remove empty strings from the list before returning them.

    Change-Id: I719e0bbb17c71f5472ad6e365a010f5a6243af2f
    Closes-Bug: #1990566

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

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/python-tripleoclient/+/859160

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/python-tripleoclient/+/859160
Committed: https://opendev.org/openstack/python-tripleoclient/commit/fcff97a92cf05841de4ae9f2b6e38113a38b128a
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit fcff97a92cf05841de4ae9f2b6e38113a38b128a
Author: John Fulton <email address hidden>
Date: Thu Sep 22 15:48:51 2022 -0400

    get_overcloud_hosts() should not return a list with empty strings

    The get_overcloud_hosts() function was returning a list of IPs
    with empty strings, e.g. ['192.168.34.89', '', '192.168.34.32'],
    after a node was scaled down via `openstack overcloud node delete`.
    Remove empty strings from the list before returning them.

    Change-Id: I719e0bbb17c71f5472ad6e365a010f5a6243af2f
    Closes-Bug: #1990566
    (cherry picked from commit 6916f55c9a2e9eacc9874627009c5cddc3f42b1b)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 19.0.0

This issue was fixed in the openstack/python-tripleoclient 19.0.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.