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