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

Archive /var/run/snabb/PID directory in case of crash #1378

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dpino
Copy link
Contributor

@dpino dpino commented Aug 29, 2018

Solves #1352.

Copy link
Contributor

@wingo wingo left a comment

Choose a reason for hiding this comment

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

I think this approach won't really solve the use case because there won't be any interesting counters any more. Firstly I should say that I'm mostly concerned about ptree workers; handling the general case is possible but we definitely have to handle the ptree worker case.

In that regard, this approach won't work; often exits are orderly, and in that case the handler isn't called. Disorderly exits don't always neatly propagate through an exception; if we want to handle that case, we should archive from the supervisor.

However more to the point, ptree does an engine.configure(config.new()) before stopping, so all of the apps get shut down in an orderly way. This will remove the counters and RRD files that we wanted to archive!

Archiving should also be optional. Right now we won't cause the disk to fill up. Systematically archiving could cause us to enter this state. Consider controlling via an environment variable.

Also probably we should only archive .counter and .rrd files.

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.

2 participants