Snap install does not replace file atomically

Bug #1843894 reported by Pat Viafore
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Triaged
Medium
Unassigned

Bug Description

Use case:

We have jenkins running with periodic jobs to build a snap and then install the snap to the slave.

At the same time, we have jobs that are using the snap, and they will fail occasionally with the snap not being found. It feels like we're in a brief window where our old snap is removed and the new snap is installed.

Is there any way where the install of the snap can be atomic?

Revision history for this message
Ian Johnson (anonymouse67) wrote :

When you say some jobs are using the snap, do you mean using the applications exposed from the snap in $SNAP/bin?

While it's unclear exactly what is not atomic here, it sounds like this might be fixed somewhat by using refresh awareness, but it's not clear to me if the snap is actually being refreshed or not. See https://forum.snapcraft.io/t/wip-refresh-app-awareness/10736 for details of how to try this out and see if it fixes anything for you.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

It's true that a "snap refresh" is not atomic in the sense that a concurrently racing process attempting to spawn an application which happens to be a snap will see a window during which that snap is not going to exist.

Changed in snapd:
status: New → Confirmed
Changed in snapd:
importance: Undecided → Medium
status: Confirmed → Triaged
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.