Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert #7567 after it's been in a few versions (July or August 2015) #8192

Closed
lavalamp opened this issue May 13, 2015 · 2 comments
Closed

Revert #7567 after it's been in a few versions (July or August 2015) #8192

lavalamp opened this issue May 13, 2015 · 2 comments
Labels
priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@lavalamp
Copy link
Member

#7567 adds the ability to migrate etcd keys to a new prefix. This is fine, but it'll be tricky to use once apiserver is HA. We should either document the proper steps (shut down all apiservers, run a single apiserver with the right command to do the migration, shut down that apiserver, start all apiservers again), or (my preference) remove it. IMO it should not have gone in at all; you should use a specific tool to do the migration after shutting down all apiservers. There's no need to build that into apiserver, and in fact, it's dangerous if used incorrectly.

@lavalamp lavalamp added priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. team/master labels May 13, 2015
@jedsmith
Copy link

There's also a bug in the migration code -- since the flag for "old" etcd-prefix defaults to a value, the migration code always runs when you specify an etcd-prefix. apiserver then crashes immediately on a clean setup without /registry:

$ docker run --net=host -v /etc/kubernetes:/etc/kubernetes \
    -v /usr/share/ca-certificates:/etc/ssl/certs -v /var/run/kubernetes:/var/run/kubernetes \
    --name api0 quay.io/kelseyhightower/kube-apiserver:0.19.0 \
    --etcd-servers=http://127.0.0.1:2379 --insecure-bind-address=10.0.1.6 \
    --insecure-port=10000 --logtostderr=true --service-cluster-ip-range=10.200.0.0/24 \
    --v=2 --etcd-prefix=/clusters/10000
I0619 05:52:57.151224       1 plugins.go:69] No cloud provider specified.
I0619 05:52:57.152515       1 etcd_helper.go:621] Couldn't get the existing etcd root node.
F0619 05:52:57.152575       1 server.go:314] Migration of old etcd keys failed: 100: Key not found (/registry) [2]

$ etcdctl ls
$

The workaround is to pass an empty --old-etcd-prefix=.

cc @kbeecher

@lavalamp
Copy link
Member Author

Now that this is going to be removed, a note to those who want to use this migration functionality:

Shutdown all apiservers. Make an etcd backup. Use etdctl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

2 participants