Bug 1474508 - Embedded ansible services do not stop when role is removed
Embedded ansible services do not stop when role is removed
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: GA
: 5.9.0
Assigned To: Joe Rafaniello
Dmitry Misharov
: TestOnly, ZStream
Depends On:
Blocks: 1474840
  Show dependency treegraph
Reported: 2017-07-24 15:33 EDT by Nick Carboni
Modified: 2018-03-06 09:42 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1474840 (view as bug list)
Last Closed: 2018-03-06 09:42:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nick Carboni 2017-07-24 15:33:44 EDT
Description of problem:
When the Embedded Ansible role is removed from a server the services do not get stopped.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Start the Embedded Ansible role
2. Wait for the role to complete setup
3. Remove the Embedded Ansible role from the server

Actual results:
EmbeddedAnsible.running? and EmbeddedAnsible.alive? return true
(also supervisord, nginx, and rabbitmq-server are all running)

Expected results:
The methods should return false and the services should not be running when the role is active.

Additional info:
This seems to be caused by the changes in https://github.com/ManageIQ/manageiq/pull/15612 which created an alias for stop to kill.

This doesn't allow the worker to stop the services and could lead to having multiple instances of the services running on separate servers.
Comment 3 CFME Bot 2017-07-24 17:51:37 EDT
New commit detected on ManageIQ/manageiq/master:

commit bc8c26f5a92cc6ce417cb72e720e8ead02d79882
Author:     Joe Rafaniello <jrafanie@redhat.com>
AuthorDate: Mon Jul 24 14:34:11 2017 -0400
Commit:     Joe Rafaniello <jrafanie@redhat.com>
CommitDate: Mon Jul 24 16:36:00 2017 -0400

    Let ansible worker gracefully stop
    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.

 app/models/embedded_ansible_worker.rb       |  6 ++---
 spec/models/embedded_ansible_worker_spec.rb | 40 ++++++++++++++---------------
 2 files changed, 22 insertions(+), 24 deletions(-)
Comment 5 Dmitry Misharov 2017-10-13 09:07:44 EDT
Verified in After disabling embedded ansible role EmbeddedAnsible.running? and EmbeddedAnsible.alive? return false, supervisord, nginx, and rabbitmq-server services are not running.

Note You need to log in before you can comment on or make changes to this bug.