Fix: sbd-inquisitor: SBD_SYNC_RESOURCE_STARTUP should consider SBD_PACEMAKER#141
Fix: sbd-inquisitor: SBD_SYNC_RESOURCE_STARTUP should consider SBD_PACEMAKER#141isaacpittman-hitachi wants to merge 2 commits intoClusterLabs:mainfrom
Conversation
…CEMAKER Currently, if `SBD_SYNC_RESOURCE_STARTUP=false` and `SBD_PACEMAKER=false`, sbd prints a warning every time it runs: "Should think about enabling SBD_SYNC_RESOURCE_STARTUP." But this warning can never be addressed, since `SBD_SYNC_RESOURCE_STARTUP=true` doesn't work with `SBD_PACEMAKER=false`. Additionally, if `SBD_PACEMAKER=false` but `SBD_SYNC_RESOURCE_STARTUP=true`, the `SBD_SYNC_RESOURCE_STARTUP=true` will have no effect, since `SBD_PACEMAKER` controls whether sbd sends the ping to pacemaker. (If pacemaker is also configured with `SBD_SYNC_RESOURCE_STARTUP=true`, it will hang forever waiting for the ping from sbd that never comes.) Handle both of these cases by checking the values of `SBD_SYNC_RESOURCE_STARTUP` and `SBD_PACEMAKER`: * `SBD_SYNC_RESOURCE_STARTUP=true`, `SBD_PACEMAKER=true`: No change. Startup syncs as expected. * `SBD_SYNC_RESOURCE_STARTUP=false`, `SBD_PACEMAKER=true`: No change. Sbd warns about enabling `SBD_SYNC_RESOURCE_STARTUP` as expected. * `SBD_SYNC_RESOURCE_STARTUP=true`, `SBD_PACEMAKER=false`: Currently, pacemaker would hang. With the fix, sbd aborts with an error. * `SBD_SYNC_RESOURCE_STARTUP=false`, `SBD_PACEMAKER=false`: Currently, sbd warns about enabling `SBD_SYNC_RESOURCE_STARTUP`. With the fix, the behavior is the same as it was before `SBD_SYNC_RESOURCE_STARTUP` was introduced: no warning.
|
Can one of the admins verify this patch? |
|
test this please |
|
Not sure if what you tried is a valid configuration. |
|
Thank you for the feedback! You're probably right that I tested an invalid configuration. I've removed the check that broke the unit tests but kept the disabled warning in case |
|
test this please |
|
Hmm ... If both resource-startup-syncing = true and pacemaker-check = false are set explicitly this is In pacemaker we should probably at least catch the case that pacemaker-checks We on top should try not to break high-level-tool-compatibility. Your initial suggestion is probably a good first step in the right direction at least. |
|
Thank you for the in depth feedback! I was hoping to at least get the suppressed warning checked in, since the frequent warnings make it harder to spot other issues in the logs. If that's alright, I could file another PR for the suppressed warning issue and keep this one open to address compatibility in general between resource-startup-syncing and pacemaker-check. |
|
Sorry for not reacting for so long. Got involved in other things and wanted to think it through properly - this time ;-) - before |
Currently, if
SBD_SYNC_RESOURCE_STARTUP=falseandSBD_PACEMAKER=false, sbd prints a warning every time it runs: "Shouldthink about enabling SBD_SYNC_RESOURCE_STARTUP." But this warning can
never be addressed, since
SBD_SYNC_RESOURCE_STARTUP=truedoesn't workwith
SBD_PACEMAKER=false.Additionally, if
SBD_PACEMAKER=falsebutSBD_SYNC_RESOURCE_STARTUP=true, theSBD_SYNC_RESOURCE_STARTUP=truewill have no effect, since
SBD_PACEMAKERcontrols whether sbd sendsthe ping to pacemaker. (If pacemaker is also configured with
SBD_SYNC_RESOURCE_STARTUP=true, it will hang forever waiting for theping from sbd that never comes.)
Handle both of these cases by checking the values of
SBD_SYNC_RESOURCE_STARTUPandSBD_PACEMAKER:SBD_SYNC_RESOURCE_STARTUP=true,SBD_PACEMAKER=true: No change.Startup syncs as expected.
SBD_SYNC_RESOURCE_STARTUP=false,SBD_PACEMAKER=true: No change.Sbd warns about enabling
SBD_SYNC_RESOURCE_STARTUPas expected.SBD_SYNC_RESOURCE_STARTUP=true,SBD_PACEMAKER=false: Currently,pacemaker would hang. With the fix, sbd aborts with an error.
SBD_SYNC_RESOURCE_STARTUP=false,SBD_PACEMAKER=false: Currently,sbd warns about enabling
SBD_SYNC_RESOURCE_STARTUP. With the fix, thebehavior is the same as it was before
SBD_SYNC_RESOURCE_STARTUPwasintroduced: no warning.