-
Notifications
You must be signed in to change notification settings - Fork 336
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
pacemaker_remote enhancements #815
Conversation
Prevously, Reattach relied on command lines being logged, which 8dae683 removed. Now, it doesn't. Previously, Reattach used the now-deprecated is-managed-default cluster option; now, it uses the is-managed option in rsc_defaults.
The various Remote* tests now derive directly from RemoteDriver rather than instantiate a RemoteDriver as a member. This simplifies the code significantly and makes it easier to change the code for all Remote tests.
Previously, certain class members were initialized for the first run of any given Remote* test, and reused for all later runs. This caused previous errors to propagate and otherwise interfere. Now, new RemoteDriver methods reduce code duplication and re-initialize the appropriate members for each run.
…_remote_baremetal node flags These flags are being deprecated because nothing uses them and they were set incorrectly anyway. The flags were set by crm_remote_peer_cache_refresh(). That function's final step, checking the CIB status section for remote node state entries, always used crm_remote_baremetal, which is incorrect because guest nodes have state entries too. That step would override any crm_remote_container flags set previously when checking the resources section.
Add a new node_update_flags enumeration, node_update_all (the bitwise-and of all node update fields -- though not all flags, which include "quick"), and modify existing code to use it where appropriate. Makes code shorter and easier to follow.
This refactor simplifies do_lrm_query_internal(). It is now static, loses the long-unused is_replace argument, and gets a new argument update_flags. This allows its backward-compatibility hack for older DCs to be moved to do_lrm_query(), which should be the only place that needs it. Some code duplication is avoided by using existing functions. This also removes the header declaration for the long-gone create_node_state() function.
…wn source code file The following functions were moved from xml.c to a new xpath.c: freeXpathObject() getXpathResult() dedupXpathResults() xpath_search() get_xpath_object_relative() get_xpath_object() At >6K lines, xml.c was getting a bit unwieldy to add new functions to.
This adds crm_foreach_xpath_result(), which runs an xpath search and calls a supplied function for each search result. The new function is not used yet, but will come in handy when refreshing the remote node cache, among other places.
This commit prevents autoreaping of the remote peer cache in crm_update_peer_state_iter(). At this point, a remote peer's state is always member, so this has no effect on behavior yet. But once crm_remote_peer_cache_refresh() starts setting remote peer state, reaping will be handled there, so we don't want it to happen here.
Crmd waits until some information is received about its peers before declaring itself operational. Having peer_update_callback() called was previously considered sufficient, which worked because peer callbacks are currently never called for remote nodes. But we want to start using remote node status, so only consider information about cluster nodes to be sufficient for this purpose.
FYI removed a couple of commits from this request b/c those areas might see more changes, and to trigger travis again since ubuntu was flaky the first time. |
…nodes Setting join/process info wouldn't hurt for remote nodes since those fields are never used, but it is clearer and avoids the potential for trouble to keep them unset.
holy heck |
stonith_cleanup_list = NULL; | ||
} | ||
|
||
/* end stonith cleanup list functions */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I understand why you went to the effort of making all these functions. Definitely helps having them all in one place :)
Most of this is refactoring to prepare for tracking remote node status. Also, some CTS and regression test issues are fixed, and the Pacemaker Remote documentation's KVM walk-through is updated.