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 647757 Details for
Bug 876908
corosync-objctl operations return Error reloading DB 11
[?]
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 1 - Track changes for confdb logging object
2012-11-19-0001-Track-changes-for-confdb-logging-object.patch (text/plain), 3.96 KB, created by
Jan Friesse
on 2012-11-19 13:35:53 UTC
(
hide
)
Description:
Proposed patch - part 1 - Track changes for confdb logging object
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2012-11-19 13:35:53 UTC
Size:
3.96 KB
patch
obsolete
>From 8c407dc27cb215724448c5c522e3073a0f54cc24 Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Mon, 19 Nov 2012 14:24:56 +0100 >Subject: [PATCH 1/2] Track changes for confdb logging object > >This makes possible to track changes in logging object (and it's >sub objects) for changes, so reload is no longer needed. > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >--- > exec/mainconfig.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++---- > 1 files changed, 91 insertions(+), 8 deletions(-) > >diff --git a/exec/mainconfig.c b/exec/mainconfig.c >index d15dd49..7961876 100644 >--- a/exec/mainconfig.c >+++ b/exec/mainconfig.c >@@ -631,31 +631,114 @@ static int gid_determine (const char *req_group) > return ais_gid; > } > >+static unsigned int logging_handle_find ( >+ struct objdb_iface_ver0 *objdb, >+ hdb_handle_t *logging_find_handle) >+{ >+ hdb_handle_t object_find_handle; >+ unsigned int res; >+ >+ objdb->object_find_create ( >+ OBJECT_PARENT_HANDLE, >+ "logging", >+ strlen ("logging"), >+ &object_find_handle); >+ >+ res = objdb->object_find_next ( >+ object_find_handle, >+ logging_find_handle); >+ >+ objdb->object_find_destroy (object_find_handle); >+ >+ if (res == -1) { >+ return (-1); >+ } >+ >+ return (0); >+} >+ >+static void logsys_objdb_key_change_notify(object_change_type_t change_type, >+ hdb_handle_t parent_object_handle, >+ hdb_handle_t object_handle, >+ const void *object_name_pt, size_t object_name_len, >+ const void *key_name_pt, size_t key_len, >+ const void *key_value_pt, size_t key_value_len, >+ void *priv_data_pt) >+{ >+ const char *error_string; >+ >+ if (logsys_format_set(NULL) == -1) { >+ fprintf (stderr, "Unable to setup logging format.\n"); >+ } >+ corosync_main_config_read_logging(global_objdb, >+ &error_string); >+} > > static void main_objdb_reload_notify(objdb_reload_notify_type_t type, int flush, > void *priv_data_pt) > { > const char *error_string; >+ hdb_handle_t logsys_object_handle; > >- if (type == OBJDB_RELOAD_NOTIFY_END) { >+ /* >+ * A new logsys {} key might exist, cancel the >+ * existing notification at the start of reload, >+ * and start a new one on the new object when >+ * it's all settled. >+ */ >+ if (type == OBJDB_RELOAD_NOTIFY_START) { >+ global_objdb->object_track_stop( >+ logsys_objdb_key_change_notify, >+ NULL, >+ NULL, >+ NULL, >+ NULL); >+ } > >- /* >- * Reload the logsys configuration >- */ >- if (logsys_format_set(NULL) == -1) { >- fprintf (stderr, "Unable to setup logging format.\n"); >+ if (type == OBJDB_RELOAD_NOTIFY_END || type == OBJDB_RELOAD_NOTIFY_FAILED) { >+ if (!logging_handle_find(global_objdb, &logsys_object_handle)) { >+ /* >+ * Reload the logsys configuration >+ */ >+ if (logsys_format_set(NULL) == -1) { >+ fprintf (stderr, "Unable to setup logging format.\n"); >+ } >+ corosync_main_config_read_logging(global_objdb, >+ &error_string); >+ >+ global_objdb->object_track_start(logsys_object_handle, >+ 1, >+ logsys_objdb_key_change_notify, >+ NULL, // object_create_notify, >+ NULL, // object_destroy_notify, >+ NULL, // object_reload_notify >+ NULL); // priv_data >+ } else { >+ log_printf(LOGSYS_LEVEL_ERROR, "logsys objdb tracking stopped, cannot find logsys{} handle on objdb\n"); > } >- corosync_main_config_read_logging(global_objdb, >- &error_string); > } > } > >+ > static void add_logsys_config_notification( > struct objdb_iface_ver0 *objdb) > { >+ hdb_handle_t logsys_object_handle; > > global_objdb = objdb; > >+ if (!logging_handle_find(global_objdb, &logsys_object_handle)) { >+ objdb->object_track_start(logsys_object_handle, >+ 1, >+ logsys_objdb_key_change_notify, >+ NULL, // object_create_notify, >+ NULL, // object_destroy_notify, >+ NULL, // object_reload_notify >+ NULL); // priv_data >+ } else { >+ log_printf(LOGSYS_LEVEL_ERROR, "logsys objdb tracking stopped, cannot find logsys{} handle on objdb\n"); >+ } >+ > objdb->object_track_start(OBJECT_PARENT_HANDLE, > 1, > NULL, >-- >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 876908
: 647757 |
647758