Losing log messages from failing hooks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Per https:/
Quote:
We seem to be missing log output in the failed node, in particular the error message from pg_basebackup. The code (taken from the live, failed unit - the correct code is being deployed) looks like this:
if 'following' not in local_state:
# Before we start destroying anything, ensure that the
# master is contactable.
[...]
try:
output = subprocess.
log(output, DEBUG)
# Debian by default expects SSL certificates in the datadir.
os.symlink(
os.symlink(
except subprocess.
# We failed, and this cluster is broken. Rebuild a
# working cluster so start/stop etc. works and we
# can retry hooks again. Even assuming the charm is
# functioning correctly, the clone may still fail
# due to eg. lack of disk space.
log("Clone failed, db cluster destroyed", ERROR)
if os.path.
if os.path.
raise
finally:
The first part in the following quoted log is from the generate_pgpass() call. The rest of the log messages are missing up until the traceback is reported. The same log helper charmhelpers.
2013-08-05 15:19:16 INFO juju server.go:105 worker/
2013-08-05 15:19:16 DEBUG juju server.go:106 worker/
2013-08-05 15:19:16 INFO juju juju-log.go:64 postgresql/1 replication:0: Writing file /var/lib/
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK Traceback (most recent call last):
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK File "/var/lib/
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK hooks.execute(
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK File "/var/lib/
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK self._hooks[
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK File "/var/lib/
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK clone_database(
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK File "/var/lib/
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK output = subprocess.
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK File "/usr/lib/
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK raise CalledProcessEr
2013-08-05 15:19:18 INFO juju context.go:235 worker/uniter: HOOK subprocess.
2013-08-05 15:19:18 ERROR juju uniter.go:352 worker/uniter: hook failed: exit status 1
2013-08-05 15:19:18 DEBUG juju modes.go:407 worker/uniter: ModeAbide exiting
2013-08-05 15:19:18 INFO juju modes.go:405 worker/uniter: ModeHookError starting
2013-08-05 15:19:18 DEBUG juju filter.go:384 worker/
2013-08-05 15:19:18 DEBUG juju filter.go:378 worker/
2013-08-05 15:19:18 DEBUG juju filter.go:482 worker/
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: logging |
tags: | added: landscape |
Changed in juju-core: | |
importance: | High → Medium |
A lot has changed in logging since this bug was filed both on Juju 1.x - current 1.25.x - and Juju 2.
We believe that this has been resolved. If you encounter any further issues with logging on Juju 2, please file a bug against "juju" with reproducible scenario and newer logs.