diff --git a/releasenotes/notes/fix-replication-detach-a21f29c89d089f9b.yaml b/releasenotes/notes/fix-replication-detach-a21f29c89d089f9b.yaml new file mode 100644 index 0000000000..a9c0d99ad7 --- /dev/null +++ b/releasenotes/notes/fix-replication-detach-a21f29c89d089f9b.yaml @@ -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. diff --git a/trove/guestagent/datastore/mysql_common/service.py b/trove/guestagent/datastore/mysql_common/service.py index 7198f6c3f4..d875f61b27 100644 --- a/trove/guestagent/datastore/mysql_common/service.py +++ b/trove/guestagent/datastore/mysql_common/service.py @@ -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)