Snap daemonization ordering and manual interface connections

MikeB mabnhdev at gmail.com
Wed Jul 13 10:45:07 UTC 2016


I'm working on a snapping up OpenSwitch which is essentially a network
operating system (NOS) for white box network switches.

The OpenSwitch NOS is made up of many daemons (snapcraft apps) that control
network hardware and networking protocols.

Many of the apps have plugs for network-control, network-manager, and
network-observe.  These plugs are not automatically connected by snapd when
the snap is installed - they must be manually connected using the 'snap
connect' command.

The problem I'm running into is that daemonization of most of the apps
fails because the plugs are not connected at the time snapd starts up the
daemons and everything falls apart.

I understand why you want manual connections for some "critcal"
interfaces.  However, if you're going to require manual intervention, the
snapd should be smart enough to wait for the required connections before
starting up any daemons that have plugs for those "critical" interfaces.
Perhaps even nagging about unconnected plugs in the snap.

A somewhat related issue is that I really think snapd needs to support the
concept of ordering daemonization much like systemd's before/after clauses
- otherwise, you force developers to create awkward wrappers around daemons
to create ad-hoc ordering.

Regards, Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160713/067c2c81/attachment.html>


More information about the Snapcraft mailing list