Fix mysql instance create failed when enable skip-name-resolve
In the guestagent code, it create os_admin user only grant privileges on host:localhost, but use host:127.0.0.1 to connect to mysql. Modify host privileges grant on to 127.0.0.1 to avoid create instance failed when enable skip-name-resolve in config file. Change-Id: Ifa69461c8a55464f88aec001d067450eedccf172 Closes-bug: #1729225
This commit is contained in:
parent
249ec84f2e
commit
43c545ac84
|
@ -657,9 +657,9 @@ class BaseMySqlApp(object):
|
|||
with all privileges similar to the root user.
|
||||
"""
|
||||
LOG.debug("Creating Trove admin user '%s'.", ADMIN_USER_NAME)
|
||||
localhost = "localhost"
|
||||
host = "127.0.0.1"
|
||||
g = sql_query.Grant(permissions='ALL', user=ADMIN_USER_NAME,
|
||||
host=localhost, grant_option=True, clear=password)
|
||||
host=host, grant_option=True, clear=password)
|
||||
t = text(str(g))
|
||||
client.execute(t)
|
||||
LOG.debug("Trove admin user '%s' created.", ADMIN_USER_NAME)
|
||||
|
|
Loading…
Reference in New Issue