Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snap] Implement restart API #3160

Open
benfrancis opened this issue Aug 22, 2024 · 3 comments
Open

[Snap] Implement restart API #3160

benfrancis opened this issue Aug 22, 2024 · 3 comments
Labels
snap Issues relating to the snap package task

Comments

@benfrancis
Copy link
Member

On other platforms it's possible for the gateway to restart itself as part of setup and update procedures. This includes both restarting the gateway application, and restarting the whole operating system.

E.g. see https://github.com/WebThingsIO/gateway/blob/master/src/platforms/linux-raspbian.ts#L595

@benfrancis benfrancis added snap Issues relating to the snap package task labels Aug 22, 2024
@benfrancis benfrancis added this to the 2.0 milestone Aug 22, 2024
@benfrancis
Copy link
Member Author

Is this actually necessary if snapd automatically restarts things when needed? Regardless it would be useful to have an implementation of the restart API which can be consumed by the front end to remotely reboot the gateway (as the power settings add-on does when running on Raspbian),

@dilyn-corner
Copy link
Contributor

snapd will reboot the system itself under certain update conditions, namely when core things like the kernel update (I believe it is all of the kernel, snapd, or the gadget update).

Just in case you want an update of your own snaps to reboot the system, I would probably create a post-refresh hook which ensures the update succeeded and then reboots the system.

Critically, the shutdown interface is now considered super-privileged; as such there's a bit more rigmarole to get it connected on Core.

@benfrancis
Copy link
Member Author

OK, it sounds as though we may not actually need to expose an API for this to the front end for the use case of restarting after an upgrade. I'm therefore going to remove the 2.0 milestone from this one but keep the issue open because it would still be useful for add-ons, or to add a remote reboot feature to the front end.

@benfrancis benfrancis removed this from the 2.0 milestone Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snap Issues relating to the snap package task
Projects
Status: Product Backlog
Development

No branches or pull requests

2 participants