snappy services - auto restart
Myles Caley
myles at firstbuild.com
Thu Apr 30 15:06:13 UTC 2015
Ok, I jumped the gun on the hack, looks like the .service files for the
snaps are auto-generated at startup. Is there a template I can modify
somewhere for now?
From: Myles Caley <myles at firstbuild.com>
Date: Thursday, April 30, 2015 at 10:36 AM
To: Sergio Schvezov <sergio.schvezov at canonical.com>, Dustin Kirkland
<kirkland at canonical.com>
Cc: Steve Langasek <steve.langasek at canonical.com>, Snappy Dev List
<snappy-app-devel at lists.ubuntu.com>
Subject: Re: snappy services - auto restart
Thanks Sergio. Confirmed that restart is not enabled by default. I modified
the .service file which is definitely a hack. For our needs, just having
auto-restart by default when installing the snap package is fine. Having
additional controls exposed through the snappy utils is not necessary for us
if this is enabled.
From: Sergio Schvezov <sergio.schvezov at canonical.com>
Date: Saturday, April 25, 2015 at 11:56 AM
To: Dustin Kirkland <kirkland at canonical.com>
Cc: Myles Caley <myles at firstbuild.com>, Steve Langasek
<steve.langasek at canonical.com>, Snappy Dev List
<snappy-app-devel at lists.ubuntu.com>
Subject: Re: snappy services - auto restart
On Thu, Apr 23, 2015 at 12:20 PM, Dustin Kirkland <kirkland at canonical.com>
wrote:
> On Mon, Apr 20, 2015 at 11:05 AM, Myles Caley <myles at firstbuild.com> wrote:
>> > Is there a way to configure services in snapps to auto-restart if the
>> > process dies? Along the same lines, is there a way via snappy CLI to
>> > manually restart a service if it does die?
>
> Hmm, that should be a systemd thing, I suspect.
>
> Sergio, et al, any ideas?
>From my point of view we should be autorestarting services, if that's not
the case, I guess we want to fix that.
For the latter, we don't have a snappy interface to restart services (we
could expose one, not sure about the granularity though), for now here's a
cheatsheet:
Manage and check state:
sudo systemctl [start|stop|restart|status]
[package_name]_[service_name]_[package_version].service
eg; webdm 0.6 has a service called avahi, so I would
sudo systemctl start webdm_avahi_0.6.service
Check logs
sudo journalctl -u [package_name]_[service_name]_[package_version].service
e.g.; to check the aforementioned service's logs:
sudo journalctl -u webdm_avahi_0.6.service
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20150430/094a530b/attachment.html>
More information about the snappy-app-devel
mailing list