Charm fails to go ready in juju 3.5

Bug #2070277 reported by Adam Dyess
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CoreDNS Charm
New
Undecided
Unassigned

Bug Description

Uncaught exception found in charm code during coredns-pebble-ready and the charm never resolves

unit-coredns-0: 2024-06-22 14:21:38 ERROR unit.coredns/0.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-coredns-0/charm/./src/charm.py", line 171, in <module>
    main(CoreDNSCharm)
  File "/var/lib/juju/agents/unit-coredns-0/charm/venv/ops/main.py", line 544, in main
    manager.run()
  File "/var/lib/juju/agents/unit-coredns-0/charm/venv/ops/main.py", line 520, in run
    self._emit()
  File "/var/lib/juju/agents/unit-coredns-0/charm/venv/ops/main.py", line 509, in _emit
    _emit_charm_event(self.charm, self.dispatcher.event_name)
  File "/var/lib/juju/agents/unit-coredns-0/charm/venv/ops/main.py", line 143, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-coredns-0/charm/venv/ops/framework.py", line 352, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-coredns-0/charm/venv/ops/framework.py", line 851, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-coredns-0/charm/venv/ops/framework.py", line 941, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-coredns-0/charm/./src/charm.py", line 64, in _on_coredns_pebble_ready
    self._push_corefile_config(event)
  File "/var/lib/juju/agents/unit-coredns-0/charm/./src/charm.py", line 143, in _push_corefile_config
    container.push("/etc/coredns/Corefile", corefile, make_dirs=True)
  File "/var/lib/juju/agents/unit-coredns-0/charm/venv/ops/model.py", line 2302, in push
    self._pebble.push(str(path), source, encoding=encoding,
  File "/var/lib/juju/agents/unit-coredns-0/charm/venv/ops/pebble.py", line 2256, in push
    self._raise_on_path_error(typing.cast('_FilesResponse', resp), path)
  File "/var/lib/juju/agents/unit-coredns-0/charm/venv/ops/pebble.py", line 2204, in _raise_on_path_error
    raise PathError(error['kind'], error['message'])
ops.pebble.PathError: permission-denied - cannot create directory: mkdir /etc/coredns: permission denied

Adam Dyess (addyess)
Changed in charm-coredns:
milestone: none → 1.30+ck1
Revision history for this message
Adam Dyess (addyess) wrote :

Observed on 1.29/stable (rev 141) of the charm

Revision history for this message
Adam Dyess (addyess) wrote :
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.