Music host/port configuration issue

Engine was not passing the configured host/port combination
into the appropriate classes. This change corrects the problem.
Fix permissions issue with /var/log/valet dir
Set permissions so that valet-engine can create the engine.log file

Change-Id: Ib79c01faf9009031c87a6f59f1b8818afcfc824e
This commit is contained in:
Cliff Parsons 2017-03-16 11:11:15 -05:00 committed by Omar Rivera
parent ce1282b192
commit dbda429146
2 changed files with 8 additions and 5 deletions

View File

@ -38,10 +38,10 @@ class MusicHandler(object):
self.config = _config
self.logger = _logger
self.music = Music(hosts=self.config.db_hosts, replication_factor=self.config.replication_factor)
if self.config.db_hosts is not None and len(self.config.db_hosts) > 0:
for dbh in self.config.db_hosts:
self.logger.info("DB: music host = " + dbh)
self.music = Music(host=self.config.db_host, port=self.config.db_port,
replication_factor=self.config.replication_factor)
if self.config.db_host is not None:
self.logger.info("DB: music host = " + self.config.db_host)
if self.config.replication_factor is not None:
self.logger.info("DB: music replication factor = " + str(self.config.replication_factor))

View File

@ -52,7 +52,8 @@ class Config(object):
self.db_app_table = None
self.db_uuid_table = None
self.replication_factor = 3
self.db_hosts = []
self.db_host = 'localhost'
self.db_port = 8080
self.ip = None
@ -202,6 +203,8 @@ class Config(object):
self.db_host = CONF.music.host
self.db_port = CONF.music.port
self.ip = CONF.engine.ip
self.num_of_region_chars = CONF.engine.num_of_region_chars