githubixx/ansible-role-etcd

double quotes in systemd manifest

c4m4 opened this issue · 2 comments

c4m4 commented

role version:
githubixx.etcd, r4.2.0_v3.2.13

Os Release:
CentOS Linux release 7.6.1810 (Core)

Issue: for some reason the generated template contain double quotes and the etcd doesn't starts

Mar 21 12:45:10 node-1.example.local etcd[7198]: etcd --config-file
Mar 21 12:45:10 node-1.example.local etcd[7198]: path to the server configuration file
Mar 21 12:45:10 node-1.example.local etcd[7198]: etcd gateway
Mar 21 12:45:10 node-1.example.local etcd[7198]: run the stateless pass-through etcd TCP connection forwarding proxy
Mar 21 12:45:10 node-1.example.local etcd[7198]: etcd grpc-proxy
Mar 21 12:45:10 node-1.example.local etcd[7198]: run the stateless etcd v3 gRPC L7 reverse proxy
Mar 21 12:45:10 node-1.example.local systemd[1]: etcd.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 21 12:45:10 node-1.example.local systemd[1]: Failed to start etcd.
Mar 21 12:45:10 node-1.example.local systemd[1]: Unit etcd.service entered failed state.
Mar 21 12:45:10 node-1.example.local systemd[1]: etcd.service failed.

Workaroud:
If I remove the double quotes, it works

systemd manifest:

systemctl cat etcd
# /etc/systemd/system/etcd.service
[Unit]
Description=etcd
Documentation=https://github.com/coreos

[Service]
ExecStart=/usr/local/bin/etcd \
  --advertise-client-urls="https://192.168.50.101:2379" \
  --auto-compaction-retention="0" \
  --cert-file="/etc/etcd/cert.pem" \
  --client-cert-auth="true" \
  --cors="" \
  --data-dir="/var/lib/etcd" \
  --election-timeout="1000" \
  --heartbeat-interval="100" \
  --initial-advertise-peer-urls="https://192.168.50.101:2380" \
  --initial-cluster="node-1=https://192.168.50.101:2380,node-2=https://192.168.50.102:2380" \
  --initial-cluster-state="new" \
  --initial-cluster-token="etcd-cluster-0" \
  --key-file="/etc/etcd/private.pem" \
  --listen-client-urls="https://192.168.50.101:2379,https://127.0.0.1:2379" \
  --listen-peer-urls="https://192.168.50.101:2380" \
  --log-output="default" \
  --log-package-levels="" \
  --max-snapshots="5" \
  --max-wals="5" \
  --name="node-1" \
  --peer-cert-file="/etc/etcd/cert.pem" \
  --peer-client-cert-auth="true" \
  --peer-key-file="/etc/etcd/private.pem" \
  --peer-trusted-ca-file="/etc/etcd/cert.pem" \
  --quota-backend-bytes="0" \
  --snapshot-count="100000" \
  --trusted-ca-file="/etc/etcd/cert.pem" \
  --wal-dir="" 
Restart=on-failure
RestartSec=5
Type=notify

Which double quotes did you remove? I can't find the differences ATM. Also r4.2.0_v3.2.13 is already some month old. Maybe switch to 7.0.0+3.2.24 (the version scheme change a little bit to better adhere SemVer specifications).

I guess we can close this for now.