Bug 1166312

Summary: RFE: etcd unit should support command line options
Product: [Fedora] Fedora Reporter: Lars Kellogg-Stedman <lars>
Component: etcdAssignee: Luke Cypret <lacypret>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: eparis, golang-updates, jchaloup, jeder, lacypret, lemenkov, sdodson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: etcd-2.0.3-0.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-13 19:52:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.