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

Let ansible worker gracefully stop #15643

Merged

Conversation

jrafanie
Copy link
Member

https://bugzilla.redhat.com/show_bug.cgi?id=1474508

When the ansible worker is not responding, let it try to gracefuly exit
by marking it as stopping. Allow, the stopping worker code to eventually
kill the worker if it doesn't exit on it's own.

While we're allowing the worker to gracefully exit, don't allow multiple
ansible monitor workers to run at once. Normally, a replacement worker
is started the moment we ask a prior worker to exit.

https://bugzilla.redhat.com/show_bug.cgi?id=1474508

When the ansible worker is not responding, let it try to gracefuly exit
by marking it as stopping.  Allow, the stopping worker code to eventually
kill the worker if it doesn't exit on it's own.

While we're allowing the worker to gracefully exit, don't allow multiple
ansible monitor workers to run at once. Normally, a replacement worker
is started the moment we ask a prior worker to exit.
@miq-bot
Copy link
Member

miq-bot commented Jul 24, 2017

Checked commit jrafanie@bc8c26f with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

Copy link
Member

@carbonin carbonin left a comment

Choose a reason for hiding this comment

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

Tested this out on an appliance.

The server monitor kills the thread after the stopping timeout.
👍

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

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

👍 Looks good

@gtanzillo gtanzillo added this to the Sprint 65 Ending Jul 24, 2017 milestone Jul 24, 2017
@gtanzillo gtanzillo merged commit 3eeabd5 into ManageIQ:master Jul 24, 2017
@jrafanie jrafanie deleted the allow_ansible_to_gracefully_stop branch July 24, 2017 21:46
simaishi pushed a commit that referenced this pull request Jul 25, 2017
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit 3ccb6e48fef2c53d6934111b39c0ddd21333e019
Author: Gregg Tanzillo <[email protected]>
Date:   Mon Jul 24 17:46:29 2017 -0400

    Merge pull request #15643 from jrafanie/allow_ansible_to_gracefully_stop
    
    Let ansible worker gracefully stop
    (cherry picked from commit 3eeabd587904fce3cbb3f4fbcb5ac08b4584d36d)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1474840

d-m-u pushed a commit to d-m-u/manageiq that referenced this pull request Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants