From ef1e08022b9553b07757005e7a5103fbdc0d99f0 Mon Sep 17 00:00:00 2001 From: armando-migliaccio Date: Thu, 2 Jan 2014 16:33:53 -0800 Subject: [PATCH] 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 --- lib/neutron | 5 +++++ lib/neutron_thirdparty/README.md | 3 +++ lib/neutron_thirdparty/bigswitch_floodlight | 4 ++++ lib/neutron_thirdparty/midonet | 4 ++++ lib/neutron_thirdparty/ryu | 4 ++++ lib/neutron_thirdparty/trema | 4 ++++ lib/neutron_thirdparty/vmware_nsx | 4 ++++ stack.sh | 1 + 8 files changed, 29 insertions(+) diff --git a/lib/neutron b/lib/neutron index 43f43f951a..81faa103b5 100644 --- a/lib/neutron +++ b/lib/neutron @@ -958,6 +958,11 @@ function stop_neutron_third_party() { _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 b289f58c5d..2460e5cac7 100644 --- a/lib/neutron_thirdparty/README.md +++ b/lib/neutron_thirdparty/README.md @@ -34,3 +34,6 @@ functions to be implemented * ``stop_``: stop running processes (non-screen) + +* ``check_``: + 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 ebde0673b8..1fd4fd801a 100644 --- a/lib/neutron_thirdparty/bigswitch_floodlight +++ b/lib/neutron_thirdparty/bigswitch_floodlight @@ -45,5 +45,9 @@ function stop_bigswitch_floodlight() { : } +function check_bigswitch_floodlight() { + : +} + # Restore xtrace $MY_XTRACE diff --git a/lib/neutron_thirdparty/midonet b/lib/neutron_thirdparty/midonet index 7928bca31f..e672528a2d 100644 --- a/lib/neutron_thirdparty/midonet +++ b/lib/neutron_thirdparty/midonet @@ -56,5 +56,9 @@ function stop_midonet() { : } +function check_midonet() { + : +} + # Restore xtrace $MY_XTRACE diff --git a/lib/neutron_thirdparty/ryu b/lib/neutron_thirdparty/ryu index 3b825a10c1..5edf273361 100644 --- a/lib/neutron_thirdparty/ryu +++ b/lib/neutron_thirdparty/ryu @@ -75,5 +75,9 @@ function stop_ryu() { : } +function check_ryu() { + : +} + # Restore xtrace $MY_XTRACE diff --git a/lib/neutron_thirdparty/trema b/lib/neutron_thirdparty/trema index bdc23568fb..2b125646dc 100644 --- a/lib/neutron_thirdparty/trema +++ b/lib/neutron_thirdparty/trema @@ -109,5 +109,9 @@ function stop_trema() { 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 70d348274f..7c6202723f 100644 --- a/lib/neutron_thirdparty/vmware_nsx +++ b/lib/neutron_thirdparty/vmware_nsx @@ -78,5 +78,9 @@ function stop_vmware_nsx() { done } +function check_vmware_nsx() { + : +} + # Restore xtrace $MY_XTRACE diff --git a/stack.sh b/stack.sh index 7da41a98c8..621a058444 100755 --- a/stack.sh +++ b/stack.sh @@ -1116,6 +1116,7 @@ fi 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