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 713830 Details for
Bug 924261
cfg service: When shutdown cannot be processed immediately, it's not possible to repeat
[?]
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]
Proposed patch - part 2 - cfgtool Retry shutdown on CS_ERR_TRY_AGAIN
2013-03-13-0002-cfgtool-Retry-shutdown-on-CS_ERR_TRY_AGAIN.patch (text/plain), 1.38 KB, created by
Jan Friesse
on 2013-03-21 13:03:41 UTC
(
hide
)
Description:
Proposed patch - part 2 - cfgtool Retry shutdown on CS_ERR_TRY_AGAIN
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2013-03-21 13:03:41 UTC
Size:
1.38 KB
patch
obsolete
>From 931199b6573d8a1a047345606d5fbd8b4ca0a795 Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Wed, 6 Mar 2013 13:42:09 +0100 >Subject: [PATCH 2/6] cfgtool: Retry shutdown on CS_ERR_TRY_AGAIN > >It may be nice to deliver macro cs_repeat as default in some include >file. > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >--- > tools/corosync-cfgtool.c | 16 +++++++++++++++- > 1 files changed, 15 insertions(+), 1 deletions(-) > >diff --git a/tools/corosync-cfgtool.c b/tools/corosync-cfgtool.c >index 8ae41fd..7f235ef 100644 >--- a/tools/corosync-cfgtool.c >+++ b/tools/corosync-cfgtool.c >@@ -51,6 +51,20 @@ > #include <corosync/totem/totem.h> > #include <corosync/cfg.h> > >+#define cs_repeat(result, max, code) \ >+ do { \ >+ int counter = 0; \ >+ do { \ >+ result = code; \ >+ if (result == CS_ERR_TRY_AGAIN) { \ >+ sleep(1); \ >+ counter++; \ >+ } else { \ >+ break; \ >+ } \ >+ } while (counter < max); \ >+ } while (0) >+ > static void ringstatusget_do (void) > { > cs_error_t result; >@@ -163,7 +177,7 @@ static void shutdown_do(void) > } > > printf ("Shutting down corosync\n"); >- result = corosync_cfg_try_shutdown (handle, COROSYNC_CFG_SHUTDOWN_FLAG_REQUEST); >+ cs_repeat(result, 30, corosync_cfg_try_shutdown (handle, COROSYNC_CFG_SHUTDOWN_FLAG_REQUEST)); > if (result != CS_OK) { > printf ("Could not shutdown (error = %d)\n", result); > } >-- >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 924261
:
713828
| 713830