mirror of
https://github.com/clearlinux/clearstack.git
synced 2026-06-15 18:46:35 +00:00
Do not translate ip address to hostname
- Sometimes when translating ip address to hostname, the hostnames do not resolve back to the original ip.
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
import socket
|
||||
|
||||
from modules.keystone import Keystone
|
||||
from modules.openstack import OpenStackService
|
||||
from modules.conf import CONF
|
||||
@@ -39,7 +37,7 @@ class Ceilometer(OpenStackService):
|
||||
|
||||
def config_database(self, configfile):
|
||||
dbpass = CONF['CONFIG_%s_DB_PW' % self._name.upper()]
|
||||
dbhost = socket.gethostbyaddr(CONF['CONFIG_MONGODB_HOST'])[0]
|
||||
dbhost = CONF['CONFIG_MONGODB_HOST']
|
||||
config = ("[database]\n"
|
||||
"connection=mongodb://{0}:{1}@{2}:27017/{0}"
|
||||
.format(self._name, dbpass, dbhost))
|
||||
|
||||
@@ -89,7 +89,7 @@ class MariaDB:
|
||||
" the password is incorrect")
|
||||
return sys.exit(1)
|
||||
|
||||
def setup_database(self, database, user, password, host):
|
||||
def setup_database(self, database, user, password):
|
||||
LOG.debug("setting up database")
|
||||
mariadb_user = CONF["CONFIG_MARIADB_USER"]
|
||||
mariadb_pw = CONF["CONFIG_MARIADB_PW"]
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
import socket
|
||||
|
||||
from common import util
|
||||
from common.swupd import Client as swupd_client
|
||||
from common.util import LOG
|
||||
@@ -33,7 +31,7 @@ class OpenStackService:
|
||||
_admin_url = ""
|
||||
_region = ""
|
||||
_user = ""
|
||||
_controller = socket.gethostbyaddr(CONF["CONFIG_CONTROLLER_HOST"])[0]
|
||||
_controller = CONF["CONFIG_CONTROLLER_HOST"]
|
||||
_password = ""
|
||||
|
||||
def __init__(self):
|
||||
@@ -160,14 +158,14 @@ class OpenStackService:
|
||||
|
||||
def config_database(self, configfile):
|
||||
dbpass = CONF['CONFIG_%s_DB_PW' % self._name.upper()]
|
||||
dbhost = socket.gethostbyaddr(CONF['CONFIG_MARIADB_HOST'])[0]
|
||||
dbhost = CONF['CONFIG_MARIADB_HOST']
|
||||
config = ("[database]\n"
|
||||
"connection=mysql://{0}:{1}@{2}/{0}"
|
||||
.format(self._name, dbpass, dbhost))
|
||||
util.write_config(configfile, config)
|
||||
|
||||
def config_rabbitmq(self, configfile):
|
||||
rabbit_host = socket.gethostbyaddr(CONF['CONFIG_AMQP_HOST'])[0]
|
||||
rabbit_host = CONF['CONFIG_AMQP_HOST']
|
||||
rabbit_password = CONF['CONFIG_AMQP_AUTH_PASSWORD']
|
||||
rabbit_user = CONF['CONFIG_AMQP_AUTH_USER']
|
||||
config = \
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
import socket
|
||||
|
||||
from common.util import LOG
|
||||
from common import util
|
||||
from modules.conf import CONF
|
||||
@@ -28,7 +26,6 @@ conf = CONF
|
||||
mariadb = MariaDB.get()
|
||||
mariadb_user = CONF["CONFIG_MARIADB_USER"]
|
||||
mariadb_pw = CONF["CONFIG_MARIADB_PW"]
|
||||
controller = socket.gethostbyaddr(CONF["CONFIG_CONTROLLER_HOST"])[0]
|
||||
|
||||
if util.str2bool(conf['CONFIG_MARIADB_INSTALL']):
|
||||
mariadb.install()
|
||||
@@ -43,4 +40,4 @@ for database in databases:
|
||||
% database.upper()]):
|
||||
LOG.info("Setting up mariadb for %s" % database)
|
||||
password = CONF['CONFIG_%s_DB_PW' % database.upper()]
|
||||
mariadb.setup_database(database, database, password, controller)
|
||||
mariadb.setup_database(database, database, password)
|
||||
|
||||
Reference in New Issue
Block a user