"Try again" mechanism for snaplist comes with no guarantee that snaps will be installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subiquity (Ubuntu) |
Fix Released
|
Undecided
|
Olivier Gayot |
Bug Description
When reaching the snaps selection section, some scenarios will cause Subiquity to show the following message:
▄▄▄▄▄▄▄
Featured Server Snaps [ Help ]
▀▀▀▀▀▀▀
Sorry, loading snaps from the store failed.
[ Try again ]
[ Continue ]
If the error was caused by something temporary, the list of snaps might load successfully after hitting "Try again". And if it does, the user can then select snaps to install.
The problem is that when subiquity shows this "Try again" window, the server has already marked the snaplist model configured. Therefore, the installation may or may not have already generated the cloud-config configuration by the time the user selects the snaps they want to get installed.
If the cloud-config was already generated, the snaps selected by the user are ignored and do not get installed by cloud-init.
Technical details:
GET /snaplist will mark the snaplist model configured if the result is FAILED.
subiquity/
async def GET(self, wait: bool = False) -> SnapListResponse:
if self.loader.failed or not self.app.
await self.configured()
return SnapListRespons
if not self.loader.
return SnapListRespons
await self.loader.
if self.loader.failed or not self.app.
await self.configured()
return SnapListRespons
return SnapListResponse(
IMO it makes sense to allow the user/client to retry (or at least decide what to do) when this type of error (generally caused by the network) is encountered. If we want to keep a retry mechanism in place, we should not mark the models configured automatically - especially the last one.
Changed in subiquity (Ubuntu): | |
assignee: | nobody → Olivier Gayot (ogayot) |
status: | New → In Progress |
Changed in subiquity (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in subiquity (Ubuntu): | |
status: | Fix Committed → Fix Released |
https:/ /github. com/canonical/ subiquity/ pull/1425