glance charm leaves old entries in haproxy.cfg when adding and removing

Bug #1592273 reported by Brad Marshall
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Glance Charm
Fix Released
Medium
Alex Kavanagh
glance (Juju Charms Collection)
Invalid
Medium
Alex Kavanagh

Bug Description

I have a requirement to temporarily add an extra unit to a Openstack HA setup, Liberty on Trusty using charms 15.10.

Aside from the fact that there is manual work required to do this, as per LP#1400481, I'm running into an issue when doing the juju add-unit and then juju remove-unit that the haproxy.cfg ends up keeping the removed unit in the backend glance_api section.

This does not occur when I do the same process for cinder.

--- Test Case ---
On juju management server:
$ juju add-unit glance --to lxc:#

... wait a while ..

On unit to be removed:
$ sudo service pacemaker stop ; sudo service corosync stop

On another unit of the service we're working on:
$ sudo crm_node -R <node>

Back on the juju management server:
$ juju remove-unit glance/#

When checking /etc/haproxy/haproxy.cfg on all the units, the entry for the removed glance unit is still present. Juju status of glance shows the expected 3 nodes, but haproxy has 4 entries.

Versions:
$ juju --version
1.25.5-trusty-amd64

$ dpkg-query -W maas
maas 1.9.2+bzr4568-0ubuntu1~trusty1

Glance charm is lp:charms/trusty/glance revno 127.

Please let me know if you need any further information.

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

I've verified this with a minimal bundle, and after a glance unit is removed, it is still present in haproxy.cfg.

Changed in glance (Juju Charms Collection):
assignee: nobody → Alex Kavanagh (ajkavanagh)
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/374837

Changed in glance (Juju Charms Collection):
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (master)

Reviewed: https://review.openstack.org/374837
Committed: https://git.openstack.org/cgit/openstack/charm-glance/commit/?id=5e370928005055054d61a3e3c7b1510338ce0938
Submitter: Jenkins
Branch: master

commit 5e370928005055054d61a3e3c7b1510338ce0938
Author: Alex Kavanagh <email address hidden>
Date: Thu Sep 22 13:57:15 2016 +0000

    Fix to ensure that glance responds to cluster-relation-departed

    When a glance unit is removed a 'cluster-relation-departed' is sent to
    each of the remaining units. This was not being used, but the
    side-effect was that the hacluster.cfg file was not being updated which
    left the now deleted unit haproxy.cfg. This change just tags on the
    hook for 'cluster-relation-departed' to the function that handles
    'cluster-relation-changed' so that the haproxy.cfg file gets updated.

    Change-Id: I70f985614a2c66344360ab744ec6996f9604a9c3
    Closes-Bug: 1592273

Changed in glance (Juju Charms Collection):
status: In Progress → Fix Committed
Liam Young (gnuoy)
Changed in glance (Juju Charms Collection):
importance: Undecided → Medium
milestone: none → 16.10
James Page (james-page)
Changed in charm-glance:
assignee: nobody → Alex Kavanagh (ajkavanagh)
importance: Undecided → Medium
status: New → Fix Committed
Changed in glance (Juju Charms Collection):
status: Fix Committed → Invalid
James Page (james-page)
Changed in charm-glance:
milestone: none → 17.02
James Page (james-page)
Changed in charm-glance:
status: Fix Committed → Fix Released
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.