karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.09k stars 796 forks source link

hack/local-up-kamarda.sh execute error #3590

Closed kubefay closed 3 months ago

kubefay commented 10 months ago

What happened:

clone main brach, execute ./hack/local-up-karmada.sh the .kube/members.config does not have memer1,member2

root cause is that hack/utils.sh line 435 del the config before start clusters. After delete the line , everything goes well

RainbowMango commented 10 months ago

That's weird, we run the script multi times everyday on CI environment.

Could you please share the output?

kubefay commented 10 months ago

The output: + kubectl config rename-context kind-member1 member1 --kubeconfig=/root/.kube/members.config error: cannot rename the context "kind-member1", it's not in /root/.kube/members.config

More to say: util::create_cluster execute async, if the funtions execute slow, the later function will delete the config file generated by previous one.

kubefay commented 10 months ago

we could simulate the scenario that executed flow by changing the utils.sh line 436 to:

kind delete cluster --name="${cluster_name}" >> "${log_path}"/"${cluster_name}".log 2>&1 && kind create cluster --name "${cluster_name}" --kubeconfig="${kubeconfig}" --image="${kind_image}" --config="${cluster_config}"

(remove nohup and the "&" to make it sync)

zll600 commented 3 months ago

@RainbowMango Maybe you can close this issue now. The script has be updated. https://github.com/karmada-io/karmada/blob/dca9c36d5a4289363922fb24dbd6a8e551b9554b/hack/util.sh#L474

RainbowMango commented 3 months ago

ok. thanks. /close

karmada-bot commented 3 months ago

@RainbowMango: Closing this issue.

In response to [this](https://github.com/karmada-io/karmada/issues/3590#issuecomment-1880278792): >ok. thanks. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.