[quincy-edge] update status fails with json.decoder.JSONDecodeError

Bug #1968715 reported by Marian Gasparovic
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph Dashboard Charm
Fix Released
Undecided
Unassigned
charms.ceph
Fix Released
Undecided
Unassigned

Bug Description

During ceph setup ceph-dashboard fails with

2022-04-11 23:05:23 DEBUG unit.ceph-dashboard/2.juju-log server.go:327 Operator Framework 1.4.0 up and running.
2022-04-11 23:05:23 DEBUG unit.ceph-dashboard/2.juju-log server.go:327 Legacy hooks/update-status does not exist.
2022-04-11 23:05:23 DEBUG unit.ceph-dashboard/2.juju-log server.go:327 yaml does not have libyaml extensions, using slower pure Python yaml loader
2022-04-11 23:05:23 DEBUG unit.ceph-dashboard/2.juju-log server.go:327 Using local storage: /var/lib/juju/agents/unit-ceph-dashboard-2/charm/.unit-state.db already exists
2022-04-11 23:05:23 DEBUG unit.ceph-dashboard/2.juju-log server.go:327 Emitting Juju event update_status.
2022-04-11 23:05:23 INFO unit.ceph-dashboard/2.juju-log server.go:327 Updating status
2022-04-11 23:05:23 ERROR unit.ceph-dashboard/2.juju-log server.go:327 Uncaught exception while in charm code:
Traceback (most recent call last):
  File "./src/charm.py", line 645, in <module>
    main(get_charm_class_for_release())
  File "/var/lib/juju/agents/unit-ceph-dashboard-2/charm/venv/ops/main.py", line 431, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-ceph-dashboard-2/charm/venv/ops/main.py", line 142, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-ceph-dashboard-2/charm/venv/ops/framework.py", line 283, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-ceph-dashboard-2/charm/venv/ops/framework.py", line 743, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-ceph-dashboard-2/charm/venv/ops/framework.py", line 790, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-ceph-dashboard-2/charm/venv/ops_openstack/core.py", line 201, in on_update_status
    self.update_status()
  File "/var/lib/juju/agents/unit-ceph-dashboard-2/charm/venv/ops_openstack/core.py", line 150, in update_status
    _result = check()
  File "./src/charm.py", line 364, in check_dashboard
    if not check_f():
  File "/var/lib/juju/agents/unit-ceph-dashboard-2/charm/venv/charms_ceph/utils.py", line 3473, in is_mgr_module_enabled
    return module in enabled_manager_modules()
  File "/var/lib/juju/agents/unit-ceph-dashboard-2/charm/venv/charms_ceph/utils.py", line 3461, in enabled_manager_modules
    modules = json.loads(modules)
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2022-04-11 23:05:23 ERROR juju.worker.uniter.operation runhook.go:146 hook "update-status" (via hook dispatching script: dispatch) failed: exit status 1

Artifacts - https://oil-jenkins.canonical.com/artifacts/5f34f524-d765-413c-bdfe-23f00d0bfb68/index.html

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

This is resolved in this charms.ceph patch: https://review.opendev.org/c/openstack/charms.ceph/+/837549

Changed in charms.ceph:
status: New → Fix Released
Revision history for this message
Aymen Frikha (aym-frikha) wrote :

Hello,

This bug, still affecting me, I'm using this charm : openstack-charmers-next-ceph-dashboard , do you know which charm version should I use ?

Thanks

Revision history for this message
Felipe Reyes (freyes) wrote : Re: [Bug 1968715] Re: [quincy-edge] update status fails with json.decoder.JSONDecodeError

On Thu, 2022-05-26 at 15:17 +0000, Aymen Frikha wrote:
> Hello,
>
> This bug, still affecting me, I'm using this charm : openstack-charmers-next-
> ceph-dashboard , do you know which charm version should I use ?

the revision 11 available at the quincy/stable channel has the fix, so someone
running a quincy based ceph cluster should deploy ceph-dashboard in this way:

juju deploy --channel quincy/stable ceph-dashboard

Changed in charm-ceph-dashboard:
status: New → Fix Released
milestone: none → 22.04
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.