Resources are sometimes missing during charm install hook
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
Every once in a while, we see a deployment where one of the units goes through initial hooks (install, leader-elected, config-changed) without any resources, despite having resources provided to `juju deploy`.
An upgrade-charm hook occurs shortly after, at which point the resources become available.
This behavior is problematic for me as a charm developer. Our users need to tightly control when individual units perform their upgrade with a new resource; we've introduced an `upgrade` action for this. In order to provide a good user experience, we have to change the status message to inform the user that the upgrade action needs to be invoked.
The problem is that the charm can't distinguish between initial deployment (where the resource should be fetched and used right away) or a `juju attach` (where the resource should -not- be used yet, and a status message printed instead). Originally we thought the invocation of an `upgrade-charm` hook would signal this to the charm, but given the behavior described above, that isn't always the case.
Attachments incoming...
tags: | added: race-condition resources |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
Attached output of juju status - this is a minimal test charm with an install hook that sets the status message to the output of `resource-get test0`. Note that the leader is the one who was missing a resource.