ceph-proxy requires 'admin' user specifically

Bug #1893790 reported by Przemyslaw Hausman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Ceph-Proxy Charm
Fix Released
Undecided
Chris MacNaughton

Bug Description

My external Ceph cluster is provisioned with a user 'canonical' who has admin rights. ceph-proxy charm is configured with admin-user 'client.canonical'. The charm still reports errors because it specifically expects a user named 'admin' instead of (as configured) 'canonical'.

juju debug-log -i ceph-proxy/0
[...]
unit-ceph-proxy-0: 07:50:40 ERROR unit.ceph-proxy/0.juju-log Command '['ceph', '--id', 'admin', 'osd', 'ls', '--format=json']' returned non-zero exit status 1.

'admin' user is hardcoded in ceph-proxy charm in multiple places:

https://github.com/openstack/charm-ceph-proxy/blob/ddd26acc6dadbd988231c8fbedbd82eb2d9b3832/actions/list-pools#L23
https://github.com/openstack/charm-ceph-proxy/blob/ddd26acc6dadbd988231c8fbedbd82eb2d9b3832/actions/pool-statistics#L22
https://github.com/openstack/charm-ceph-proxy/blob/ddd26acc6dadbd988231c8fbedbd82eb2d9b3832/actions/list-erasure-profiles#L25
https://github.com/openstack/charm-ceph-proxy/blob/ddd26acc6dadbd988231c8fbedbd82eb2d9b3832/actions/pool-get#L25

With my configuration of admin-user as 'client.canonical' I'd expect ceph-proxy charm to use 'canonical' user instead of 'admin' user.

MORE INFORMATION

juju config ceph-proxy admin-user
client.canonical

juju ssh ceph-proxy/0 ls -l /etc/ceph
total 8
-rw------- 1 ceph root 68 Sep 1 07:49 ceph.client.canonical.keyring
lrwxrwxrwx 1 root root 27 Aug 31 13:47 ceph.conf -> /etc/alternatives/ceph.conf
-rw-r--r-- 1 root root 92 Apr 21 15:36 rbdmap

juju ssh ceph-proxy/0 sudo ceph --id admin osd ls --format=json
[errno 2] RADOS object not found (error connecting to the cluster)

juju ssh ceph-proxy/0 sudo ceph --id canonical osd ls --format=json

[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47]

Changed in charm-ceph-proxy:
status: New → Confirmed
milestone: none → 20.08
assignee: nobody → Chris MacNaughton (chris.macnaughton)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-ceph-proxy (master)

Fix proposed to branch: master
Review: https://review.opendev.org/749982

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

Reviewed: https://review.opendev.org/749982
Committed: https://git.openstack.org/cgit/openstack/charm-ceph-proxy/commit/?id=7359b981d6cc1d44a1b9b28ce9e61dc250a3705e
Submitter: Zuul
Branch: master

commit 7359b981d6cc1d44a1b9b28ce9e61dc250a3705e
Author: Chris MacNaughton <email address hidden>
Date: Fri Sep 4 16:58:11 2020 +0200

    Ensure that the actions use the configured admin user

    Change-Id: I357b26fb585d68d2fbe9bbf21bbf9bfc52ac5050
    Closes-Bug: #1893790

Changed in charm-ceph-proxy:
status: In Progress → Fix Committed
Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

I'm not sure why the auto-closing bug magic didn't catch this one but I believe it was fix-released in the latter part of 2020.

Changed in charm-ceph-proxy:
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.