surface hook errors

Bug #1629819 reported by Stuart Bishop
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
High
Unassigned

Bug Description

[Edit: Juju was working fine, except that it was swallowing an error from my hook making it difficult to diagnose and look like Juju was at fault]

I just bootstrapped a fresh lxd controller and deployed cs:postgresql and cs:ntp to the default model, and related postgresql and ntp.

The ntp install hook failed with:

unit-ntp-0: 16:45:55 ERROR juju.worker.dependency "metric-collect" manifold worker returned unexpected error: failed to read charm from: /var/lib/juju/agents/unit-ntp-0/charm: stat /var/lib/juju/agents/unit-ntp-0/charm: no such file or directory

Automatic retries also fail:

unit-ntp-0: 16:45:56 INFO juju.worker.uniter found queued "install" hook
unit-ntp-0: 16:45:56 ERROR juju.worker.uniter.operation hook "install" failed: fork/exec /var/lib/juju/agents/unit-ntp-0/charm/hooks/install: no such file or directory

That last error is peculiar, because the file actually exists:

ubuntu@juju-e02564-0:/var/lib/juju/agents/unit-ntp-0/charm/hooks$ ls -al /var/lib/juju/agents/unit-ntp-0/charm/hooks/install
lrwxrwxrwx 1 root root 12 Oct 3 09:45 /var/lib/juju/agents/unit-ntp-0/charm/hooks/install -> ntp_hooks.py
ubuntu@juju-e02564-0:/var/lib/juju/agents/unit-ntp-0/charm/hooks$ ls -al ntp_hooks.py
-rwxr-xr-x 1 root root 5019 Oct 3 09:45 ntp_hooks.py
ubuntu@juju-e02564-0:/var/lib/juju/agents/unit-ntp-0/charm/hooks$ cat ntp_hooks.py > /dev/null
ubuntu@juju-e02564-0:/var/lib/juju/agents/unit-ntp-0/charm/hooks$ cat install > /dev/null

Revision history for this message
Stuart Bishop (stub) wrote :
Revision history for this message
Stuart Bishop (stub) wrote :
Revision history for this message
Stuart Bishop (stub) wrote :
Revision history for this message
Stuart Bishop (stub) wrote :
Revision history for this message
Stuart Bishop (stub) wrote :
tags: added: canonical-is
Revision history for this message
Stuart Bishop (stub) wrote :

In debug-hooks:

root@juju-517c57-0:/var/lib/juju/agents/unit-ntp-0/charm# hooks/install
bash: hooks/install: /usr/bin/python: bad interpreter: No such file or directory

Juju needs to log this failure, rather than hide it with a message that makes it look like Juju's fault.

Changed in juju:
status: New → Invalid
status: Invalid → New
Stuart Bishop (stub)
description: updated
tags: added: logging
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 2.1.0
Revision history for this message
Alexis Bruemmer (alexis-bruemmer) wrote :

Moving this to high as it is impacting multiple users

Changed in juju:
importance: Medium → High
tags: added: metrics-collector
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Removing 2.1 milestone as we will not be addressing this issue in 2.1.

Re-named to reflect required change.

summary: - Subordinate failed to install, "metric-collect" manifold worker
+ surface hook errors
Changed in juju:
milestone: 2.1-rc2 → none
Revision history for this message
Casey Marshall (cmars) wrote :

@Anastasia The metric-collect manifold log noise is addressed in LP:#1656258

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.