Fix replication detach error
TypeError: tuple indices must be integers or slices, not str this is caused by the new version of the sqlachemy library. Change-Id: I76166f901f961a18ad4297d04e1a75a59b059e23
This commit is contained in:
parent
1da2376f5a
commit
f0f186ef9a
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fix a bug where replications failed to detach from the source instance
|
||||
because of the upgrade of the sqlachemy library.
|
@ -815,7 +815,7 @@ class BaseMySqlApp(service.BaseDbApp):
|
||||
replication_user = None
|
||||
with mysql_util.SqlClient(self.get_engine()) as client:
|
||||
result = client.execute(text('SHOW SLAVE STATUS'))
|
||||
replication_user = result.first()['Master_User']
|
||||
replication_user = result.first()._mapping['Master_User']
|
||||
client.execute(text('STOP SLAVE'))
|
||||
client.execute(text('RESET SLAVE ALL'))
|
||||
self.wait_for_slave_status('OFF', client, 180)
|
||||
|
Loading…
Reference in New Issue
Block a user