File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -454,6 +454,7 @@ pcmk_shutdown_worker(gpointer user_data)
454454 crm_notice ("Shutdown complete" );
455455 pacemakerd_state = XML_PING_ATTR_PACEMAKERDSTATE_SHUTDOWNCOMPLETE ;
456456 if (!fatal_error && running_with_sbd &&
457+ pcmk__get_sbd_sync_resource_startup () &&
457458 !shutdown_complete_state_reported_client_closed ) {
458459 return TRUE;
459460 }
@@ -1248,10 +1249,15 @@ main(int argc, char **argv)
12481249 mainloop_add_signal (SIGTERM , pcmk_shutdown );
12491250 mainloop_add_signal (SIGINT , pcmk_shutdown );
12501251
1251- if (running_with_sbd ) {
1252+ if (( running_with_sbd ) && pcmk__get_sbd_sync_resource_startup () ) {
12521253 pacemakerd_state = XML_PING_ATTR_PACEMAKERDSTATE_WAITPING ;
12531254 startup_trigger = mainloop_add_trigger (G_PRIORITY_HIGH , init_children_processes , NULL );
12541255 } else {
1256+ if (running_with_sbd ) {
1257+ crm_warn ("Enabling SBD_SYNC_RESOURCE_STARTUP would (if supported "
1258+ "by your sbd version) improve reliability of "
1259+ "interworking between SBD & pacemaker." );
1260+ }
12551261 pacemakerd_state = XML_PING_ATTR_PACEMAKERDSTATE_STARTINGDAEMONS ;
12561262 init_children_processes (NULL );
12571263 }
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ bool pcmk__valid_utilization(const char *value);
111111
112112// from watchdog.c
113113long pcmk__get_sbd_timeout (void );
114+ bool pcmk__get_sbd_sync_resource_startup (void );
114115long pcmk__auto_watchdog_timeout (void );
115116bool pcmk__valid_sbd_timeout (const char * value );
116117
Original file line number Diff line number Diff line change @@ -227,6 +227,21 @@ pcmk__get_sbd_timeout(void)
227227 return sbd_timeout ;
228228}
229229
230+ bool
231+ pcmk__get_sbd_sync_resource_startup (void )
232+ {
233+ static bool sync_resource_startup = false;
234+ static bool checked_sync_resource_startup = false;
235+
236+ if (!checked_sync_resource_startup ) {
237+ sync_resource_startup =
238+ crm_is_true (getenv ("SBD_SYNC_RESOURCE_STARTUP" ));
239+ checked_sync_resource_startup = true;
240+ }
241+
242+ return sync_resource_startup ;
243+ }
244+
230245long
231246pcmk__auto_watchdog_timeout ()
232247{
You can’t perform that action at this time.
0 commit comments