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

operator/pkg/tasks/init/etcd.go: Inconsistency Between Comment and Implementation in runWaitEtcd Function? #5633

Open
mohamedawnallah opened this issue Oct 2, 2024 · 1 comment
Labels
kind/question Indicates an issue that is a support question.

Comments

@mohamedawnallah
Copy link
Contributor

Description

The comment in the runWaitEtcd function mentions that the function waits for etcd, Karmada API server, and aggregated API server to be ready. However, the current implementation only waits for the etcd pods based on the etcdLabels. Is there anything I'm missing? Or the comment should be updated?

func runWaitEtcd(r workflow.RunData) error {
data, ok := r.(InitData)
if !ok {
return errors.New("wait-etcd task invoked with an invalid data struct")
}
waiter := apiclient.NewKarmadaWaiter(data.ControlplaneConfig(), data.RemoteClient(), componentBeReadyTimeout)
// wait etcd, karmada apiserver and aggregated apiserver to ready
// as long as a replica of pod is ready, we consider the service available.
if err := waiter.WaitForSomePods(etcdLabels.String(), data.GetNamespace(), 1); err != nil {
return fmt.Errorf("waiting for karmada-etcd to ready timeout, err: %w", err)
}
klog.V(2).InfoS("[wait-etcd] the etcd pods is ready", "karmada", klog.KObj(data))
return nil
}

@mohamedawnallah mohamedawnallah added the kind/question Indicates an issue that is a support question. label Oct 2, 2024
@mohamedawnallah mohamedawnallah changed the title operator/pkg/tasks/init/etcd.go: Inconsistency Between Comment and Implementation in runWaitEtcd Function operator/pkg/tasks/init/etcd.go: Inconsistency Between Comment and Implementation in runWaitEtcd Function ? Oct 2, 2024
@mohamedawnallah mohamedawnallah changed the title operator/pkg/tasks/init/etcd.go: Inconsistency Between Comment and Implementation in runWaitEtcd Function ? operator/pkg/tasks/init/etcd.go: Inconsistency Between Comment and Implementation in runWaitEtcd Function? Oct 2, 2024
@zhzhuang-zju
Copy link
Contributor

Waiting for etcd, the Karmada API server, and the aggregated API server to be ready is implemented by the functions runWaitEtcd, runWaitKarmadaAPIServer, and runWaitKarmadaAggregatedAPIServer, respectively. Relevant comments can be updated to split this information across the three functions. Ask for @calvin0327 to confirm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

2 participants