Port upstream commit "keep chasing etcd"
Recent versions of etcd requires one to explicitly set
ETCD_ADVERTISE_CLIENT_URLS when using ETCD_LISTEN_CLIENT_URLS.
See: 89bcc18d24
Change-Id: I948a5c842a6350d2b38834a63c2719287c9203ea
Partially-Implements: blueprint make-master-ha
Closes-Bug: #1477289
This commit is contained in:
parent
16688d42a7
commit
39577b87f3
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
myip=$(ip addr show eth0 |
|
||||
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
|
||||
|
||||
cat > /etc/etcd/etcd.conf <<EOF
|
||||
# [member]
|
||||
ETCD_NAME=default
|
||||
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
|
||||
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:4001"
|
||||
[cluster]
|
||||
ETCD_ADVERTISE_CLIENT_URLS="http://$myip:4001"
|
||||
EOF
|
|
@ -1,41 +0,0 @@
|
|||
#cloud-config
|
||||
merge_how: dict(recurse_array)+list(append)
|
||||
write_files:
|
||||
- path: /etc/etcd/etcd.conf
|
||||
owner: "root:root"
|
||||
permissions: "0644"
|
||||
content: |
|
||||
# [member]
|
||||
ETCD_NAME=default
|
||||
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
|
||||
#ETCD_SNAPSHOT_COUNTER="10000"
|
||||
#ETCD_HEARTBEAT_INTERVAL="100"
|
||||
#ETCD_ELECTION_TIMEOUT="1000"
|
||||
#ETCD_LISTEN_PEER_URLS="http://localhost:2380,http://localhost:7001"
|
||||
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:4001"
|
||||
#ETCD_MAX_SNAPSHOTS="5"
|
||||
#ETCD_MAX_WALS="5"
|
||||
#ETCD_CORS=""
|
||||
#
|
||||
#[cluster]
|
||||
#ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380,http://localhost:7001"
|
||||
# if you use different ETCD_NAME (e.g. test), set ETCD_INITIAL_CLUSTER value for this name, i.e. "test=http://..."
|
||||
#ETCD_INITIAL_CLUSTER="default=http://localhost:2380,default=http://localhost:7001"
|
||||
#ETCD_INITIAL_CLUSTER_STATE="new"
|
||||
#ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
|
||||
#ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379,http://localhost:4001"
|
||||
#ETCD_DISCOVERY=""
|
||||
#ETCD_DISCOVERY_SRV=""
|
||||
#ETCD_DISCOVERY_FALLBACK="proxy"
|
||||
#ETCD_DISCOVERY_PROXY=""
|
||||
#
|
||||
#[proxy]
|
||||
#ETCD_PROXY="off"
|
||||
#
|
||||
#[security]
|
||||
#ETCD_CA_FILE=""
|
||||
#ETCD_CERT_FILE=""
|
||||
#ETCD_KEY_FILE=""
|
||||
#ETCD_PEER_CA_FILE=""
|
||||
#ETCD_PEER_CERT_FILE=""
|
||||
#ETCD_PEER_KEY_FILE=""
|
|
@ -196,7 +196,7 @@ resources:
|
|||
type: OS::Heat::SoftwareConfig
|
||||
properties:
|
||||
group: ungrouped
|
||||
config: {get_file: fragments/configure-etcd.yaml}
|
||||
config: {get_file: fragments/configure-etcd.sh}
|
||||
|
||||
configure_kubernetes:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
|
|
Loading…
Reference in New Issue