Mysql ocf race introduce
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
High
|
Sergii Golovatiuk | ||
Mitaka |
Fix Released
|
High
|
Sergii Golovatiuk | ||
Newton |
Fix Released
|
High
|
Sergii Golovatiuk | ||
Ocata |
Fix Committed
|
High
|
Sergii Golovatiuk |
Bug Description
Hello,
fix to this bug introduce sleep, that always executed on primary-contoller:
https:/
$ if [ "$GTID"="0" ]; then echo 'BINGO'; fi
BINGO
$ if [ "$GTID"="0" ]; then echo 'BINGO'; fi
BINGO
$ if [ "$GTID"=="0" ]; then echo 'BINGO'; fi
BINGO
$ if [[ "$GTID"=="0" ]]; then echo 'BINGO'; fi
BINGO
Because of that new function + sleep, mysql split brain condition became really easy thing to obtain. Run while true; update database; sleep 0.1; done and in next 5 minutes you'll have split-brain. The fix is trivial:
root@node-
--- mysql-wss 2017-01-20 16:53:24.764587866 +0000
+++ mysql-wss.fixed 2017-01-20 16:53:12.212299614 +0000
@@ -343,7 +343,7 @@
GTID=
- if [ "$GTID"="0" ]; then
+ if [ "$GTID" = "0" ]; then
sleep $[ ( $RANDOM % 10 ) + 1]
fi
tags: | added: area-library customer-found |
tags: | added: release-notes |
tags: | removed: release-notes |
https:/ /review. openstack. org/#/c/ 423415/