-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: sbd-inquisitor: SBD_SYNC_RESOURCE_STARTUP should consider SBD_PACEMAKER #141
base: main
Are you sure you want to change the base?
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=false
andSBD_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=true
doesn't workwith
SBD_PACEMAKER=false
.Additionally, if
SBD_PACEMAKER=false
butSBD_SYNC_RESOURCE_STARTUP=true
, theSBD_SYNC_RESOURCE_STARTUP=true
will have no effect, since
SBD_PACEMAKER
controls 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_STARTUP
andSBD_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, thebehavior is the same as it was before
SBD_SYNC_RESOURCE_STARTUP
wasintroduced: no warning.