<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi all,<div><br></div><div>Using pacemaker 1.1.18-11 and mysql resource agent (<a href="https://github.com/ClusterLabs/resource-agents/blob/RHEL6/heartbeat/mysql">https://github.com/ClusterLabs/resource-agents/blob/RHEL6/heartbeat/mysql</a>), I run into an unwanted behaviour. My point of view of course, maybe it's expected to be as it is that's why I ask.</div><div><br></div><div># My test case is the following :<br></div><div><div><br></div><div>Everything is OK on my cluster, crm_mon output is as below (no failed actions)</div><div><br></div><div><div> Master/Slave Set: ms_mysql-master [ms_mysql]</div><div>     Masters: [ db-master ]</div><div>     Slaves: [ db-slave ]</div></div><div><br></div><div>1. I insert in a table on master, no issue data is replicated.</div><div>2. I shut down net int on the master (vm), pacemaker correctly start on the other node. Master is seen as offline, and db-slave is now master </div><div><br></div><div><div> Master/Slave Set: ms_mysql-master [ms_mysql]</div><div>     Masters: [ db-slave ]</div></div><div><br></div><div>3. I bring back my net int up, pacemaker see the node online and set the old-master as a the new slave :<br></div><div><br></div><div><div> Master/Slave Set: ms_mysql-master [ms_mysql]</div><div>     Masters: [ db-slave ]</div><div>     Slaves: [ db-master ]</div></div><div><br></div><div>4. From this point, my external monitoring bash script shows that SQL and IO thread are not running, but I can't see any error in the pcs status/crm_mon outputs. Consequence is that I continue inserting on my new promoted master but the data is never consumed by my former master computer.</div><div><br></div><div># Questions : </div><div><br></div><div>- Is this some kind of safety behaviour to avoid data corruption when a node is back online ?</div><div>- When I want to manually start it like ocf does it returns this error : </div><div><div> </div><div>mysql -h localhost -u user-repl -pmysqlreplpw -e "START SLAVE"</div><div>ERROR 1200 (HY000) at line 1: Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO</div></div><div><br></div><div>- I would expect the cluster to stop the slave and show a failed action, am I wrong here ? </div><div><br></div><div># Other details (not sure it matters a lot) </div><div><br></div><div>No stonith enabled, no fencing or auto-failback. Symetric cluster configured.</div><div><br></div><div>Details of my pacemaker resource configuration is </div><div><br></div><div><div><div> Master: ms_mysql-master</div><div>  Meta Attrs: master-node-max=1 clone_max=2 globally-unique=false clone-node-max=1 notify=true</div><div>  Resource: ms_mysql (class=ocf provider=heartbeat type=mysql)</div><div>   Attributes: binary=/usr/bin/mysqld_safe config=/etc/my.cnf.d/server.cnf datadir=/var/lib/mysql evict_outdated_slaves=false max_slave_lag=15 pid=/var/lib/mysql/mysql.pid replication_passwd=mysqlreplpw replication_user=user-repl socket=/var/lib/mysql/mysql.sock test_passwd=mysqlrootpw test_user=root</div><div>   Operations: demote interval=0s timeout=120 (ms_mysql-demote-interval-0s)</div><div>               monitor interval=20 timeout=30 (ms_mysql-monitor-interval-20)</div><div>               monitor interval=10 role=Master timeout=30 (ms_mysql-monitor-interval-10)</div><div>               monitor interval=30 role=Slave timeout=30 (ms_mysql-monitor-interval-30)</div><div>               notify interval=0s timeout=90 (ms_mysql-notify-interval-0s)</div><div>               promote interval=0s timeout=120 (ms_mysql-promote-interval-0s)</div><div>               start interval=0s timeout=120 (ms_mysql-start-interval-0s)</div><div>               stop interval=0s timeout=120 (ms_mysql-stop-interval-0s)</div><br class="gmail-Apple-interchange-newline"></div></div><div>Any things I'm missing on this ? Did not find a clearly similar usecase when googling around network outage and pacemaker.</div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div><br></div><div><br><div> </div><div><br></div></div></div></div></div></div></div></div>