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

curveadm enter command can directly enter the leader container #324

Closed
caoxianfei1 opened this issue Oct 24, 2023 · 4 comments · Fixed by #374
Closed

curveadm enter command can directly enter the leader container #324

caoxianfei1 opened this issue Oct 24, 2023 · 4 comments · Fixed by #374

Comments

@caoxianfei1
Copy link
Contributor

caoxianfei1 commented Oct 24, 2023

现在我们想要进入leader容器的话,需要使用curveadm status查看leader容器的id,然后使用curveadm enter 进入,现在我们或许可以使用curveadm enter不用输入id的话就默认进入leader容器。

Registration procedure

Step 1. Add a comment when you sign up.The purpose of comments is for us to understand you and determine whether you have the basic ability to complete this issue.

  • If you are a student, please introduce your school, major, programming language, technical fields of interest, what you are good at, and why you chose this issue.
  • If you are already working, please introduce your company, career, work content, technical fields of interest, and why you chose this issue.

Step 2. Use WeChat to add the Curve community assistant "Curve" as a WeChat friend, tell your GitHub ID, and send the Issue link of your choice. The assistant will invite you to communicate with the mentor by WeChat.

Step 3. In order to better complete each development task, the mentor will select the developer who best matches the issue based on everyone's comment on GitHub and communication status by WeChat. If you are not selected, please select another issue.

Tips

  • Before developing, please read the dev guideline( https://ask.opencurve.io/t/topic/201) carefully and communicate with your mentor.
  • Please submit a draft PR before 11.29, and the mentor will review it within 2-5 working days and may guide you to modify the PR based on the actual situation.
  • If you successfully merge into PR before 12.27 and you will receive gifts carefully prepared by the Curve community.
@LYPWYT
Copy link

LYPWYT commented Nov 4, 2023

As a graduate student from the University of Electronic Science and Technology of China, I have gained a thorough understanding of the Kubernetes (K8s) system, which is open-sourced by Google. In relation to the aforementioned issue, I have the following ideas:
When executing the curveadm enter command without specifying a container ID as a parameter, we can implement a function that automatically calls the curveadm status command to retrieve the ID of the leader container, and then use this ID as a parameter to enter the leader container.

@caoxianfei1
Copy link
Contributor Author

@LYPWYT Maybe you can refer to this curveadm status command to get the leader id, but calling this command may not be a good choice.

@tiansuo114
Copy link
Contributor

Hello, I would like to apply to complete this topic. I will describe the general idea of the topic below.

I observed that getClusterMdsLeader is used in the displayStatus() function in the status.go file. I guess that a similar method can be used to obtain the id of the leader node in enter and detect it through the input after curveadm enter. If the specified id is not entered, call this method to obtain the mds leader id and try to connect.

The above is my general idea about this topic. There may still be many problems (such as misunderstanding whether the leader node is an mds leader node, whether the getClusterMdsLeader method can be called correctly, etc. and logical errors where the code is not well understood), but I still hope to get The instructor’s corrections and the opportunity to complete this question, and hope to participate in this development activity

@caoxianfei1
Copy link
Contributor Author

caoxianfei1 commented Nov 7, 2023

Hello, I would like to apply to complete this topic. I will describe the general idea of the topic below.

I observed that getClusterMdsLeader is used in the displayStatus() function in the status.go file. I guess that a similar method can be used to obtain the id of the leader node in enter and detect it through the input after curveadm enter. If the specified id is not entered, call this method to obtain the mds leader id and try to connect.

The above is my general idea about this topic. There may still be many problems (such as misunderstanding whether the leader node is an mds leader node, whether the getClusterMdsLeader method can be called correctly, etc. and logical errors where the code is not well understood), but I still hope to get The instructor’s corrections and the opportunity to complete this question, and hope to participate in this development activity

Welcome! But the issue has assigned to @LYPWYT , and you can choose another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants