Skip to content

starting mysql: slave is started twice in a row? #8

@FrankVanDamme

Description

@FrankVanDamme

Not sure about this, but I'm reading through the resource script to get a better understanding of how it works and I notice this in the function "start":
on both lines 832 and 847, there is code that picks the uname of the master out of the crm's notifications ($OCF_RESKEY_CRM_meta_notify_master_uname), checks if it's a different node than the host the script is being ran on, and then sets the master to that node. There are two differences:

  • first time around, spaces in OCF_RESKEY_CRM_meta_notify_master_uname are trimmed
  • first time, the slave is started with simply runnign the query "START SLAVE;"
    second time the function "start_slave" is used which also clears the $master_host-log-file-${INSTANCE_ATTR_NAME} and $master_host-log-pos-${INSTANCE_ATTR_NAME} attributes in the crm config

Why this difference?? Looks to me like both pieces are executed each time the script starts a mysql server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions