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

Verify network manager - worker connections between machines in ansible playbooks #6995

Open
3 tasks
rikukissa opened this issue May 15, 2024 · 2 comments · May be fixed by opencrvs/opencrvs-countryconfig#391
Open
3 tasks

Comments

@rikukissa
Copy link
Member

rikukissa commented May 15, 2024

Image

Describe the improvement

If an two machines in the stack do not have port 2377 open to each other (check if this needs to be both manager and worker) then docker swarm cannot connect these two machines.

Tasks

  • E̶i̶t̶h̶e̶r̶ ̶r̶i̶g̶h̶t̶ ̶a̶t̶ ̶t̶h̶e̶ ̶b̶e̶g̶i̶n̶n̶i̶n̶g̶ ̶o̶f̶ ̶t̶h̶e̶ ̶A̶n̶s̶i̶b̶l̶e̶ ̶p̶l̶a̶y̶b̶o̶o̶k̶s̶ ̶o̶r̶ ̶j̶u̶s̶t̶ ̶b̶e̶f̶o̶r̶e̶ ̶D̶o̶c̶k̶e̶r̶ ̶s̶w̶a̶r̶m̶ ̶i̶s̶ ̶s̶e̶t̶ ̶u̶p̶,̶ ̶v̶e̶r̶i̶f̶y̶ ̶t̶h̶e̶s̶e̶ ̶c̶o̶n̶n̶e̶c̶t̶i̶o̶n̶s̶ ̶a̶n̶d̶ ̶o̶u̶t̶p̶u̶t̶ ̶a̶ ̶d̶e̶s̶c̶r̶i̶p̶t̶i̶v̶e̶ ̶e̶r̶r̶o̶r̶ ̶m̶e̶s̶s̶a̶g̶e̶
  • Move "Join as a worker" and "Label nodes" ansible tasks to swarm.yml
  • In the screenshot above, there was a task skipped because of swarm was inactive in the docker_info variable. As the variable has been evaluated quite early in the playbooks, verify that it doesn't need to be reevaluated after swarm has been setup. This might be a bug
@rikukissa rikukissa added this to the v1.6.0-infra milestone May 15, 2024
@rikukissa rikukissa moved this from Backlog to Ready to build in OpenCRVS Core Jul 1, 2024
@rikukissa rikukissa modified the milestones: v1.6.0-infra, v1.7.0-infra Sep 30, 2024
@alsmk alsmk linked a pull request Jan 14, 2025 that will close this issue
@alsmk alsmk moved this from Ready to build to In Development in OpenCRVS Core Jan 29, 2025
@alsmk alsmk moved this from In Development to Ready to build in OpenCRVS Core Jan 29, 2025
@alsmk alsmk moved this from Ready to build to In Development in OpenCRVS Core Jan 29, 2025
@alsmk
Copy link
Collaborator

alsmk commented Jan 30, 2025

Hi @rikukissa , @Zangetsu101, I would like to discuss some facts regarding this issue, before I start work on this :

  • It doesn't need to have port 2377 open in both worker and manager, it should keep open only in manager node

  • Regarding the first task of this issue: we are initializing the swarm mode in swarm.yml , before initialize the swarm , we ensuring that the port 2377 is open(through ufw). I am not sure about what should i verify here since the workers are still not joined to the cluster. please help me about that

  • Regarding the second task, I can't move the join as a worker task to swarm.yaml . Because that particular task should be running from worker node. and sarm.yml is running from manager node.

@rikukissa
Copy link
Member Author

rikukissa commented Jan 31, 2025

@alsmk Ok, it might be that when this ticket was created, based on the screenshot, it was actually so that the Swarm mode was not initialised for whatever reason, which led to the worker not joining the swarm, that then again caused the labeling of the node to fail.

Let's make this only a cleanup task for you to move these instructions to swarm.yml. You can do this by moving the whole - hosts: ... blocks to swarm.yml. Look at backups.yml as a reference.

Thanks for investigating. I updated the description and only kept the two last items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Development
2 participants