You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by danobi <gi...@git.apache.org> on 2016/11/16 20:35:49 UTC

[GitHub] trafficserver pull request #1224: TS-5056 Implement nonrecoverable error mec...

GitHub user danobi opened a pull request:

    https://github.com/apache/trafficserver/pull/1224

    TS-5056 Implement nonrecoverable error mechanism

    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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/danobi/trafficserver TS-5056

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/1224.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1224
    
----
commit 43048cbf07325475e7a8d96ddaf13f872942b3e4
Author: Daniel Xu <dl...@yahoo.com>
Date:   2016-11-16T20:21:27Z

    TS-5056 Implement nonrecoverable error mechanism
    
    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.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #1224: TS-5056 Implement nonrecoverable error mec...

Posted by SolidWallOfCode <gi...@git.apache.org>.
Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1224#discussion_r89520379
  
    --- Diff: lib/ts/ink_error.cc ---
    @@ -61,19 +61,38 @@ ink_fatal(const char *message_format, ...)
       va_list ap;
     
       va_start(ap, message_format);
    -  fatal_va(message_format, ap);
    +  fatal_va("Fatal: ", message_format, ap);
       va_end(ap);
     
       ::exit(70); // 70 corresponds to EX_SOFTWARE in BSD's sysexits. As good a status as any.
     }
     
     void
    +ink_emergency_va(const char *fmt, va_list ap)
    +{
    +  fatal_va("Emergency: ", fmt, ap);
    +  ::exit(UNRECOVERABLE_EXIT);
    +}
    +
    +void
    +ink_emergency(const char *message_format, ...)
    +{
    +  va_list ap;
    +
    +  va_start(ap, message_format);
    +  ink_emergency_va(message_format, ap);
    +  va_end(ap);
    --- End diff --
    
    Hmmm. Hasn't the process already exited by this point? Maybe best to be safe, though.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1224: TS-5056 Implement nonrecoverable error mechanism

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1224
  
    FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1308/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1224: TS-5056 Implement nonrecoverable error mechanism

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1224
  
    Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/1202/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1224: TS-5056 Implement nonrecoverable error mechanism

Posted by shinrich <gi...@git.apache.org>.
Github user shinrich commented on the issue:

    https://github.com/apache/trafficserver/pull/1224
  
    [approve ci]


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1224: TS-5056 Implement nonrecoverable error mechanism

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:

    https://github.com/apache/trafficserver/pull/1224
  
    This needs to run clang-format again. Please rebase and push the PR again, and I'll land it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #1224: TS-5056 Implement nonrecoverable error mec...

Posted by SolidWallOfCode <gi...@git.apache.org>.
Github user SolidWallOfCode closed the pull request at:

    https://github.com/apache/trafficserver/pull/1224


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---