Skip to content

Comments

Make restarting boulder in docker nicer.#2492

Merged
cpu merged 4 commits intomasterfrom
better-up
Jan 13, 2017
Merged

Make restarting boulder in docker nicer.#2492
cpu merged 4 commits intomasterfrom
better-up

Conversation

@jsha
Copy link
Contributor

@jsha jsha commented Jan 12, 2017

  • Handle SIGTERM and SIGINT in startservers.py.
  • Forcibly remove rsyslog pid to avoid error.
  • Use unbuffered mode for Python so the print statements (like "all servers running") get printed right away rather than at shutdown.
  • Squelch an unnecessary OSError about interrupting the wait() call.

Handle SIGTERM in startservers.py.
Forcibly remove rsyslog pid to avoid error.
Copy link
Contributor

@cpu cpu left a comment

Choose a reason for hiding this comment

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

There seems to be a strange CI error on the config-next build task:

ERROR: for bmysql Cannot create container for service bmysql: device or resource busy

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# start rsyslog
rm -f /var/run/rsyslogd.pid
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you expand on the comment above the rm to explain briefly why we are trying to remove this pid file?

Given that we expect this rm to fail in most cases do you think it's also worth redirecting stderr to /dev/null so that nobody will confuse the rm: cannot remove '/var/run/rsyslog.pid': No such file or directory as an error to be investigated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the comment. rm -f will inhibit errors when the file is not present.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great. Thank you

startup. Anything that did start before this point can be cleaned
up explicitly by calling stop(), or automatically atexit.
"""
signal.signal(signal.SIGTERM, lambda _, __: stop())
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you also register this for signal.SIGINT so it is useful outside of docker as well.

jsha added 2 commits January 12, 2017 11:31
- Handle SIGINT too.
- Use unbuffered mode for Python so the print statements (like "all servers
  running") get printed right away rather than at shutdown
- Squelch an unnecessary OSError about interrupting the wait() call.
@jsha
Copy link
Contributor Author

jsha commented Jan 12, 2017

I addressed @rolandshoemaker's comment and added some other substantive changes, please re-review.

Copy link
Contributor

@cpu cpu left a comment

Choose a reason for hiding this comment

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

LGTM 📟 💥

@cpu cpu merged commit 0a36796 into master Jan 13, 2017
@aarongable aarongable deleted the better-up branch January 19, 2022 22:51
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