<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 03/01/2017 à 13:18, James Page a
écrit :<br>
</div>
<blockquote
cite="mid:CAG1bqQqSTTXtZjoJW05cEGALEDDX4CceWL0-QKhHr4TAp6Pz6w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Tue, 3 Jan 2017 at 12:15 James Page <<a
moz-do-not-send="true" href="mailto:james.page@ubuntu.com"><a class="moz-txt-link-abbreviated" href="mailto:james.page@ubuntu.com">james.page@ubuntu.com</a></a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="gmail_msg">
<div class="gmail_quote gmail_msg">
<div dir="ltr" class="gmail_msg">On Tue, 3 Jan 2017 at
11:58 Gustavo Niemeyer <<a moz-do-not-send="true"
href="mailto:gustavo.niemeyer@canonical.com"
class="gmail_msg" target="_blank">gustavo.niemeyer@canonical.com</a>>
wrote:<br class="gmail_msg">
</div>
</div>
</div>
<div dir="ltr" class="gmail_msg">
<div class="gmail_quote gmail_msg">
<blockquote class="gmail_quote gmail_msg"
style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div dir="ltr" class="gmail_msg">Will systemd handle
multiple services with the same name without
complaining? How would it disambiguate?
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">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.</div>
</div>
</blockquote>
<div class="gmail_msg"><br class="gmail_msg">
</div>
</div>
</div>
<div dir="ltr" class="gmail_msg">
<div class="gmail_quote gmail_msg">
<div class="gmail_msg"><span
style="color:rgb(33,33,33);font-size:13px"
class="gmail_msg">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!</span></div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>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</div>
<div><br>
</div>
<div>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 :-) <br>
</div>
</div>
</div>
<br>
</blockquote>
<br>
Indeed, systemd has aliases for years, and we should use similarly
the Alias keyword in the unit file for those cases.<br>
This just create a symlink at the right place and ensure only one
unit with this symlink can be enabled at a time.<br>
<br>
This is how things like display manager, where some alternatives but
a fixed service name might be needed (for dependencies) are handled,
fyi.<br>
Cheers,<br>
Didier<br>
<p><br>
</p>
</body>
</html>