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

TS-5056 Implement nonrecoverable error mechanism #1224

Closed
wants to merge 2 commits into from

Conversation

danobi
Copy link
Member

@danobi danobi commented Nov 16, 2016

Change Emergency() to terminate the current process with status
code UNRECOVERABLE_EXIT.

Also change traffic_manager to listen for the UNRECOVERABLE_EXIT
status code. If heard, then TM will not try to restart TS from
that point forward.

This was designed so that traffic_server could call Emergency(..)
in the event of a nonrecoverable error such as a bad config file.
No amount of TS rebooting will fix a bad config, so we might as well
have TM wait for human intervention.

Note that if traffic_cop or traffic_manager calls Emergency(),
nothing totally unexpected will happen since the only visible change
from this patch is the status code.

Change `Emergency()` to terminate the current process with status
code UNRECOVERABLE_EXIT.

Also change traffic_manager to listen for the UNRECOVERABLE_EXIT
status code. If heard, then TM will not try to restart TS from
that point forward.

This was designed so that traffic_server could call Emergency(..)
in the event of a nonrecoverable error such as a bad config file.
No amount of TS rebooting will fix a bad config, so we might as well
have TM wait for human intervention.

Note that if traffic_cop or traffic_manager calls Emergency(),
nothing totally unexpected will happen since the only visible change
from this patch is the status code.

va_start(ap, message_format);
ink_emergency_va(message_format, ap);
va_end(ap);
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm. Hasn't the process already exited by this point? Maybe best to be safe, though.

@SolidWallOfCode SolidWallOfCode self-assigned this Nov 24, 2016
@SolidWallOfCode SolidWallOfCode added this to the 7.1.0 milestone Nov 24, 2016
@shinrich
Copy link
Member

shinrich commented Jan 6, 2017

[approve ci]

@SolidWallOfCode
Copy link
Member

I did this by hand, to squash the two commits.

@atsci
Copy link

atsci commented Jan 6, 2017

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1308/ for details.

@atsci
Copy link

atsci commented Jan 6, 2017

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/1202/ for details.

@zwoop zwoop modified the milestone: 7.1.0 May 4, 2017
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Nov 6, 2017
* asf/master:
  [TS-5024] Ran clang-format. Modify TSHttpTxnHookAdd to add hook only once.
  Modify TSHttpTxnHookAdd to add hook only once
  TS-4887: Fixes naming of this new API in the docs
  TS-5059: Port TCP Fast Open BIO to OpenSSL 1.1
  get_creation_time() takes *time_t, not *long
  apache#1323 Restores the NULL string where appropriate
  Add 7.1.x to the github mirror and build triggers
  Doc: Updates to prevent dangling references.
  TS-5022: remove goto
  TS-5022: fix silent exit problem
  Fix Http2Stream *stream variable shadow reported by issue 1308.
  TS-5022: resource leak fix
  TS-5056: Implement nonrecoverable error mechanism This closes apache#1224.
  TS-5022: Allow multiple client cert for ATS
  TS-5092: ATS handling of too many concurrent streams too agressive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants