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 (cherry picked from commit f0f186ef9a278c919cfba331a05f2f1b3fa6a572)
This commit is contained in:
parent
4c191c3032
commit
95e879d425
@ -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…
x
Reference in New Issue
Block a user