Bug 1236706
| Summary: | Upon upgrading to 7.1.3, etcd will fail to start due to missing parameter ETCD_ADVERTISE_CLIENT_URLS | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jake Hunsaker <jhunsaker> | ||||
| Component: | etcd | Assignee: | Jan Chaloupka <jchaloup> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Chris Evich <cevich> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.1 | CC: | gouyang, mjenner, walters | ||||
| Target Milestone: | rc | Keywords: | Extras | ||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | etcd-2.0.13-1.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-08-06 00:51: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: | |||||||
| Attachments: |
|
||||||
|
Description
Jake Hunsaker
2015-06-29 18:48:19 UTC
Hi Jake, since etcd-2.0.11-2 ETCD_ADVERTISE_CLIENT_URLS is set to default value in /etc/etcd.conf. Update to 7.1.4 will fix this issue. Jan This is definitely an unfortunate bug. The only thing I can think to do here is to check on startup (via a patch in the code) whether ETCD_LISTEN_CLIENT_URLS="http://localhost:2379" and is unset, then set the latter to "http://localhost:2379". Jan, what do you think? Colin, I see. AH 7.1.3 release ships etcd-2.0.11-2 which sets ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379,http://localhost:4001". As /etc/etcd/etcd.conf file is prefixed by %config(noreplace), it does not get replaced/updated when updating to AH 7.1.3. It has to be done manually on all machines with etcd installed. Adding this line in etcd.service file in [service] section will fix the issue: Environment="ETCD_ADVERTISE_CLIENT_URLS=http://localhost:2378" [1] says "Settings from EnvironmentFile files override settings made with Environment=". So when there is no ETCD_ADVERTISE_CLIENT_URLS set in /etc/etcd/etcd.conf, the one defined in service file by Environment is taken. If ETCD_ADVERTISE_CLIENT_URLS is set in the config file, it overrides the one set in Environment. [1] http://www.freedesktop.org/software/systemd/man/systemd.exec.html#EnvironmentFile= Colin, can you verify? Sorry, it is: Environment="ETCD_ADVERTISE_CLIENT_URLS=http://localhost:2379" Colin, > This is definitely an unfortunate bug. The only thing I can think to do here > is to check on startup (via a patch in the code) > whether ETCD_LISTEN_CLIENT_URLS="http://localhost:2379" and is unset, > then set the latter to "http://localhost:2379". IINM, ETCD_LISTEN_CLIENT_URLS does not have to be set to "http://localhost:2379" only. 2379 and 4001 ports are preferred/allocated ports. However, there is nothing that stops administrator from using different ports for some reason. What should be ETCD_ADVERTISE_CLIENT_URLS set to then? It is a good sign that etcd fails to start. If we decide to patch the source code/service file ETCD_ADVERTISE_CLIENT_URLS can be set to incorrect value. Then it will be more difficult to find out why etcd is not working as it is expected. Besides in future other flags/envs can become mandatory and then patch etcd for each use case ... Would like to see this as an improvement of documentation to atomic host/etcd rather than patch etcd itself. As Jake writes: > Additional info: > This appears to only be affecting Atomic Host, as on RHEL hosts it either > works or drops an etcd.conf.rpmnew, whereas on AH there is no rpmnew file. This seems to me as a bug in atomic host that is not providing rpmnew file. This way or another update of etcd.conf is the correct fix, not patching/hacking etcd. Created attachment 1049015 [details]
set ETCD_ADVERTISE_CLIENT_URLS to ETCD_LISTEN_CLIENT_URLS if empty
Colin, the attached patch sets ETCD_ADVERTISE_CLIENT_URLS to ETCD_LISTEN_CLIENT_URLS if the former is empty. When a customer has ETCD_LISTEN_CLIENT_URLS set to different value then the default one he is responsible for setting ETCD_LISTEN_CLIENT_URLS to the correct value as well. So I don't think it is necessary to test for localhost infix. Can you verify the patch? Thanks Jan Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1571.html The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |