lxc: create status data in lxd to avoid race
Metadata
Current evaluation
Merged PR #376 (commit 9a831a5) adds user.craft_providers.status/timer LXD config keys plus instance restart() to avoid duplicate-instance race; fixes #341.
Resolution: closed resolved
Reason: PR #376 was merged into main as commit 9a831a5 ("lxc: create status data in lxd to avoid race"), adding a ProviderInstanceStatus state machine tracked via user.craft_providers.status/timer and a restart() method on LXD instance/manager. The code is present in launcher.py, lxc.py and lxd_instance.py at HEAD, and the PR body declares "Fixes #341", closing the concurrent instance creation race.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #376 (commit 9a831a5) adds user.craft_providers.status/timer LXD config keys plus instance restart() to avoid duplicate-instance race; fixes #341. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged as #376, adding LXD status tracking and a restart() method to prevent race conditions during instance creation, resolving #341. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/craft-providers#341
(confidence 95%)
Race condition issue explicitly fixed by this merged PR per its "Fixes #341" line.
-
Related To:
canonical/craft-providers#357
(confidence 65%)
Earlier partial mitigation "lxc: recheck when creating project failed" (commits 81a5a34/3b7345d) also touched #341; this PR is the more complete LXD-status-based fix.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #341 lxd: race condition when running multiple instances of craft-providers | craft-providers | closed | Fixed by merged PR #357, which rechecks LXC project existence after creation fails, preventing concurrent project-creation races (CRAFT-1849). | |
| #387 Race in LXD config set | craft-providers | closed | Fixed by merged PR #386, which eliminated competing LXC locks and the resulting config-set ETag mismatch race. |