Skip to content
This repository has been archived by the owner. It is now read-only.

Overlay: Add an [Install] section to flanneld.service #1102

Closed
danderson opened this issue Jan 30, 2016 · 3 comments
Closed

Overlay: Add an [Install] section to flanneld.service #1102

danderson opened this issue Jan 30, 2016 · 3 comments

Comments

@danderson
Copy link

@danderson danderson commented Jan 30, 2016

I have automation set up to configure flanneld on machine installation via Ignition. However, Ignition is unable to enable flanneld, because the systemd unit file provided in the coreos image doesn't have an [Install] section. Per the semantics of systemd units, this section cannot be provided in a drop-in unit, which leaves Ignition no way of setting flannel to start automatically on system boot.

Please consider adding an [Install] section to coreos-overlay/app-admin/flannel/files/flanneld.service that targets multi-user.target (like e.g. locksmithd does). Happy to provide a PR for this as well, if there's no objection.

@mischief
Copy link

@mischief mischief commented Jan 30, 2016

systemctl add-wants and systemctl add-requires commands can accomplish a
similar goal regardless of the [Install] section of a unit. The [Install]
section usually just determines what symlinks will be created as part of
systemctl enable.
On Jan 30, 2016 1:10 AM, "Dave Anderson" notifications@github.com wrote:

I have automation set up to configure flanneld on machine installation via
Ignition However, Ignition is unable to enable flanneld, because the
systemd unit file provided in the coreos image doesn't have an [Install]
section Per the semantics of systemd units, this section cannot be provided
in a drop-in unit, which leaves Ignition no way of setting flannel to start
automatically on system boot

Please consider adding an [Install] section to
coreos-overlay/app-admin/flannel/files/flanneldservice that targets
multi-usertarget (like eg locksmithd does) Happy to provide a PR for this
as well, if there's no objection


Reply to this email directly or view it on GitHub
#1102.

@danderson
Copy link
Author

@danderson danderson commented Jan 30, 2016

Unlike cloud-config, Ignition doesn't let you run arbitrary commands, so I can't make it run systemctl add-wants/add-requires without setting up a rube goldberg device of one-time units. The only operation it supports is enabling a systemd unit by making use of its [Install] section. Given the choice between adding an [Install] section to flannel, and adding a non-orthogonal config mechanism to Ignition to work around missing install sections, adding [Install] seems much cleaner.

@marineam
Copy link

@marineam marineam commented Jan 30, 2016

Yup, this needs to happen. The missing install section is an artifact from cloudinit days where enabling etcd dependent services instead of starting them directly would generally cause problems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.