Relation removal prevents normal operations

Bug #1888768 reported by Peter Matulis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Glance Charm
Fix Released
High
James Page

Bug Description

After having successfully used ceph-proxy for providing Ceph-backed Glance volumes and Ceph-backed Nova disks I decided to remove the Glance portion so as to use local Glance storage. I discovered that I could not do so. A remnant of the connection to the Ceph cluster appears to have been left behind after the removal of the relation.

The removed relation:

juju remove-relation ceph-proxy:client glance:ceph

The post-removal `juju status` output:

See attachment 'juju-status-post-removal.txt'

The Glance error:

See attachment 'post-ceph-proxy-relation-removal.txt'

I eventually removed the ceph-proxy application but it didn't help. The full `juju status` output in the status attachment was made after ceph-proxy removal.

Revision history for this message
Peter Matulis (petermatulis) wrote :
Revision history for this message
Peter Matulis (petermatulis) wrote :
summary: - Relation removal can disrupt normal operations
+ Relation removal prevents normal operations
Revision history for this message
James Page (james-page) wrote :

The issue is that the glance charm does not restart it services when the relation to ceph-* is broken:

@hooks.hook('ceph-relation-broken')
def ceph_broken():
    service = service_name()
    delete_keyring(service=service)
    CONFIGS.write_all()

as a result glance is still trying to use ceph but the keyring and ceph.conf are missing/incomplete on disk.

Adding:

@restart_on_change(restart_map())

as a decorator for the function should resolve this.

affects: charm-ceph-proxy → charm-glance
Changed in charm-glance:
status: New → Triaged
importance: Undecided → High
milestone: none → 20.08
Revision history for this message
James Page (james-page) wrote :
Changed in charm-glance:
assignee: nobody → James Page (james-page)
James Page (james-page)
Changed in charm-glance:
milestone: 20.08 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (master)

Reviewed: https://review.opendev.org/742838
Committed: https://git.openstack.org/cgit/openstack/charm-glance/commit/?id=78e7b57854fc1d9a1ddefd55f4c92e62b718ad63
Submitter: Zuul
Branch: master

commit 78e7b57854fc1d9a1ddefd55f4c92e62b718ad63
Author: James Page <email address hidden>
Date: Fri Jul 24 10:52:17 2020 +0100

    Fix misc issues with removal of ceph relation

    Ensure that services are restarted when the relation is
    removed from a model.

    Add -departed hook to ensure that ceph.conf is consistent
    with monitors in the ceph cluster during scaleback operations.

    Change-Id: I2159dd32a49e4591494881bab8469f087a539d5a
    Closes-Bug: 1888768

Changed in charm-glance:
status: In Progress → Fix Committed
Changed in charm-glance:
milestone: none → 20.10
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.