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

[BUG] etcd cluster lorry checkRole failed executable file not found in $PATH #6708

Closed
JashBook opened this issue Feb 28, 2024 · 0 comments · Fixed by #6751
Closed

[BUG] etcd cluster lorry checkRole failed executable file not found in $PATH #6708

JashBook opened this issue Feb 28, 2024 · 0 comments · Fixed by #6751
Assignees
Labels
bug kind/bug Something isn't working
Milestone

Comments

@JashBook
Copy link
Collaborator

Describe the bug

checkrole executing checkRole error {"error": "exec: "Status=$(etcdctl --endpoints=127.0.0.1:2379 endpoint status -w simple --command-timeout=300ms --dial-timeout=100m) &&\nIsLeader=$(echo $Status | awk -F ', ' '{print $5}') &&\nIsLearner=$(echo $Status | awk -F ', ' '{print $6}') &&\nif [ \"true\" = \"$IsLeader\" ]; then echo -n \"leader\"; elif [ \"true\" = \"$IsLearner\" ]; then echo -n \"learner\"; else echo -n \"follower\"; fi\n": executable file not found in $PATH"}

kbcli version
Kubernetes: v1.26.3
KubeBlocks: 0.9.0-alpha.4
kbcli: 0.9.0-alpha.1

To Reproduce
Steps to reproduce the behavior:

  1. create cluster
kbcli cluster create  etcd-iqhtrl --termination-policy=Delete --cluster-definition=etcd --cluster-version=etcd-v3.5.6 --set cpu=100m,memory=0.5Gi,replicas=1,storage=1Gi
  1. See error
kubectl get cluster
NAME          CLUSTER-DEFINITION   VERSION       TERMINATION-POLICY   STATUS     AGE
etcd-iqhtrl   etcd                 etcd-v3.5.6   Delete               Creating   8m55s
➜  ~ 
➜  ~ kubectl get component
NAME               COMPONENT-DEFINITION   STATUS     AGE
etcd-iqhtrl-etcd                          Creating   9m1s
➜  ~ 
➜  ~ kubectl get pod -l app.kubernetes.io/instance=etcd-iqhtrl  
NAME                 READY   STATUS    RESTARTS   AGE
etcd-iqhtrl-etcd-0   3/3     Running   0          9m9s

logs pod lorry

➜  ~ kubectl logs etcd-iqhtrl-etcd-0 lorry
2024-02-28T10:25:45Z	INFO	Initialize DB manager
2024-02-28T10:25:45Z	INFO	KB_WORKLOAD_TYPE ENV not set
2024-02-28T10:25:45Z	INFO	Volume-Protection	succeed to init volume protection	{"pod": "etcd-iqhtrl-etcd-0", "spec": {"highWatermark":"0","volumes":[]}}
2024-02-28T10:25:45Z	INFO	HTTPServer	Starting HTTP Server
2024-02-28T10:25:55Z	INFO	checkrole	executing checkRole error	{"error": "exec: \"Status=$(etcdctl --endpoints=127.0.0.1:2379 endpoint status -w simple --command-timeout=300ms --dial-timeout=100m) &&\\nIsLeader=$(echo $Status | awk -F ', ' '{print $5}') &&\\nIsLearner=$(echo $Status | awk -F ', ' '{print $6}') &&\\nif [ \\\"true\\\" = \\\"$IsLeader\\\" ]; then echo -n \\\"leader\\\"; elif [ \\\"true\\\" = \\\"$IsLearner\\\" ]; then echo -n \\\"learner\\\"; else echo -n \\\"follower\\\"; fi\\n\": executable file not found in $PATH"}
2024-02-28T10:25:55Z	INFO	checkrole	role checks failed continuously	{"times": 0}
2024-02-28T10:25:55Z	INFO	event	send event: map[operation:checkRole originalRole:]
2024-02-28T10:26:04Z	INFO	checkrole	executing checkRole error	{"error": "exec: \"Status=$(etcdctl --endpoints=127.0.0.1:2379 endpoint status -w simple --command-timeout=300ms --dial-timeout=100m) &&\\nIsLeader=$(echo $Status | awk -F ', ' '{print $5}') &&\\nIsLearner=$(echo $Status | awk -F ', ' '{print $6}') &&\\nif [ \\\"true\\\" = \\\"$IsLeader\\\" ]; then echo -n \\\"leader\\\"; elif [ \\\"true\\\" = \\\"$IsLearner\\\" ]; then echo -n \\\"learner\\\"; else echo -n \\\"follower\\\"; fi\\n\": executable file not found in $PATH"}
2024-02-28T10:26:14Z	INFO	checkrole	executing checkRole error	{"error": "exec: \"Status=$(etcdctl --endpoints=127.0.0.1:2379 endpoint status -w simple --command-timeout=300ms --dial-timeout=100m) &&\\nIsLeader=$(echo $Status | awk -F ', ' '{print $5}') &&\\nIsLearner=$(echo $Status | awk -F ', ' '{print $6}') &&\\nif [ \\\"true\\\" = \\\"$IsLeader\\\" ]; then echo -n \\\"leader\\\"; elif [ \\\"true\\\" = \\\"$IsLearner\\\" ]; then echo -n \\\"learner\\\"; else echo -n \\\"follower\\\"; fi\\n\": executable file not found in $PATH"}
2024-02-28T10:26:24Z	INFO	checkrole	executing checkRole error	{"error": "exec: \"Status=$(etcdctl --endpoints=127.0.0.1:2379 endpoint status -w simple --command-timeout=300ms --dial-timeout=100m) &&\\nIsLeader=$(echo $Status | awk -F ', ' '{print $5}') &&\\nIsLearner=$(echo $Status | awk -F ', ' '{print $6}') &&\\nif [ \\\"true\\\" = \\\"$IsLeader\\\" ]; then echo -n \\\"leader\\\"; elif [ \\\"true\\\" = \\\"$IsLearner\\\" ]; then echo -n \\\"learner\\\"; else echo -n \\\"follower\\\"; fi\\n\": executable file not found in $PATH"}
2024-02-28T10:26:34Z	INFO	checkrole	executing checkRole error	{"error": "exec: \"Status=$(etcdctl --endpoints=127.0.0.1:2379 endpoint status -w simple --command-timeout=300ms --dial-timeout=100m) &&\\nIsLeader=$(echo $Status | awk -F ', ' '{print $5}') &&\\nIsLearner=$(echo $Status | awk -F ', ' '{print $6}') &&\\nif [ \\\"true\\\" = \\\"$IsLeader\\\" ]; then echo -n \\\"leader\\\"; elif [ \\\"true\\\" = \\\"$IsLearner\\\" ]; then echo -n \\\"learner\\\"; else echo -n \\\"follower\\\"; fi\\n\": executable file not found in $PATH"}
...
2024-02-28T10:34:04Z	INFO	checkrole	executing checkRole error	{"error": "exec: \"Status=$(etcdctl --endpoints=127.0.0.1:2379 endpoint status -w simple --command-timeout=300ms --dial-timeout=100m) &&\\nIsLeader=$(echo $Status | awk -F ', ' '{print $5}') &&\\nIsLearner=$(echo $Status | awk -F ', ' '{print $6}') &&\\nif [ \\\"true\\\" = \\\"$IsLeader\\\" ]; then echo -n \\\"leader\\\"; elif [ \\\"true\\\" = \\\"$IsLearner\\\" ]; then echo -n \\\"learner\\\"; else echo -n \\\"follower\\\"; fi\\n\": executable file not found in $PATH"}
2024-02-28T10:34:14Z	INFO	checkrole	executing checkRole error	{"error": "exec: \"Status=$(etcdctl --endpoints=127.0.0.1:2379 endpoint status -w simple --command-timeout=300ms --dial-timeout=100m) &&\\nIsLeader=$(echo $Status | awk -F ', ' '{print $5}') &&\\nIsLearner=$(echo $Status | awk -F ', ' '{print $6}') &&\\nif [ \\\"true\\\" = \\\"$IsLeader\\\" ]; then echo -n \\\"leader\\\"; elif [ \\\"true\\\" = \\\"$IsLearner\\\" ]; then echo -n \\\"learner\\\"; else echo -n \\\"follower\\\"; fi\\n\": executable file not found in $PATH"}
2024-02-28T10:34:24Z	INFO	checkrole	executing checkRole error	{"error": "exec: \"Status=$(etcdctl --endpoints=127.0.0.1:2379 endpoint status -w simple --command-timeout=300ms --dial-timeout=100m) &&\\nIsLeader=$(echo $Status | awk -F ', ' '{print $5}') &&\\nIsLearner=$(echo $Status | awk -F ', ' '{print $6}') &&\\nif [ \\\"true\\\" = \\\"$IsLeader\\\" ]; then echo -n \\\"leader\\\"; elif [ \\\"true\\\" = \\\"$IsLearner\\\" ]; then echo -n \\\"learner\\\"; else echo -n \\\"follower\\\"; fi\\n\": executable file not found in $PATH"}
➜  ~ 

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@JashBook JashBook added the kind/bug Something isn't working label Feb 28, 2024
@JashBook JashBook added this to the Release 0.9.0 milestone Feb 28, 2024
@ahjing99 ahjing99 modified the milestones: Release 0.9.0, Release 0.8.2 Mar 5, 2024
@xuriwuyun xuriwuyun linked a pull request Mar 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants