Charm fails to go ready in juju 3.5

Bug #2070277 reported by Adam Dyess
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
CoreDNS Charm
Invalid
Undecided
Adam Dyess

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 :
Revision history for this message
Gaetan Gouzi (ggouzi) wrote (last edit ):

Facing the issue during deployment at a customer
- Juju v3.5.1
- Charm CK 1.29
- Charm-coredns latest/stable rev 126

Same charm with same configuration was deployed successfully in Juju v3.3.1 and CK 1.28
Leaving the cluster with defective coredns as-is. In case you want us to provide more information for troubleshooting.
Problem is reproducible in my setup.

Revision history for this message
Gaetan Gouzi (ggouzi) wrote :
Revision history for this message
Gaetan Gouzi (ggouzi) wrote :

Problem does not appear in Juju v3.5.2

Revision history for this message
Adam Dyess (addyess) wrote :

This was caused by an upstream bug in juju and has since been resolved. Closing as Invalid

Changed in charm-coredns:
status: New → Invalid
assignee: nobody → Adam Dyess (addyess)
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.