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

Draining nodes till no nodes exists #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

roya2yush
Copy link

  • Sleeping for 60 seconds and Recalling run.py if node was successfully drained
  • This will create a new action plan according to all the pods that are now scheduled in some other node
  • And use that information to try and fit pods into nodes and delete the redundant one.

status = drain_node(cluster, node_name, action_plan_path, 'False', dry_run)
if status and dry_run == 'False':
time.sleep(60) # Sleep for 60 seconds
subprocess.run(["python3", "run.py", "-c", cluster, "-l", label_name, "-v", label_value, "--log", log_level, "--dry_run", dry_run])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roya2yush Better to use a while loop and a max retries counter so that this doesn't run forever forking a new process every 60 seconds and consuming all the RAM or running out of max processes (32,768 in about 23 days).

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

Successfully merging this pull request may close these issues.

3 participants