Allow juju-log in restricted collect-metrics hook context
Bug #1763407 reported by
Adam Israel
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Simon Richardson |
Bug Description
I understand that collect-metrics runs in a restricted hook context because it can run concurrently with other hook executions.
Would it be feasible to allow `juju-log` to run in this restricted context? I'm finding that it is complicated to properly debug a failing collect-metrics run, because it cannot be used interactively ala debug-hooks, and I can't log to Juju.
There are alternative workarounds (writing to a local file, exercising the code in an action + debug-hooks, etc), but making juju-log available would be a cleaner approach, from a development standpoint.
Changed in juju: | |
milestone: | none → 2.4.1 |
Changed in juju: | |
assignee: | nobody → Simon Richardson (simonrichardson) |
Changed in juju: | |
status: | Triaged → Fix Committed |
Changed in juju: | |
milestone: | 2.4.1 → 2.4-rc2 |
Changed in juju: | |
milestone: | 2.4-rc2 → 2.4.1 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This seems reasonable to me, as 'juju-log' doesn't record anything mutating. Though I'd say we probably would rather collect-metrics don't log in standard practice, because they do run so often and it would clutter messages from more interesting events, it should probably just be recommended practice, not explicitly mandated.
I'm not sure how the restricted context is created, but however we do it, we can probably add juju-log to whatever other tools we do provide.