Skip to content
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

mysql: Check for promoted node during start is invalid #1839

Open
nrwahl2 opened this issue Jan 26, 2023 · 1 comment
Open

mysql: Check for promoted node during start is invalid #1839

nrwahl2 opened this issue Jan 26, 2023 · 1 comment

Comments

@nrwahl2
Copy link
Contributor

nrwahl2 commented Jan 26, 2023

The mysql agent checks the OCF_RESKEY_CRM_meta_notify_master_uname meta attribute during the start operation to determine which node (if any) is already promoted. This has a few issues:

  • It doesn't work. That meta attribute is set only during certain notify operations -- not during start operations.
  • The "master" terminology is deprecated in favor of "promoted."
  • If there are multiple promoted nodes (probably not possible in practice for mysql, but I'm not sure), then the parsing will probably break.

The main issue of course is that it doesn't work. I'd suggest something like crm_resource --resource <rsc_name> --locate --output-as=xml and then grabbing the node name(s) from the XML output where state="promoted".

# crm_resource -r stateful --locate --output-as=xml
<pacemaker-result api-version="2.28" request="crm_resource -r stateful --locate --output-as=xml">
  <nodes resource="stateful">
    <node state="promoted">fastvm-rhel-9-0-42</node>
    <node>fastvm-rhel-9-0-41</node>
  </nodes>
  <status code="0" message="OK"/>
</pacemaker-result>

The best practice is for tools to parse the XML output, since the text output format may change.

@oalbrigt
Copy link
Contributor

Makes sense to me.

According to Damien multi-promoted doesnt handle conflicts, so they would have to use galera for that use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants