Adds job to run inspector in non-standalone mode

The job uses memcached for coordination backend, etcd3gw still has issue
on retrieving members.

Story: 2001842
Task: 30376

Change-Id: I76c359d6835e435968cbfb1a3f4318e73f0203ec
This commit is contained in:
Kaifeng Wang 2019-08-07 13:39:57 +08:00
parent 293b0c7c15
commit 9b92204ef1
5 changed files with 47 additions and 2 deletions

View File

@ -8,15 +8,20 @@ IRONIC_INSPECTOR_DIR=$DEST/ironic-inspector
IRONIC_INSPECTOR_DATA_DIR=$DATA_DIR/ironic-inspector
IRONIC_INSPECTOR_BIN_DIR=$(get_python_exec_prefix)
IRONIC_INSPECTOR_BIN_FILE=$IRONIC_INSPECTOR_BIN_DIR/ironic-inspector
IRONIC_INSPECTOR_BIN_FILE_API=$IRONIC_INSPECTOR_BIN_DIR/ironic-inspector-api-wsgi
IRONIC_INSPECTOR_BIN_FILE_CONDUCTOR=$IRONIC_INSPECTOR_BIN_DIR/ironic-inspector-conductor
IRONIC_INSPECTOR_DBSYNC_BIN_FILE=$IRONIC_INSPECTOR_BIN_DIR/ironic-inspector-dbsync
IRONIC_INSPECTOR_CONF_DIR=${IRONIC_INSPECTOR_CONF_DIR:-/etc/ironic-inspector}
IRONIC_INSPECTOR_CONF_FILE=$IRONIC_INSPECTOR_CONF_DIR/inspector.conf
IRONIC_INSPECTOR_CMD="$IRONIC_INSPECTOR_BIN_FILE --config-file $IRONIC_INSPECTOR_CONF_FILE"
IRONIC_INSPECTOR_CMD_API="$IRONIC_INSPECTOR_BIN_FILE_API -p 5050 -- --config-file $IRONIC_INSPECTOR_CONF_FILE"
IRONIC_INSPECTOR_CMD_CONDUCTOR="$IRONIC_INSPECTOR_BIN_FILE_CONDUCTOR --config-file $IRONIC_INSPECTOR_CONF_FILE"
IRONIC_INSPECTOR_DHCP_CONF_FILE=$IRONIC_INSPECTOR_CONF_DIR/dnsmasq.conf
IRONIC_INSPECTOR_ROOTWRAP_CONF_FILE=$IRONIC_INSPECTOR_CONF_DIR/rootwrap.conf
IRONIC_INSPECTOR_ADMIN_USER=${IRONIC_INSPECTOR_ADMIN_USER:-ironic-inspector}
IRONIC_INSPECTOR_AUTH_CACHE_DIR=${IRONIC_INSPECTOR_AUTH_CACHE_DIR:-/var/cache/ironic-inspector}
IRONIC_INSPECTOR_DHCP_FILTER=${IRONIC_INSPECTOR_DHCP_FILTER:-iptables}
IRONIC_INSPECTOR_STANDALONE=${IRONIC_INSPECTOR_STANDALONE:-True}
if [[ -n ${IRONIC_INSPECTOR_MANAGE_FIREWALL} ]] ; then
echo "IRONIC_INSPECTOR_MANAGE_FIREWALL is deprecated." >&2
echo "Please, use IRONIC_INSPECTOR_DHCP_FILTER == noop/iptables/dnsmasq instead." >&2
@ -118,7 +123,12 @@ function install_inspector_client {
}
function start_inspector {
run_process ironic-inspector "$IRONIC_INSPECTOR_CMD"
if [[ "$IRONIC_INSPECTOR_STANDALONE" == "True" ]]; then
run_process ironic-inspector "$IRONIC_INSPECTOR_CMD"
else
run_process ironic-inspector-api "$IRONIC_INSPECTOR_CMD_API"
run_process ironic-inspector-conductor "$IRONIC_INSPECTOR_CMD_CONDUCTOR"
fi
}
function is_inspector_dhcp_required {
@ -134,7 +144,12 @@ function start_inspector_dhcp {
}
function stop_inspector {
stop_process ironic-inspector
if [[ "$IRONIC_INSPECTOR_STANDALONE" == "True" ]]; then
stop_process ironic-inspector
else
stop_process ironic-inspector-api
stop_process ironic-inspector-conductor
fi
}
function stop_inspector_dhcp {
@ -265,6 +280,7 @@ function configure_inspector {
rm -f "$IRONIC_INSPECTOR_CONF_FILE"
inspector_iniset DEFAULT debug $IRONIC_INSPECTOR_DEBUG
inspector_iniset DEFAULT standalone $IRONIC_INSPECTOR_STANDALONE
inspector_configure_auth_for ironic
inspector_configure_auth_for service_catalog
configure_auth_token_middleware $IRONIC_INSPECTOR_CONF_FILE $IRONIC_INSPECTOR_ADMIN_USER $IRONIC_INSPECTOR_AUTH_CACHE_DIR/api
@ -280,6 +296,12 @@ function configure_inspector {
iniset_rpc_backend ironic-inspector $IRONIC_INSPECTOR_CONF_FILE
if [[ "$IRONIC_INSPECTOR_STANDALONE" == "False" ]]; then
# memcached listens localhost instead of $SERVICE_HOST, which is exactly the default value,
# but set explicitly in case that changed.
inspector_iniset coordination backend_url "memcached://localhost:11211"
fi
if is_service_enabled swift; then
configure_inspector_swift
fi

View File

@ -89,6 +89,7 @@ pycodestyle==2.3.1
pyflakes==0.8.1
Pygments==2.2.0
pyinotify==0.9.6
pymemcache==1.2.9
pyparsing==2.2.0
pyperclip==1.6.0
python-dateutil==2.7.0

View File

@ -11,6 +11,7 @@ sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0
pymemcache!=1.3.0,>=1.2.9 # Apache 2.0 License
stestr>=1.0.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD

View File

@ -49,6 +49,25 @@
devstack_localrc:
USE_PYTHON3: True
- job:
name: ironic-inspector-non-standalone-tempest-python3
description: Execute python3 tempest tests for ironic-inspector running in non-standalone mode
parent: ironic-inspector-base
vars:
devstack_localrc:
USE_PYTHON3: True
IRONIC_INSPECTOR_STANDALONE: False
devstack_services:
s-account: True
s-container: True
s-object: True
s-proxy: True
ir-api: True
ir-cond: True
ironic-inspector-api: True
ironic-inspector-conductor: True
ironic-inspector-dhcp: True
- job:
name: ironic-inspector-tempest-discovery
description: ironic-inspector-tempest-discovery

View File

@ -13,6 +13,7 @@
- ironic-inspector-tempest
- ironic-inspector-tempest-discovery
- ironic-inspector-tempest-python3
- ironic-inspector-non-standalone-tempest-python3
- openstack-tox-functional
- openstack-tox-functional-py36
- bifrost-integration-tinyipa-ubuntu-xenial
@ -25,6 +26,7 @@
- ironic-inspector-tempest
- ironic-inspector-tempest-discovery
- ironic-inspector-tempest-python3
- ironic-inspector-non-standalone-tempest-python3
- openstack-tox-functional
- openstack-tox-functional-py36
- bifrost-integration-tinyipa-ubuntu-xenial