Skip to content

networking-baremetal: fix pool queue leak - #843

Merged
berendt merged 1 commit into
mainfrom
networking-baremetal-pool-queue-leak
Nov 18, 2026
Merged

berendt merged 1 commit into
mainfrom
networking-baremetal-pool-queue-leak

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

Carries the upstream networking-baremetal fix for orphaned RabbitMQ quorum queues to 2024.1, 2024.2, 2025.1 and 2025.2.

Problem

ironic-neutron-agent names its member-manager notification pool after a UUID generated on every start. With rabbit_quorum_queue = true, amqp_auto_delete can't be used, so each restart leaves behind a durable ironic-neutron-agent-member-manager-pool-<uuid> queue with no consumer that keeps collecting notifications. Operators have reported queues with hundreds of thousands of messages and growing RabbitMQ memory use.

Change

  • Patch: the upstream stable/2026.1 cherry-pick, which uses the agent hostname as the pool name so the queue is reused across restarts. The hunk headers are adjusted to each release's sdist so the patch applies without offset and leaves no *.orig in the tarball.
  • Templates: neutron plugins aren't among the tarballs listed in the generated kolla-build.conf, so kolla downloads networking-baremetal itself and 003-patch.sh would never patch it. A neutron-base-plugin-networking-baremetal section routes it through tarballs/, as was already done for magnum-ui.
  • 2024.1 KOLLA_IMAGES: add ^ironic-neutron-agent. networking-baremetal is installed into neutron-base, but the agent runs from ironic-neutron-agent, which ^neutron doesn't match.

2026.1 needs nothing: the fix is already in the stable-2026.1 tarball.

Verification

  • For each of the four releases, ran the real 003-patch.sh against the networking-baremetal tarball: the patch applied, was recorded as applied, left no *.orig, and the repacked agent code uses self.agent_host.
  • Checked that every kolla ref (including the 2024.2-eol tag) knows the neutron-base-plugin-networking-baremetal source name.
  • No images built yet; that is what the zuul label runs.

Operator note

The patch only prevents new orphaned queues. Queues left behind by earlier restarts have to be deleted manually once.

🤖 Generated with Claude Code

The ironic-neutron-agent names its member-manager notification pool
after self.agent_id, a UUID generated anew on every start. With
rabbit_quorum_queue = true, amqp_auto_delete cannot be used, so each
restart creates a new durable queue

  ironic-neutron-agent-member-manager-pool-<uuid>

while the previous one stays bound to the notification exchange
without a consumer and keeps accumulating messages. Operators have
reported orphaned queues with hundreds of thousands of messages and
steadily growing RabbitMQ memory use.

Carry the upstream fix for 2024.1, 2024.2, 2025.1 and 2025.2:
https://review.opendev.org/c/openstack/networking-baremetal/+/998079

It uses self.agent_host (socket.gethostname(), already set on all
these branches) as the pool name instead, so the same queue is reused
across restarts on a host. The patch is the stable/2026.1 cherry-pick,
release note included, with the hunk header moved to match each sdist
so that it applies without offset. Applying it with an offset would
leave an ironic_neutron_agent.py.orig behind in the tarball. The file
is named like git format-patch output, as the other carried upstream
commits are.

2026.1 needs no patch: the fix is merged on stable/2026.1 and the
stable-2026.1 tarball already contains it.

neutron plugins are not among the projects that the generated
kolla-build.conf lists as tarballs, so kolla downloads
networking-baremetal itself and 003-patch.sh never sees it. Add a
neutron-base-plugin-networking-baremetal section next to neutron in
the four templates, pointing at the same networking-baremetal tarball
kolla would use by default (unmaintained-2024.1, stable-<release>
otherwise), so it is downloaded, patched and repacked like the others.
This is the same routing as for magnum-ui. All four kolla refs,
including the 2024.2-eol tag, know this source name.

networking-baremetal is installed into neutron-base, but the agent
runs from the ironic-neutron-agent image built on top of it. 2024.1
builds only the images listed in KOLLA_IMAGES, and ^neutron does not
match ironic-neutron-agent, so add ^ironic-neutron-agent there.
Otherwise the patched neutron-base would never reach the agent image.
The other releases build all images.

The patch only stops new queues from piling up. Queues already left
behind by earlier restarts have to be deleted manually once.

Related: osism/issues#1470
Related: https://bugs.launchpad.net/networking-baremetal/+bug/2086303

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@ideaship ideaship self-assigned this Nov 18, 2026
@ideaship
ideaship marked this pull request as ready for review November 18, 2026 09:51
@berendt
berendt merged commit c6a7e15 into main Nov 18, 2026
3 checks passed
@berendt
berendt deleted the networking-baremetal-pool-queue-leak branch November 18, 2026 10:29
@github-project-automation github-project-automation Bot moved this from New to Done in Human Board Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants