Mojo should use flock to lock spec invocation
Bug #1560230 reported by
Wes Mason
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mojo: Continuous Delivery for Juju |
Confirmed
|
Medium
|
Unassigned |
Bug Description
It is possible to hit race conditions by invoking specs more than once, e.g from auto-rollout scripts, manually invoking, perhaps invoking different manifests, scripts, etc. within the same spec.
As a real example we had a case recently were a service was mysteriously being automatically downgraded to an older revision of a charm, because the upgrade script was simultaneously being invoked at the same time as a collect/repo phase which overwrote the contents of the charm payload prior to upgrade.
I think to avoid this the most workable solution would be an early flock invocation against a file in the workspace, which gets unlocked on exit (including on SIG* trap).
Changed in mojo: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
To post a comment you must log in.