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

Support a 'signalled' state in the supervisorctl module #29847

Closed
ansibot opened this issue Sep 12, 2017 · 6 comments
Closed

Support a 'signalled' state in the supervisorctl module #29847

ansibot opened this issue Sep 12, 2017 · 6 comments
Labels
affects_2.3 This issue/PR affects Ansible v2.3 bot_closed collection:community.general collection Related to Ansible Collections work feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. module This issue/PR relates to a module. needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md support:community This issue/PR relates to code supported by the Ansible community. web_infrastructure Web-infrastructure category

Comments

@ansibot
Copy link
Contributor

ansibot commented Sep 12, 2017

From @underyx on 2016-03-22T10:51:59Z

Issue Type:
  • Feature Idea
Component Name:

supervisorctl module

Ansible Version:

N/A

Ansible Configuration:

N/A

Environment:

N/A

Summary:

Supervisor 3.2.0 introduced the signal command for supervisorctl. This allows sending an arbitrary signal to supervised processes with the command supervisorctl signal <signal name> <name>. This could be used to for example reload nginx by sending it a SIGHUP, instead of using state=restarted and having it shut down momentarily.

Steps To Reproduce:
- name: restart nginx
  service: name=nginx state=restarted

- name: reload nginx
  service: name=nginx state=reloaded

- name: restart supervised nginx
  supervisorctl: name=nginx state=restarted

- name: reload supervised nginx
  supervisorctl: name=nginx state=signalled signal=SIGHUP

Copied from original issue: ansible/ansible-modules-core#3299

@ansibot
Copy link
Contributor Author

ansibot commented Sep 12, 2017

From @stevelle on 2016-03-22T10:51:59Z

+1 for this feature idea.
Applies to recommended use of uwsgi as well where HUP signal is used for a graceful reload of the app, and several other signals are encouraged for other uses.

@ansibot ansibot added the affects_2.3 This issue/PR affects Ansible v2.3 label Sep 12, 2017
@ansibot
Copy link
Contributor Author

ansibot commented Sep 12, 2017

From @dellsystem on 2016-03-22T10:51:59Z

+1 as well, would love this feature.

@ansibot
Copy link
Contributor Author

ansibot commented Sep 12, 2017

From @tedder on 2016-03-22T10:51:59Z

SIGHUP type support would certainly cut down on some of the times where I use state=restarted.

@ansibot
Copy link
Contributor Author

ansibot commented Sep 12, 2017

From @dellsystem on 2016-03-22T10:51:59Z

Turns out adding a "reloaded" state is a pretty simple fix:

dellsystem/ansible-modules-core@a97896c

I was going to submit a PR for this as well, but if anyone needs this functionality in the meantime, you can edit the source file yourself and apply the changes on lines 110 and 208-215. That should work if you're on the latest version of ansible (2.1.0). If you're on an older version, the code will be slightly different, but the basic instructions are:

  1. find
state=dict(required=True, choices=['present', 'started', 'restarted', 'stopped', 'absent'])

and add 'reloaded' to the list of choices; then,

  1. find the block that starts with
if state == 'restarted':

and clone the whole block directly underneath, replacing 'restarted' with 'reloaded', 'restart' with 'signal SIGHUP', and 'started' with 'signalled'.

@ansibot
Copy link
Contributor Author

ansibot commented Sep 12, 2017

From @mattupstate on 2016-03-22T10:51:59Z

needs_contributor

@ansibot ansibot added feature_idea needs_info This issue requires further information. Please answer any outstanding questions. needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 12, 2017
@ansible ansible deleted a comment from biomassives Sep 12, 2017
@ansible ansible deleted a comment from ansibot Sep 12, 2017
@ansibot ansibot added module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. waiting_on_contributor This would be accepted but there are no plans to actively work on it. and removed needs_info This issue requires further information. Please answer any outstanding questions. needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 12, 2017
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_idea labels Mar 2, 2018
@ansibot ansibot added support:core This issue/PR relates to code supported by the Ansible Engineering Team. and removed support:community This issue/PR relates to code supported by the Ansible community. labels Sep 19, 2018
a-harvie added a commit to a-harvie/ansible that referenced this issue Sep 20, 2018
mattclay pushed a commit to mattclay/ansible that referenced this issue Sep 21, 2018
@ansibot ansibot added needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) support:community This issue/PR relates to code supported by the Ansible community. and removed support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 5, 2018
@ansibot ansibot removed the needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) label Nov 10, 2018
@ansibot ansibot added the web_infrastructure Web-infrastructure category label Feb 17, 2019
@ansibot ansibot added the has_pr This issue has an associated PR. label Jul 28, 2019
@ansibot ansibot added collection Related to Ansible Collections work collection:community.general needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md labels Apr 29, 2020
@ansibot ansibot added the needs_triage Needs a first human triage before being processed. label May 16, 2020
@ansibot
Copy link
Contributor Author

ansibot commented Aug 16, 2020

Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.

For further information, please see:
https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md

@ansibot ansibot closed this as completed Aug 16, 2020
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Aug 17, 2020
@ansible ansible locked and limited conversation to collaborators Sep 13, 2020
@sivel sivel removed the waiting_on_contributor This would be accepted but there are no plans to actively work on it. label Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 bot_closed collection:community.general collection Related to Ansible Collections work feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. module This issue/PR relates to a module. needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md support:community This issue/PR relates to code supported by the Ansible community. web_infrastructure Web-infrastructure category
Projects
None yet
Development

No branches or pull requests

2 participants