diff --git a/releasenotes/notes/fix-gtid-parsing-9f60ad6e9e8f173f.yaml b/releasenotes/notes/fix-gtid-parsing-9f60ad6e9e8f173f.yaml new file mode 100644 index 0000000000..7c2416a9eb --- /dev/null +++ b/releasenotes/notes/fix-gtid-parsing-9f60ad6e9e8f173f.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - Fixed parsing of GTID references containing a list + of GTIDs from xtrabackup_binlog_info file on + MySql replicas. diff --git a/trove/guestagent/strategies/replication/mysql_gtid.py b/trove/guestagent/strategies/replication/mysql_gtid.py index f25606b907..b60c95a287 100644 --- a/trove/guestagent/strategies/replication/mysql_gtid.py +++ b/trove/guestagent/strategies/replication/mysql_gtid.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. # -import csv - from oslo_log import log as logging from trove.common import cfg @@ -75,8 +73,7 @@ class MysqlGTIDReplication(mysql_base.MysqlReplicationBase): LOG.info(_("Reading last master GTID from %s") % INFO_FILE) try: with open(INFO_FILE, 'rb') as f: - row = csv.reader(f, delimiter='\t', - skipinitialspace=True).next() + row = f.read().split('\t') return row[2] except (IOError, IndexError) as ex: LOG.exception(ex)