Run taskflow jobboard conductor conditionally
Run taskflow jobboard conductor only if amphorav2 provider is enabled. Fixes devstack plugin.sh conditions for amphorav2 provider. Change-Id: I49b587cf748996658859667485400307205d209bchanges/37/720237/1
parent
c9e1551550
commit
fb70e3b3c1
|
@ -280,7 +280,7 @@ function octavia_configure {
|
|||
iniset $OCTAVIA_CONF api_settings api_handler queue_producer
|
||||
|
||||
iniset $OCTAVIA_CONF database connection "mysql+pymysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:3306/octavia"
|
||||
if [[ ${OCTAVIA_ENABLE_AMPHORAV2_PROVIDER} = True ]]; then
|
||||
if [[ ${OCTAVIA_ENABLE_AMPHORAV2_PROVIDER} == True ]]; then
|
||||
iniset $OCTAVIA_CONF task_flow persistence_connection "mysql+pymysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:3306/octavia_persistence"
|
||||
fi
|
||||
# Configure keystone auth_token for all users
|
||||
|
@ -357,7 +357,7 @@ function octavia_configure {
|
|||
recreate_database_mysql octavia
|
||||
octavia-db-manage upgrade head
|
||||
|
||||
if [[ ${OCTAVIA_ENABLE_AMPHORAV2_PROVIDER} = True ]]; then
|
||||
if [[ ${OCTAVIA_ENABLE_AMPHORAV2_PROVIDER} == True ]]; then
|
||||
recreate_database_mysql octavia_persistence
|
||||
octavia-db-manage upgrade_persistence
|
||||
fi
|
||||
|
@ -368,7 +368,7 @@ function octavia_configure {
|
|||
fi
|
||||
|
||||
# amphorav2 required redis installation
|
||||
if [[ ${OCTAVIA_ENABLE_AMPHORAV2_PROVIDER} = True ]]; then
|
||||
if [[ ${OCTAVIA_ENABLE_AMPHORAV2_PROVIDER} == True ]]; then
|
||||
install_redis
|
||||
fi
|
||||
|
||||
|
@ -657,7 +657,7 @@ function octavia_cleanup {
|
|||
|
||||
sudo rm -rf $NOVA_STATE_PATH $NOVA_AUTH_CACHE_DIR
|
||||
|
||||
if [[ ${OCTAVIA_ENABLE_AMPHORAV2_PROVIDER} = True ]]; then
|
||||
if [[ ${OCTAVIA_ENABLE_AMPHORAV2_PROVIDER} == True ]]; then
|
||||
uninstall_redis
|
||||
fi
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
# under the License.
|
||||
|
||||
import cotyledon
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging as messaging
|
||||
from oslo_messaging.rpc import dispatcher
|
||||
|
@ -24,6 +25,8 @@ from octavia.controller.queue.v2 import endpoints
|
|||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class ConsumerService(cotyledon.Service):
|
||||
|
||||
|
@ -47,9 +50,11 @@ class ConsumerService(cotyledon.Service):
|
|||
access_policy=self.access_policy
|
||||
)
|
||||
self.message_listener.start()
|
||||
for e in self.endpoints:
|
||||
e.worker.services_controller.run_conductor(
|
||||
'octavia-task-flow-conductor-%s' % uuidutils.generate_uuid())
|
||||
if constants.AMPHORAV2 in CONF.api_settings.enabled_provider_drivers:
|
||||
for e in self.endpoints:
|
||||
e.worker.services_controller.run_conductor(
|
||||
'octavia-task-flow-conductor-%s' %
|
||||
uuidutils.generate_uuid())
|
||||
|
||||
def terminate(self):
|
||||
if self.message_listener:
|
||||
|
|
Loading…
Reference in New Issue