Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

etcd: Update to v3.4.10 #783

Merged
merged 2 commits into from
Aug 17, 2020
Merged

etcd: Update to v3.4.10 #783

merged 2 commits into from
Aug 17, 2020

Conversation

surajssd
Copy link
Member

invidian
invidian previously approved these changes Aug 10, 2020
@invidian
Copy link
Member

There is a breaking change for existing clusters: https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.4.md#breaking-changes.

Release Notes: https://github.com/etcd-io/etcd/releases/tag/v3.4.10

Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
@surajssd
Copy link
Member Author

@invidian the breaking change was fixed.

With etcd 3.4.10, this data dir should have permissions 0700. If
anything else is found then the daemon fails.

For more information read:
https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.4.md#breaking-changes

Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
@surajssd surajssd force-pushed the surajssd/update-etcd-3.4.10 branch from 5536839 to 65d3c1d Compare August 13, 2020 13:47
@surajssd
Copy link
Member Author

surajssd commented Aug 13, 2020

I'd like to understand what was the breaking change and how it was fixed.

See the last commit's description. But tl;dr is that etcd 3.4.10 would fail if it found some other permissions on the data dir. But with this change the permission of the dir will be 0700.

Also I have verified with lokoctl this does not trigger cluster recreation. The upgrade process has to be manual on the host.


Run lokoctl cluster apply with this PR commit. Now ssh into the controller node and run following commands:

# Become root
sudo -i

# Change the permissions as required for the newest version
chmod 0700 /var/lib/etcd/

# Verify the dir permissions
ls -ld /var/lib/etcd/

# Update the version
sed -i 's|3.4.9|3.4.10|g' /etc/systemd/system/etcd-member.service.d/40-etcd-cluster.conf

# Restart the process and verify that it is in Running state
systemctl daemon-reload
systemctl restart etcd-member
systemctl status etcd-member


# Verify as a user:
cd /opt/bootkube/assets/tls/
export ETCDCTL_API=3
export endpoints=https://foobar.net:2379
export cacert=etcd-client-ca.crt
export cert=etcd-client.crt
export key=etcd-client.key
etcdctl member list --cacert=$cacert --cert=$cert --key=$key --endpoints=$endpoints

Can you verify this works @ipochi?

@surajssd
Copy link
Member Author

Created a doc which explains how to upgrade the etcd cluster #802.

@surajssd
Copy link
Member Author

@rata @ipochi PTAL.

Copy link
Member

@rata rata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Member

@ipochi ipochi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@surajssd surajssd merged commit 8316275 into master Aug 17, 2020
@surajssd surajssd deleted the surajssd/update-etcd-3.4.10 branch August 17, 2020 06:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants