Bug 1166312 - RFE: etcd unit should support command line options
Summary: RFE: etcd unit should support command line options
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: etcd
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Luke Cypret
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-20 19:31 UTC by Lars Kellogg-Stedman
Modified: 2015-04-13 19:54 UTC (History)
7 users (show)

Fixed In Version: etcd-2.0.3-0.2
Clone Of:
Environment:
Last Closed: 2015-04-13 19:52:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lars Kellogg-Stedman 2014-11-20 19:31:50 UTC
The "etcd.service" unit distributed with Fedora 21 (atomic) does not contain any facilities for passing arguments to etcd.  That is, it looks like this:

[Service]
Type=simple
StandardOutput=null
WorkingDirectory=/var/lib/etcd
User=etcd
ExecStart=/usr/bin/etcd

This means that if a deployer wants to pass arguments to etcd at boot (such as a discovery URL), the only option is to introduce a new unit file in /etc/systemd/system.

This works, but it seems like a heavy hammer.

It seems as if a better choice would be to introduce an EnvironmentFile directive like we do for so many other units.  Something like:

[Service]
Type=simple
StandardOutput=null
WorkingDirectory=/var/lib/etcd
User=etcd
EnvironmentFile=/etc/sysconfig/etcd
ExecStart=/usr/bin/etcd $OPTIONS

Comment 1 Eric Paris 2014-11-20 20:25:42 UTC
etcd (at least 0.4) has a config file.  /etc/etcd/etcd.conf

Which is sourced and used by etcd itself.

This might go away in 0.5 or 0.6, in which case we will look to support the model you describe.  But right now, I don't see a bug here.

Comment 2 Lars Kellogg-Stedman 2014-11-20 21:17:21 UTC
I thought that the config file *was* going away in 0.5 (rather than "might"), so I figured that preparing for that in advance would mean that people would be able to transition from 0.4.6 to 0.5.x with fewer changes.  But consider this an RFE rather than a bug, I guess.

Comment 3 Jan Chaloupka 2015-04-13 19:52:37 UTC
Since etcd-2.0.* (already updated in f20-rawhide) has introduces environment file (path is the same, content of /etc/etcd/etcd.conf has changed), we can close this bug as resolved in the current release.


Note You need to log in before you can comment on or make changes to this bug.