snapd debug without systemd activation

Boris Rybalkin ribalkin at gmail.com
Mon Dec 5 09:25:17 UTC 2016


Disabling systemd socket  (snapd.socket) is just half a task. You do not
really want systemd to run your service (snapd.service) as you are running
it already in debug mode from IDE. Another thing, activation library
expects systemd env variables (LISTEN_PID, LISTEN_FDS) to be set, so there
should be fallback to standalone mode.

Again, I am actually asking how do you guys debug it from your IDE, as I do
not want to reinvent things?

If you are interested in some pull request for snapd to create these
sockets by its own when ran outside of systemd, let me know :)


On 5 Dec 2016 09:11, "Didier Roche" <didrocks at ubuntu.com> wrote:

> Le 05/12/2016 à 09:58, Boris Rybalkin a écrit :
> > Hello,
> >
> > Is it possible to run snapd for debugging without systemd socket
> > activation ?
> >
> > There is a check here:
> > https://github.com/snapcore/snapd/blob/master/daemon/daemon.go#L198
> >
> > Which seems to expect socket from systemd.
> >
> > I was able to run and debug without systemd by adding explicit socket
> > creation lines if activation did not return a valid listener.
> >
> > Should there be some 'else if "STANDALONE_MODE" == 1 then create
> > sockets' ?
> >
> > I am using Idea go plugin and ideally hitting shift + f9 should just
> work.
> Hey,
>
> I'm unsure if there is any way in snapd to handle this directly.
>
> However, you can use systemd functionality to disable the socket listening:
> sudo systemctl disable snapd.socket
>
> Cheers,
> Didier
>
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161205/cf16752e/attachment.html>


More information about the Snapcraft mailing list