Add sanity check framework to verify neutron server/backend integration
Some Neutron plugins require controllers and multiple backend services
to operate correctly. This patch adds the framework for third party
plugins to run sanity checks after Neutron Server has started.
This simple addition may reveal potential configuration pitfalls
much earlier in the dev/test cycle, thus speeding up the build
churn process.
The first plugin that uses this framework is the VMware NSX one.
Closes-bug: #1265671
Change-Id: I17f9c5c8e828316ff03f0eff42ae4ae6c6c58733
diff --git a/lib/neutron b/lib/neutron
index 43f43f9..81faa10 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -958,6 +958,11 @@
_neutron_third_party_do stop
}
+# check_neutron_third_party_integration() - Check that third party integration is sane
+function check_neutron_third_party_integration() {
+ _neutron_third_party_do check
+}
+
# Restore xtrace
$XTRACE
diff --git a/lib/neutron_thirdparty/README.md b/lib/neutron_thirdparty/README.md
index b289f58..2460e5c 100644
--- a/lib/neutron_thirdparty/README.md
+++ b/lib/neutron_thirdparty/README.md
@@ -34,3 +34,6 @@
* ``stop_<third_party>``:
stop running processes (non-screen)
+
+* ``check_<third_party>``:
+ verify that the integration between neutron server and third-party components is sane
diff --git a/lib/neutron_thirdparty/bigswitch_floodlight b/lib/neutron_thirdparty/bigswitch_floodlight
index ebde067..1fd4fd8 100644
--- a/lib/neutron_thirdparty/bigswitch_floodlight
+++ b/lib/neutron_thirdparty/bigswitch_floodlight
@@ -45,5 +45,9 @@
:
}
+function check_bigswitch_floodlight() {
+ :
+}
+
# Restore xtrace
$MY_XTRACE
diff --git a/lib/neutron_thirdparty/midonet b/lib/neutron_thirdparty/midonet
index 7928bca..e672528 100644
--- a/lib/neutron_thirdparty/midonet
+++ b/lib/neutron_thirdparty/midonet
@@ -56,5 +56,9 @@
:
}
+function check_midonet() {
+ :
+}
+
# Restore xtrace
$MY_XTRACE
diff --git a/lib/neutron_thirdparty/ryu b/lib/neutron_thirdparty/ryu
index 3b825a1..5edf273 100644
--- a/lib/neutron_thirdparty/ryu
+++ b/lib/neutron_thirdparty/ryu
@@ -75,5 +75,9 @@
:
}
+function check_ryu() {
+ :
+}
+
# Restore xtrace
$MY_XTRACE
diff --git a/lib/neutron_thirdparty/trema b/lib/neutron_thirdparty/trema
index bdc2356..2b12564 100644
--- a/lib/neutron_thirdparty/trema
+++ b/lib/neutron_thirdparty/trema
@@ -109,5 +109,9 @@
sudo TREMA_TMP=$TREMA_TMP_DIR trema killall
}
+function check_trema() {
+ :
+}
+
# Restore xtrace
$MY_XTRACE
diff --git a/lib/neutron_thirdparty/vmware_nsx b/lib/neutron_thirdparty/vmware_nsx
index 70d3482..7c62027 100644
--- a/lib/neutron_thirdparty/vmware_nsx
+++ b/lib/neutron_thirdparty/vmware_nsx
@@ -78,5 +78,9 @@
done
}
+function check_vmware_nsx() {
+ :
+}
+
# Restore xtrace
$MY_XTRACE
diff --git a/stack.sh b/stack.sh
index 7da41a9..621a058 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1116,6 +1116,7 @@
if is_service_enabled q-svc; then
echo_summary "Starting Neutron"
start_neutron_service_and_check
+ check_neutron_third_party_integration
elif is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-net; then
NM_CONF=${NOVA_CONF}
if is_service_enabled n-cell; then