Skip to content

Commit 38312c2

Browse files
committed
Fix order of grabbing machine details
We were basing our iface deletion decisions based on old information before we cleanup the hostname. We should pull the latest information instead from after
1 parent 5a85dc6 commit 38312c2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

OpenStack-Rabbit-Consumer/rabbit_consumer/message_consumer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,16 @@ def delete_machine(
7575
# of deletion orders which it enforces...
7676

7777
hostname = aq_api.search_host_by_machine(machine_name)
78-
machine_details = aq_api.get_machine_details(machine_name)
79-
# We have to clean-up all the interfaces and addresses first
8078
if hostname:
8179
if aq_api.check_host_exists(hostname):
8280
# This is a different hostname to the one we have in the message
8381
# so, we need to delete it
8482
logger.info("Host exists for %s. Deleting old", hostname)
8583
aq_api.delete_host(hostname)
8684

85+
# We have to clean-up all the interfaces and addresses first
86+
machine_details = aq_api.get_machine_details(machine_name)
87+
8788
# First delete the interfaces
8889
ipv4_address = socket.gethostbyname(hostname)
8990
if ipv4_address in machine_details:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.0
1+
2.2.1

charts/rabbit-consumer/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ type: application
66
# This is the chart version. This version number should be incremented each time you make changes
77
# to the chart and its templates, including the app version.
88
# Versions are expected to follow Semantic Versioning (https://semver.org/)
9-
version: 1.3.0
9+
version: 1.3.1
1010

1111
# This is the version number of the application being deployed. This version number should be
1212
# incremented each time you make changes to the application. Versions are not expected to
1313
# follow Semantic Versioning. They should reflect the version the application is using.
1414
# It is recommended to use it with quotes.
15-
appVersion: "v2.2.0"
15+
appVersion: "v2.2.1"

0 commit comments

Comments
 (0)