Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 581495 Details for
Bug 817968
Automatic restart of service causes its BoundBy dependencies to stop but not start again
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[3/4] service: fix auto-restart handling in service_stop()
service-fix-auto-restart-handling-in-service_stop.patch (text/plain), 1.79 KB, created by
David Ward
on 2012-05-01 23:16:52 UTC
(
hide
)
Description:
[3/4] service: fix auto-restart handling in service_stop()
Filename:
MIME Type:
Creator:
David Ward
Created:
2012-05-01 23:16:52 UTC
Size:
1.79 KB
patch
obsolete
>From c563b8e4ffa604066fa925817927351e465e204b Mon Sep 17 00:00:00 2001 >From: David Ward <david.ward@ll.mit.edu> >Date: Sun, 29 Apr 2012 09:35:48 -0400 >Subject: [PATCH] service: fix auto-restart handling in service_stop() > >When service_stop() handles a service in the SERVICE_AUTO_RESTART state, >it calls service_set_state() to transition it to the SERVICE_DEAD state. >However if the service failed, it should transition it to SERVICE_FAILED >instead, which will trigger its OnFailure units. To achieve this, we now >call service_enter_dead() in place of service_set_state(), which will >transition the service to either SERVICE_DEAD or SERVICE_FAILED as is >appropriate. > >Also, some misleading comments are adjusted: service_stop() is not only >called on a user request, but also during an automatic restart in order >to handle dependencies. > >Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45511 >--- > src/service.c | 7 +++---- > 1 files changed, 3 insertions(+), 4 deletions(-) > >diff --git a/src/service.c b/src/service.c >index 34b7d84..401c146 100644 >--- a/src/service.c >+++ b/src/service.c >@@ -2447,8 +2447,7 @@ static int service_stop(Unit *u) { > > assert(s); > >- /* This is a user request, so don't do restarts on this >- * shutdown. */ >+ /* Don't create restart jobs from here. */ > s->forbid_restart = true; > > /* Already on it */ >@@ -2460,9 +2459,9 @@ static int service_stop(Unit *u) { > s->state == SERVICE_FINAL_SIGKILL) > return 0; > >- /* Don't allow a restart */ >+ /* A restart will be scheduled or is in progress. */ > if (s->state == SERVICE_AUTO_RESTART) { >- service_set_state(s, SERVICE_DEAD); >+ service_enter_dead(s, SERVICE_SUCCESS, false); > return 0; > } > >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 817968
:
581492
|
581494
| 581495 |
581496