juju refresh can fail due to empty charm sha256

Bug #2059990 reported by Ian Booth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Heather Lanigan

Bug Description

It's been observed when running some smoke tests that the unit agent can error when deploying / refreshing a charm - the agent goes to failure status with an error that the charm's sha256 is empty.

It turns out his can happen if the charm is not yet saved to the database when the unit agent makes the api call during deploy / refresh. The root cause here is ultimately the transition to async deploys. There's mistakes in that implementation if the unit agent is allowed to start or upgrade before the charm is ready.

Revision history for this message
Ian Booth (wallyworld) wrote :

This PR https://github.com/juju/juju/pull/17134 adds a defensive retry to the unit agent CharmArchiveSha256() method. It will mask the issue until a proper fix can be done.

Revision history for this message
Joseph Phillips (manadart) wrote :

Ultimate fix should accommodate https://bugs.launchpad.net/juju/+bug/2058700 too.

Harry Pidcock (hpidcock)
summary: - juju refresh can fail due to emoty charm sha256
+ juju refresh can fail due to empty charm sha256
Changed in juju:
milestone: 3.3.4 → 3.3.5
Changed in juju:
milestone: 3.3.5 → 3.3.6
Changed in juju:
assignee: nobody → Caner Derici (cderici)
milestone: 3.3.6 → 3.4.4
Caner Derici (cderici)
Changed in juju:
milestone: 3.4.4 → 3.4.5
Revision history for this message
Caner Derici (cderici) wrote :

This is related to https://bugs.launchpad.net/juju/+bug/2053242 (see my comment #3), had a fix up https://github.com/juju/juju/pull/17504 (just realized that it's similar to Ian's PR above), but Heather wanted to take over that one for a more holistic approach (see https://github.com/juju/juju/pull/17504#pullrequestreview-2112189555). I'll ask her if she wants to take over this one as well.

Changed in juju:
assignee: Caner Derici (cderici) → Heather Lanigan (hmlanigan)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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