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 829309 Details for
Bug 1031832
corosync-cfgtool -R (reload of corosync.conf) doesn't return status if the config file is invalid
[?]
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 take 2 - return error on reload failure
2013-11-26-0001-cfgtool-return-error-on-reload-failure.patch (text/plain), 1.77 KB, created by
Jan Friesse
on 2013-11-26 14:43:25 UTC
(
hide
)
Description:
Proposed patch take 2 - return error on reload failure
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2013-11-26 14:43:25 UTC
Size:
1.77 KB
patch
obsolete
>From 7014f10123a634cf026491edc9a09d6044106116 Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Tue, 19 Nov 2013 14:33:07 +0000 >Subject: [PATCH] cfgtool: return error on reload failure > >If reload fails, return code is set to value >0 to indicate error. > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >Reviewed-by: Christine Caulfield <ccaulfie@redhat.com> >--- > tools/corosync-cfgtool.c | 14 ++++++++++---- > 1 files changed, 10 insertions(+), 4 deletions(-) > >diff --git a/tools/corosync-cfgtool.c b/tools/corosync-cfgtool.c >index 07d318a..fc497a3 100644 >--- a/tools/corosync-cfgtool.c >+++ b/tools/corosync-cfgtool.c >@@ -137,27 +137,33 @@ static void ringreenable_do (void) > (void)corosync_cfg_finalize (handle); > } > >-static void reload_config_do (void) >+static int reload_config_do (void) > { > cs_error_t result; > corosync_cfg_handle_t handle; >+ int rc; >+ >+ rc = 0; > > printf ("Reloading corosync.conf...\n"); > result = corosync_cfg_initialize (&handle, NULL); > if (result != CS_OK) { >- printf ("Could not initialize corosync configuration API error %d\n", result); >+ printf ("Could not initialize corosync configuration API error %s\n", cs_strerror(result)); > exit (1); > } > > result = corosync_cfg_reload_config (handle); > if (result != CS_OK) { >- printf ("Could not reload configuration %d\n", result); >+ printf ("Could not reload configuration. Error %s\n", cs_strerror(result)); >+ rc = (int)result; > } > else { > printf ("Done\n"); > } > > (void)corosync_cfg_finalize (handle); >+ >+ return (rc); > } > > static void shutdown_do(void) >@@ -278,7 +284,7 @@ int main (int argc, char *argv[]) { > rc = ringstatusget_do (interface_name); > break; > case 'R': >- reload_config_do (); >+ rc = reload_config_do (); > break; > case 'r': > ringreenable_do (); >-- >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 1031832
:
826082
| 829309