[systemd-devel] networking services management idea
Chris Ferron
chris.e.ferron at linux.intel.com
Thu Aug 2 11:54:35 PDT 2012
On 08/01/2012 11:57 PM, David Strauss wrote:
> Unless the services take long to start, you'll have a much better time
> with socket activation. With socket activation, the service won't just
> wait until network availability to come online; the service will wait
> until an actual request to come online.
>
> Also check out my other posts to the mailing list about network
> availability levels and service management.
Thanks David, I just read you posts in the thread " network consuming
user services" where some of this was touched on. I see the points on
the services being socket activated or listing to netlink and so-forth.
But in my case, there are outgoing services, so protocol specific, that
one just might not want even started unless a specific state is
obtained. Agreed that network session level activity should be monitored
and managed within the service, but before that when to really start the
service.
I am not talking about stalling or interfering with network.target, but
I suggest is setting up targets that outgoing services could use or
distro/admins could use to better structure in a generic scene.
For instance. There is a service that uses NFC to used in credit card
services. lets call it NFC-your-money.service
This service needs an an active NFC connection, and is the service used
to pay for things using you phone from you checking account. (No I don't
have or use this.)
1. I don't want such a service running if I don't have a NFC connection.
2. I don't want it running if I loose my NFC connection.
3. I don't want to start the service to check if I have a NFC connection .
I hope that having some predefined targets like maybe
network-ready.target
--->network-ready.target.wants
---> local-only-network.service
network-online.target
---> network-online.target.wants
---> npt.service
---> device-updater.service
network-nfc-ready.target
---> network-nfc-ready.target.wants
---> NFC-your-money.service
Then mapping out some singles to network managers and associating
networking service state with targets
we could start and stop the units based on the change in networking
state. Then depending on the state, using systemd start or stop unit
method we can start and stop the targets.
Again the thinking is using this only for services were is appropriate.
Mostly by the digression of the distros, service providers, or device
customizations, or even admins.
-Chris
More information about the systemd-devel
mailing list