Race condition may appear if multiple instances being created with on different target nodes in cluster using the same image name.
Some instances creation fails with error: Failed instance creation: Failed creating image record: Failed saving main image record: UNIQUE constraint failed: images.project_id, images.fingerprint.
Steps to reproduce
Deploy incus cluster with 3+ nodes and use shared storage (I use 7's nodes RPI4cluster with ceph storage).
Issue
Race condition may appear if multiple instances being created with on different target nodes in cluster using the same image name. Some instances creation fails with error:
Failed instance creation: Failed creating image record: Failed saving main image record: UNIQUE constraint failed: images.project_id, images.fingerprint
.Steps to reproduce
incus
cluster with 3+ nodes and use shared storage (I use 7's nodesRPI4
cluster withceph
storage).In my environment two-to-four instance deployments fails with error:
Failed instance creation: Failed creating image record: Failed saving main image record: UNIQUE constraint failed: images.project_id, images.fingerprint
.Below is the worsest case output where image was deleted before it cloned for
inst-03
root device: