provisioning idempotency issue when capital letters in hostname

Bug #1978360 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Harald Jensås

Bug Description

instance['hostname'] can have upparcase characters.
Neutron ports `dns_name` is always lowercase:

We find existing ports by running:

hostname = instance['hostname']
inst_ports = [port for port in inst_ports if port.dns_name == hostname]

In case instance['hostname'] has uppercase characters we will never see that a port already exists, and create a new port.

summary: - power provisioning idempotency issue when capital letters in hostname
+ provisioning idempotency issue when capital letters in hostname
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/+/845487
Committed: https://opendev.org/openstack/tripleo-ansible/commit/04891f08a3b7c0de3708ef11722d205d17196fda
Submitter: "Zuul (22348)"
Branch: master

commit 04891f08a3b7c0de3708ef11722d205d17196fda
Author: Harald Jensås <email address hidden>
Date: Sat Jun 11 00:18:21 2022 +0200

    Fix port idempotency when uppercase in hostname

    When uppercase characters where used in instance hostname,
    new port was created each time node provisioning ran.

    Fix this issue by converting instance hostname to lowercase
    so that it can be compared to neutron port `dns_name` property
    which is always lowercase.

    Closes-Bug: #1978360
    Change-Id: Icb4b52f7922cf0eec3f5317db2051896e583d83e

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

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/845399

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/845399
Committed: https://opendev.org/openstack/tripleo-ansible/commit/b88744a61efd33d1987178ace284e410e42f89b8
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit b88744a61efd33d1987178ace284e410e42f89b8
Author: Harald Jensås <email address hidden>
Date: Sat Jun 11 00:18:21 2022 +0200

    Fix port idempotency when uppercase in hostname

    When uppercase characters where used in instance hostname,
    new port was created each time node provisioning ran.

    Fix this issue by converting instance hostname to lowercase
    so that it can be compared to neutron port `dns_name` property
    which is always lowercase.

    Closes-Bug: #1978360
    Change-Id: Icb4b52f7922cf0eec3f5317db2051896e583d83e
    (cherry picked from commit 04891f08a3b7c0de3708ef11722d205d17196fda)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 5.0.0

This issue was fixed in the openstack/tripleo-ansible 5.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.