You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: fencer: Improve validation of pcmk_host_map
Previously, if we hit a parsing error in pcmk_host_map, we logged a
debug message and continued trying to parse the rest of the value. It's
hard to be confident about the resulting behavior.
Now, we stop parsing if we encounter an error.
Also as part of this commit, we use g_strsplit_set() twice. At the first
level, we use it to split the list of node-name-to-port mappings in
pcmk_host_map, using ';', ' ', and '\t' as delimiters. At the second
level, we use it to split each mapping, using '=' and ':' as delimiters.
Support for '=' is likely to be removed in a future release.
I greatly struggled to reason about the existing code based on
"last = i + 1". It felt as if there were lots of potential edge cases.
The behavior may not be identical as of this commit, but it should be
more robust and predictable, and the code should be easier to maintain.
Signed-off-by: Reid Wahl <[email protected]>
0 commit comments