Snap daemonization ordering and manual interface connections

Didier Roche didrocks at ubuntu.com
Wed Jul 13 16:04:44 UTC 2016


Le 13/07/2016 03:45, MikeB a écrit :
> 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.

Hey Mike,

I agree with both statements and proposal. We could have smarter systemd
unit generated for those use cases.
Do you mind opening them as 2 bugs on
https://bugs.launchpad.net/snappy/+filebug?

Cheers,
Didier

PS: I guess giving a way for reusing parts of a systemd units syntax
would go a long way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160713/7b13e866/attachment.html>


More information about the Snapcraft mailing list