New 2.20 snapd release

Didier Roche didrocks at ubuntu.com
Thu Jan 5 15:01:47 UTC 2017


Le 03/01/2017 à 13:18, James Page a écrit :
> On Tue, 3 Jan 2017 at 12:15 James Page <james.page at ubuntu.com
> <mailto:james.page at ubuntu.com>> wrote:
>
>     On Tue, 3 Jan 2017 at 11:58 Gustavo Niemeyer
>     <gustavo.niemeyer at canonical.com
>     <mailto:gustavo.niemeyer at canonical.com>> wrote:
>
>         Will systemd handle multiple services with the same name
>         without complaining? How would it disambiguate?
>
>         We can pull off snap aliases because the binary paths are
>         separate (not /usr/bin), and thus won't actually conflict even
>         if system packages and snaps define the same name.
>
>
>     I could see how this might be a problem; an Alias can either be
>     defined in the systemd unit file (in which case systemd will
>     create an appropriate symlink), or by creating the symlink from
>     alias->actual in /etc/systemd/system - I'll poke at things and see
>     how that might break!
>
>
> It would appear that any symlink created in /etc/systemd/system masks
> anything provided by a deb package in /lib/systemd/system - so the
> glance-api alias from a snap would override the glance-api systemd
> unit file provided by a deb package installed on the same system
>
> I guess this also fits into the general question of how to transition
> an existing system from deb->snap in a elegant way as well :-) 
>

Indeed, systemd has aliases for years, and we should use similarly the
Alias keyword in the unit file for those cases.
This just create a symlink at the right place and ensure only one unit
with this symlink can be enabled at a time.

This is how things like display manager, where some alternatives but a
fixed service name might be needed (for dependencies) are handled, fyi.
Cheers,
Didier


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170105/b0afefd5/attachment.html>


More information about the Snapcraft mailing list