Charm incorrectly passes PosixPath('/etc/ceph/ceph-dashboard') as parameter to set-ssl-certificate

Bug #2049062 reported by Bartosz Woronicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph Dashboard Charm
Incomplete
Undecided
Unassigned
Quincy.2
New
Undecided
Unassigned
Reef
New
Undecided
Unassigned

Bug Description

When running ./hooks/install or ./certificates-relation-changed

Unit Workload Agent Machine Public address Ports Message
ceph-mon/0 active idle 1/lxd/1 10.0.1.107 Unit is ready and clustered
  ceph-dashboard/1 error idle 10.0.1.107 hook failed: "certificates-relation-changed"
  landscape-client/24 blocked idle 10.0.1.107 Registration failed!
  logrotated/24 active idle 10.0.1.107 Unit is ready.
  prometheus-grok-exporter/24 active idle 10.0.1.107 9144/tcp Unit is ready
  ubuntu-advantage/24 active idle 10.0.1.107 Attached (esm-apps,esm-infra)

I got error, as the charm code incorrectly passes the path to certificate as PosixPath object representation

root@juju-d060c8-7-lxd-1:/var/lib/juju/agents/unit-ceph-dashboard-0/charm# ./hooks/install
...
subprocess.CalledProcessError: Command '['ceph', 'dashboard', 'set-ssl-certificate', 'juju-d060c8-7-lxd-1', '-i', PosixPath('/etc/ceph/ceph-dashboard.
crt')]' returned non-zero exit status 5.

The config is as follows:
  ceph-dashboard:
    bindings:
      ? ''
      : oam-space
      certificates: internal-space
    channel: quincy/stable
    charm: ceph-dashboard
    options:
      grafana-api-url: https://grafana.maas:3000

The version of the charm is ceph-dashboard rev 50 in quincy/stable branch. Released on 7th Dec 2023.
Python version is Python 3.10.12.

Revision history for this message
Peter Sabaini (peter-sabaini) wrote :

Thanks @mastier1 for that report. Do you happen to have the full traceback around?
TIA

Changed in charm-ceph-dashboard:
status: New → Incomplete
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.