TRIAGED: confirmed.
The offending code is in hooks/percona_utils.py at:
303: SQL_SST_USER_SETUP = ("GRANT {permissions} ON *.* " "TO 'sstuser'@'localhost' IDENTIFIED BY '{password}'")
SQL_SST_USER_SETUP_IPV6 = ("GRANT {permissions} " "ON *.* TO 'sstuser'@'ip6-localhost' IDENTIFIED " "BY '{password}'")
1440:
def create_replication_user(slave_address, master_password): """ Create replication user (lp1776171)
Grants access for MySQL asynchronous replication slave.
:param slave_address: slave IP address :type slave_address: str :param master_password: replication password :type master_password: str :raises: OperationalError """ m_helper = get_db_helper() try: m_helper.connect(password=m_helper.get_mysql_root_password()) except OperationalError: log("Could not connect to db", level=DEBUG) return m_helper.execute(("GRANT REPLICATION SLAVE ON *.* TO ""'replication'@'{}' " "IDENTIFIED BY '{}';").format(slave_address, master_password))
FIX:
Replace grants with two SQL commands; one to create the user and one to grant the grant.
TRIAGED: confirmed.
The offending code is in hooks/percona_ utils.py at:
303:
"TO 'sstuser' @'localhost' IDENTIFIED BY '{password}'")
SQL_SST_USER_SETUP = ("GRANT {permissions} ON *.* "
SQL_SST_ USER_SETUP_ IPV6 = ("GRANT {permissions} "
" ON *.* TO 'sstuser' @'ip6-localhost ' IDENTIFIED "
" BY '{password}'")
1440:
def create_ replication_ user(slave_ address, master_password):
""" Create replication user (lp1776171)
Grants access for MySQL asynchronous replication slave.
:param slave_address: slave IP address
m_helper. connect( password= m_helper. get_mysql_ root_password( )) execute( ("GRANT REPLICATION SLAVE ON *.* TO ""'replication' @'{}' "
"IDENTIFIED BY '{}';") .format( slave_address,
master_ password) )
:type slave_address: str
:param master_password: replication password
:type master_password: str
:raises: OperationalError
"""
m_helper = get_db_helper()
try:
except OperationalError:
log("Could not connect to db", level=DEBUG)
return
m_helper.
FIX:
Replace grants with two SQL commands; one to create the user and one to grant the grant.