Hello folks,
I was doing a remodel, and In the new model I wanted to add more snaps, but I noticed that the remodel failed because it was trying to install an ephemeral snap that we use in install mode:
"name": "name-manufacturing",
"type": "app",
"modes": [
"ephemeral"
],
"default-channel": "latest/edge",
"id": "someID"
And I do know that a manufacturing snap is going to fail installation on a running device, but is it expected to install an ephemeral snap in a remodel ?
Should we assume that the remodel must not include those ephemeral snaps ?
I did try to make a new model without that particular snap, and the remodel went through with no issues.
I tried to go back to install mode after remodel, but since I removed it from the model, it failed
.
Is there other way to make sure we can include the ephemeral snap into the new model, and avoid the installation of said snap in the remodel?
If you use “install” instead of “ephemeral”. Do you still get the issue? If I remember correctly remodel tests thing by booting in recovery. And that will use the “ephemeral” snaps. Not sure this is the failure here though. It sounds like this also got installed in “run” mode. But it would nice if you could confirm you see the same behavior. Just so that we do not look for the bug at the wrong place.
@valentind
If you use “install” instead of “ephemeral”. Do you still get the issue?
I need some time to check this.
If I remember correctly remodel tests thing by booting in recovery. And that will use the “ephemeral” snaps. Not sure this is the failure here though. It sounds like this also got installed in “run” mode
Yes it seems it got install in run mode, as in our workaround we check for snapctl system-mode in the install hook and we get run mode when this happens so we don’t continue with the hook parts that were problematic, then we don’t get this problem on remodel.
I’ll come back after I test this ( changing to install instead of ephemeral )