I tested this patch in our staging environment, i can confirm that i no longer see race condition between FixedIP.associate and FixedIPList.get_by_instance_uuid
This is how i tested the patch,
1. Disabled semi-synchronous replication on the read-only slave
mysql> SHOW STATUS LIKE 'rpl_semi_sync_slave%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | ON |
+----------------------------+-------+
1 row in set (0.00 sec)
mysql> SET GLOBAL rpl_semi_sync_slave_enabled=0;
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW STATUS LIKE 'rpl_semi_sync_slave%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | OFF |
+----------------------------+-------+
1 row in set (0.00 sec)
Ran 50 VM create very quickly using following script
(nova) saga@api1[openstack_stage]:~$ cat create.sh
for i in {1..50}
do
openstack server create --flavor small --image ylinux-6.8.5_217 saga6-$i &
done
All the VMs created came back to 'ACTIVE' state without any errors. The same test cases used to cause VMs to be stuck in 'BUILD' state or just Error out because of DB race , without the patch that no longer happens.
Hello,
I tested this patch in our staging environment, i can confirm that i no longer see race condition between FixedIP.associate and FixedIPList. get_by_ instance_ uuid
This is how i tested the patch,
1. Disabled semi-synchronous replication on the read-only slave
mysql> SHOW STATUS LIKE 'rpl_semi_ sync_slave% '; ------- ------- ------- -+----- --+ ------- ------- ------- -+----- --+ sync_slave_ status | ON | ------- ------- ------- -+----- --+
+------
| Variable_name | Value |
+------
| Rpl_semi_
+------
1 row in set (0.00 sec)
mysql> SET GLOBAL rpl_semi_ sync_slave_ enabled= 0;
Query OK, 0 rows affected (0.00 sec)
mysql> STOP SLAVE IO_THREAD;
Query OK, 0 rows affected (0.04 sec)
mysql> START SLAVE IO_THREAD;
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW STATUS LIKE 'rpl_semi_ sync_slave% '; ------- ------- ------- -+----- --+ ------- ------- ------- -+----- --+ sync_slave_ status | OFF | ------- ------- ------- -+----- --+
+------
| Variable_name | Value |
+------
| Rpl_semi_
+------
1 row in set (0.00 sec)
Ran 50 VM create very quickly using following script
(nova) saga@api1[ openstack_ stage]: ~$ cat create.sh
for i in {1..50}
do
openstack server create --flavor small --image ylinux-6.8.5_217 saga6-$i &
done
All the VMs created came back to 'ACTIVE' state without any errors. The same test cases used to cause VMs to be stuck in 'BUILD' state or just Error out because of DB race , without the patch that no longer happens.