cristifalcas / puppet-etcd

etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines.
https://coreos.com/etcd/
Apache License 2.0
9 stars 39 forks source link

Numeric values must not be strings #17

Closed bogdando closed 7 years ago

bogdando commented 7 years ago

Otherwise etcd fails to startup like this:

panic: runtime error: integer divide by zero

How to repro: 1) given the config foo.conf

#[member]
ETCD_NAME="default"
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
ETCD_SNAPSHOT_COUNT="10000"
ETCD_HEARTBEAT_INTERVAL="250"
ETCD_ELECTION_TIMEOUT="5000"
ETCD_LISTEN_CLIENT_URLS="http://127.0.0.1:2379"
ETCD_ADVERTISE_CLIENT_URLS="http://127.0.0.1:2379"
ETCD_MAX_SNAPSHOTS="5"
ETCD_MAX_WALS="5"
#
#[proxy]
ETCD_PROXY="off"
ETCD_PROXY_FAILURE_WAIT="5000"
ETCD_PROXY_REFRESH_INTERVAL="30000"
ETCD_PROXY_DIAL_TIMEOUT="1000"
ETCD_PROXY_WRITE_TIMEOUT="5000"
ETCD_PROXY_READ_TIMEOUT="10"
#

#[security]
ETCD_CLIENT_CERT_AUTH=false
ETCD_PEER_CLIENT_CERT_AUTH=false
#
#[logging]
ETCD_DEBUG=true

2) start etcd like:

docker run -it --rm -v --env-file=foo.conf --privileged quay.io/coreos/etcd:v3.0.12
cristifalcas commented 7 years ago

This most be from something else. Because we use etcd with numeric values between apostrophes on multiple clusters.

bogdando commented 7 years ago

@cristifalcas so It can be reproduced only with docker run --env-file. It doesn't like quote signs at all, even if put for strings. This works for systemd's EnvironmentFile though. The full fix would be to either split conf templates for systemd/docker cases or omit all of the quotes signs. What do you think?