Help snaps be helpful to the user if they fail to start
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
If a snap, once installed, will not be available to the user for some reason, it could be helpful to tell the installing user that directly in some way.
For example, if one has a webserver bound to port 80 and then installs nextcloud from a snap ("snap install nextcloud"), that nextcloud server will not start; it expects to be able to use port 80, and cannot. It writes an error to its log, which one can read with "snap logs nextcloud", but one has to know to look there or even that logs exist. It would perhaps be helpful, when the snap installs but fails to start, if an error were printed by snapd in response to the snap install command, which is the one place we know that the user is already looking.
Nextcloud can be configured to run on a different port; the snap error could point to a description
of the problem (something already has port 80) and how to fix it (stop the port 80 service, or configure nextcloud with snap set to use a different port). This suggests that the error message text should be provided by the snap itself, but snapd could provide a way for a snap to test that it's working and then display that configured error message if it isn't. (And nextcloud is something more destined to less-technical users than, for example, nginx or apache, which collide with the same issue.)
As a data point, mysql-server installed with apt explicitly prints "Failed to start MySQL Community server" in red text and fails the installation, if it can't have its default port of 3306.
Changed in snapd: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |