We currently build UC20 images that are tied to a custom brand store and are looking to do some load testing that involves creating thousands of VMs.
For the load tests, it is sufficient to use the versions of the snaps that are baked into the image, and we expect these instances to be relatively short lived. We don’t need updates, and don’t want to incur device related fees for these.
Does anyone have any recommendations on how to avoid communication with the brand store for a scenario like this? I’m thinking we could achieve this by skipping registration with the serial vault in our gadget snap, but perhaps there is a better way.
You could probably try building a different gadget snap in a branch or something with the prepare-device hook emptied out so that effectively snapd doesn’t know how to talk to the serial vault you are using and thus never is able to finish getting a serial assertion, but the snaps themselves will still be seeded. Probably worth testing out on a small scale first though to make sure the image still functions as expected without a serial assertion.
Will give it a whirl - that’s inline with what I was thinking as well. Thanks!
Emptied the prepare-device hook in the gadget snap, and the serial is no longer being registered
$ sudo journalctl -u snapd | grep serial
Sep 23 16:30:15 opennmsappliance snapd: taskrunner.go:271: [change 2 "Request device serial" task] failed: cannot deliver device serial request: Cannot process serial request for device with brand "**redacted**brand" and model "**redacted**-uc20"
When attempting to refresh a snap that has been since updated we see the following:
$ sudo snap refresh
error: cannot perform the following tasks:
- Download snap "**redacted**" (391) from channel "latest/edge" (received an unexpected http response code (404) when trying to download https://api.snapcraft.io/api/v1/snaps/download/eJobYrusonozy226Ir0smvnXrIuEgR_391.snap)
So almost working as expected. Should we be concerned that were still able to enumerate the snap version, meaning that some brand store connectivity is still taking place?