Merge "fix database sync always get the wrong value" into stable/train

This commit is contained in:
Zuul 2021-01-14 14:27:38 +00:00 committed by Gerrit Code Review
commit f9035b251e
1 changed files with 3 additions and 1 deletions

View File

@ -21,10 +21,12 @@ from sqlalchemy import (Table, MetaData, Column, String, Text, Integer,
from oslo_config import cfg
from oslo_utils import timeutils
from designate.conf import central
from designate.sqlalchemy.types import UUID
CONF = cfg.CONF
central.register_opts(CONF)
RESOURCE_STATUSES = ['ACTIVE', 'PENDING', 'DELETED', 'ERROR']
RECORD_TYPES = ['A', 'AAAA', 'CNAME', 'MX', 'SRV', 'TXT', 'SPF', 'NS', 'PTR',
@ -367,7 +369,7 @@ def default_shard(context, id_col):
def upgrade(migrate_engine):
metadata.bind = migrate_engine
default_pool_id = cfg.CONF['service:central'].default_pool_id
default_pool_id = CONF['service:central'].default_pool_id
with migrate_engine.begin() as conn:
if migrate_engine.name == "mysql":