[systemd-devel] Query regarding "EnvironmentFile"

Manuel Amador (Rudd-O) rudd-o at rudd-o.com
Sat Dec 26 10:38:03 PST 2015


On 12/23/2015 07:30 PM, Alex Crawford wrote:
> We use it within CoreOS to allow the user to inject dynamic data into the
> service. For example, you may have a service like this:
>
>  $ cat etcd.service
>  [Unit]
>  Requires=metadata.service
>  After=metadata.service
>
>  [Service]
>  EnvironmentFile=/run/coreos/metadata
>  ExecStart=/usr/bin/etcd --public-ip=${COREOS_PRIVATE_IPV4}
>
> where "metadata.service" populates /run/coreos/metadata with a bunch of info
> about the system (like Facter from puppet). The user can then pick and choose
> the appropriate variables to use (maybe they need the public address instead)
> and override the ExecStart in a drop-in.
This breaks reload.

But, of course, if etcd does not support reload, and it's planned that
one etcd node will fail to serve its clients while it is down /
restarting, then it's a fine use of EnvFile.

-- 
    Rudd-O
    http://rudd-o.com/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151226/7146bec1/attachment.sig>


More information about the systemd-devel mailing list