install hook error only gives useful information if Juju's logging-config="unit=DEBUG"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned | ||
Ceph OSD Charm |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Default Juju logging-config was "<root>=WARNING":
"""
2020-06-16 16:31:44 INFO juju.cmd.jujud agent.go:138 setting logging config to "<root>=WARNING"
2020-06-16 16:33:12 ERROR juju.worker.
"""
As seen, that is the error given by the ceph-osd/1 unit.
After changing "juju model-config logging-
"""
2020-06-17 08:36:46 DEBUG install E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
"""
A traceback is also returned, which seems fine just in DEBUG bug. However, I would have expected this one line to be part of the hookenv.ERROR logging level as it provides the exact issue and how it can be fixed.
tags: | added: charm-debugging |
Changed in juju: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in charm-ceph-osd: | |
status: | New → Triaged |
importance: | Undecided → Low |
status: | Triaged → Invalid |
importance: | Low → Undecided |
This also happened on charm-nova- cloud-controlle r. See: relation- changed dns.resolver. NoNameservers: All nameservers failed to answer the query vm4. IN A: Server 127.0.0.53 UDP port 53 answered SERVFAIL uniter. operation runhook.go:136 hook "cloud- compute- relation- changed" (via explicit, bespoke hook script) failed: exit status 1
"""
2020-06-17 09:03:23 DEBUG cloud-compute-
2020-06-17 09:03:23 ERROR juju.worker.
"""
The ERROR level only says that the hook failed, while the DEBUG level says why (+ a python traceback).