Skip to content

Commit

Permalink
Fix: sbd-inquisitor: fail startup if pacemaker integration is disable…
Browse files Browse the repository at this point in the history
…d while SBD_SYNC_RESOURCE_STARTUP is conflicting

And tell user to fix the configuration by either enabling SBD_PACEMAKER
or explicitly disabling SBD_SYNC_RESOURCE_STARTUP. Otherwise startup of
pacemaker would be hanging forever, since pacemaker only knows about
SBD_SYNC_RESOURCE_STARTUP.
  • Loading branch information
gao-yan committed Nov 24, 2022
1 parent 82282ac commit bacb6e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sbd-inquisitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,12 @@ int main(int argc, char **argv, char **envp)
cl_log(LOG_WARNING, "SBD built against pacemaker supporting "
"pacemakerd-API. Should think about enabling "
"SBD_SYNC_RESOURCE_STARTUP.");

} else if (!check_pcmk && sync_resource_startup) {
fprintf(stderr, "Set SBD_PACEMAKER=yes to allow resource startup syncing. "
"Otherwise explicitly set SBD_SYNC_RESOURCE_STARTUP=no if to intentionally disable.\n");
exit_status = -1;
goto out;
}
#endif
}
Expand Down

0 comments on commit bacb6e7

Please sign in to comment.