Browse Source

Merge "Adds job to run inspector in non-standalone mode"

tags/9.2.0
Zuul 5 months ago
parent
commit
514c1b536a
5 changed files with 47 additions and 2 deletions
  1. +24
    -2
      devstack/plugin.sh
  2. +1
    -0
      lower-constraints.txt
  3. +1
    -0
      test-requirements.txt
  4. +19
    -0
      zuul.d/ironic-inspector-jobs.yaml
  5. +2
    -0
      zuul.d/project.yaml

+ 24
- 2
devstack/plugin.sh 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
@@ -284,6 +300,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

+ 1
- 0
lower-constraints.txt 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

+ 1
- 0
test-requirements.txt 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

+ 19
- 0
zuul.d/ironic-inspector-jobs.yaml 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

+ 2
- 0
zuul.d/project.yaml 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

Loading…
Cancel
Save