etcd-io / etcd

Distributed reliable key-value store for the most critical data of a distributed system
https://etcd.io
Apache License 2.0
47.95k stars 9.78k forks source link

Cover learners with e2e tests #13919

Open serathius opened 2 years ago

serathius commented 2 years ago

Based on https://github.com/etcd-io/etcd/pull/13837 I expect we are missing some e2e testing.

bobsongplus commented 2 years ago

@serathius would be ok if I work on this?

serathius commented 2 years ago

Sure, to give you some context, most of etcd e2e tests either run 1 or 3 member cluster. Most test scenarios would benefit if we add a case where there is an additional learner in cluster. For examples of test code I would look into code in tests/common.

bobsongplus commented 2 years ago

Working on it

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

serathius commented 2 years ago

@TinySong any progress?

halegreen commented 2 years ago

want to work on this issue

pacoxu commented 1 year ago

kubeadm using etcd learner mode to join the control plane node.

Elbehery commented 10 months ago

@jmhbnz can u assign me please ?

jmhbnz commented 10 months ago

Absolutely! Thanks for volunteering 🙏🏻

/assign @Elbehery

Elbehery commented 10 months ago

Hello @serathius

I need more context to resolve this, below are initial ideas

i am quiet lost, where to start .. also could you inline some specific cases to cover ?

thanks :)

cc @ahrtr @jmhbnz

serathius commented 10 months ago

@Elbehery we would want to add learners to basic e2e tests scenarios that should not care that there is a learner in the cluster. Take a look into https://github.com/etcd-io/etcd/blob/main/tests/common/e2e_test.go on how we automatically generate subtests for different cluster configurations.

Elbehery commented 10 months ago

Thanks @serathius for your response ..

I reviewed the tests yesterday .. So for example, for https://github.com/etcd-io/etcd/blob/main/tests/common/member_test.go, we should add a test that adds a learner member ?

also to create an etcd learner member server process, do i follow the same EtcdServerProcessConfig while adding a boolean for IsLearner ?

wdyt ?

serathius commented 10 months ago

I reviewed the tests yesterday .. So for example, for https://github.com/etcd-io/etcd/blob/main/tests/common/member_test.go, we should add a test that adds a learner member ?

I think there already exists a test for adding a learner member. https://github.com/etcd-io/etcd/blob/58846bd8f3bedee3260623301d1c02a99580a2a9/tests/e2e/ctl_v3_member_test.go#L46 Context on why we have two directories with tests https://github.com/etcd-io/etcd/issues/13637

serathius commented 7 months ago

Any progress @Elbehery ?

Elbehery commented 7 months ago

No .. would you have sometime for a call to discuss it ?

serathius commented 7 months ago

You can reach me on K8s slack https://communityinviter.com/apps/kubernetes/community