-
Notifications
You must be signed in to change notification settings - Fork 295
Propagate etcd version from cluster.yaml to etcdadm #722
Conversation
Codecov Report
@@ Coverage Diff @@
## master #722 +/- ##
=======================================
Coverage 34.33% 34.33%
=======================================
Files 55 55
Lines 3073 3073
=======================================
Hits 1055 1055
Misses 1859 1859
Partials 159 159 Continue to review full report at Codecov.
|
@@ -618,6 +618,7 @@ write_files: | |||
ETCD_ADVERTISE_CLIENT_URLS=https://$advertised_hostname:2379 | |||
ETCD_LISTEN_PEER_URLS=https://$private_ip:2380 | |||
ETCD_INITIAL_ADVERTISE_PEER_URLS=https://$advertised_hostname:2380" >> /var/run/coreos/etcd-environment | |||
ETCD_VERSION={{.Etcd.Version}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is an easy to miss redirect happening in this file, line you add should be inside that redirect to have an effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure i get you properly, can you clarify with code example ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this is confusing but given what we have so far:
echo "KUBE_AWS_ASSUMED_HOSTNAME=$advertised_hostname
*snip*
ETCD_INITIAL_ADVERTISE_PEER_URLS=https://$advertised_hostname:2380" >> /var/run/coreos/etcd-environment
ETCD_VERSION={{.Etcd.Version}}
It should be the something like the below:
echo "KUBE_AWS_ASSUMED_HOSTNAME=$advertised_hostname
*snip*
ETCD_INITIAL_ADVERTISE_PEER_URLS=https://$advertised_hostname:2380
ETCD_VERSION={{.Etcd.Version}}" >> /var/run/coreos/etcd-environment
or ETCD_VERSION
would be just thrown away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting it guys. Actually first commit was both wrong and redundant, i removed it.
Cloud formation based propagation is enough to fix the problem
3ec2d82
to
f932d51
Compare
@ytsarev Ah, that made sense! Thanks for your contribution 👍 |
Without this additional propagation
etcdadm
falls back to default3.1.3
version as inhttps://github.com/iflix-letsplay/kube-aws/blob/master/etcdadm/etcdadm#L88
In case when any other version is specified in
cluster.yaml
it will create the deviation between running etcd version and the one that is used for periodic snapshotting, e.g. running3.1.8
in the main container and still using default3.1.3
foretcdadm
based operations.This PR fixes the deviation.