Browse code

Fix Neutron enabled check

* Remove the check for neutron enabled on a block of variable settings, there
is no conflict and serves no purpose.
* Also floating_ips.sh and volume.sh needed to properly source lib/neutron
for do ping_check() to work properly.

The current error in check-devstack-dsvm-neutron is not related to this fix.

Change-Id: I1c458aaa787ffb98c945aefc3afa80c6861a405f

Dean Troyer authored on 2014/02/27 08:35:37
Showing 3 changed files
... ...
@@ -27,12 +27,12 @@ TOP_DIR=$(cd $EXERCISE_DIR/..; pwd)
27 27
 # Import common functions
28 28
 source $TOP_DIR/functions
29 29
 
30
-# Import project functions
31
-source $TOP_DIR/lib/neutron
32
-
33 30
 # Import configuration
34 31
 source $TOP_DIR/openrc
35 32
 
33
+# Import project functions
34
+source $TOP_DIR/lib/neutron
35
+
36 36
 # Import exercise configuration
37 37
 source $TOP_DIR/exerciserc
38 38
 
... ...
@@ -27,12 +27,13 @@ TOP_DIR=$(cd $EXERCISE_DIR/..; pwd)
27 27
 # Import common functions
28 28
 source $TOP_DIR/functions
29 29
 
30
-# Import project functions
31
-source $TOP_DIR/lib/cinder
32
-
33 30
 # Import configuration
34 31
 source $TOP_DIR/openrc
35 32
 
33
+# Import project functions
34
+source $TOP_DIR/lib/cinder
35
+source $TOP_DIR/lib/neutron
36
+
36 37
 # Import exercise configuration
37 38
 source $TOP_DIR/exerciserc
38 39
 
... ...
@@ -59,10 +59,6 @@
59 59
 # LinuxBridge plugin, please see the top level README file under the
60 60
 # Neutron section.
61 61
 
62
-# Save trace setting
63
-XTRACE=$(set +o | grep xtrace)
64
-set +o xtrace
65
-
66 62
 
67 63
 # Neutron Network Configuration
68 64
 # -----------------------------
... ...
@@ -127,82 +123,81 @@ Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-False}
127 127
 # See _configure_neutron_common() for details about setting it up
128 128
 declare -a Q_PLUGIN_EXTRA_CONF_FILES
129 129
 
130
-if is_service_enabled neutron; then
131
-    Q_RR_CONF_FILE=$NEUTRON_CONF_DIR/rootwrap.conf
132
-    if [[ "$Q_USE_ROOTWRAP" == "False" ]]; then
133
-        Q_RR_COMMAND="sudo"
134
-    else
135
-        NEUTRON_ROOTWRAP=$(get_rootwrap_location neutron)
136
-        Q_RR_COMMAND="sudo $NEUTRON_ROOTWRAP $Q_RR_CONF_FILE"
137
-    fi
138
-
139
-    # Provider Network Configurations
140
-    # --------------------------------
141
-
142
-    # The following variables control the Neutron openvswitch and
143
-    # linuxbridge plugins' allocation of tenant networks and
144
-    # availability of provider networks. If these are not configured
145
-    # in ``localrc``, tenant networks will be local to the host (with no
146
-    # remote connectivity), and no physical resources will be
147
-    # available for the allocation of provider networks.
148
-
149
-    # To use GRE tunnels for tenant networks, set to True in
150
-    # ``localrc``. GRE tunnels are only supported by the openvswitch
151
-    # plugin, and currently only on Ubuntu.
152
-    ENABLE_TENANT_TUNNELS=${ENABLE_TENANT_TUNNELS:-False}
153
-
154
-    # If using GRE tunnels for tenant networks, specify the range of
155
-    # tunnel IDs from which tenant networks are allocated. Can be
156
-    # overriden in ``localrc`` in necesssary.
157
-    TENANT_TUNNEL_RANGES=${TENANT_TUNNEL_RANGE:-1:1000}
158
-
159
-    # To use VLANs for tenant networks, set to True in localrc. VLANs
160
-    # are supported by the openvswitch and linuxbridge plugins, each
161
-    # requiring additional configuration described below.
162
-    ENABLE_TENANT_VLANS=${ENABLE_TENANT_VLANS:-False}
163
-
164
-    # If using VLANs for tenant networks, set in ``localrc`` to specify
165
-    # the range of VLAN VIDs from which tenant networks are
166
-    # allocated. An external network switch must be configured to
167
-    # trunk these VLANs between hosts for multi-host connectivity.
168
-    #
169
-    # Example: ``TENANT_VLAN_RANGE=1000:1999``
170
-    TENANT_VLAN_RANGE=${TENANT_VLAN_RANGE:-}
171
-
172
-    # If using VLANs for tenant networks, or if using flat or VLAN
173
-    # provider networks, set in ``localrc`` to the name of the physical
174
-    # network, and also configure ``OVS_PHYSICAL_BRIDGE`` for the
175
-    # openvswitch agent or ``LB_PHYSICAL_INTERFACE`` for the linuxbridge
176
-    # agent, as described below.
177
-    #
178
-    # Example: ``PHYSICAL_NETWORK=default``
179
-    PHYSICAL_NETWORK=${PHYSICAL_NETWORK:-}
180
-
181
-    # With the openvswitch plugin, if using VLANs for tenant networks,
182
-    # or if using flat or VLAN provider networks, set in ``localrc`` to
183
-    # the name of the OVS bridge to use for the physical network. The
184
-    # bridge will be created if it does not already exist, but a
185
-    # physical interface must be manually added to the bridge as a
186
-    # port for external connectivity.
187
-    #
188
-    # Example: ``OVS_PHYSICAL_BRIDGE=br-eth1``
189
-    OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-}
190
-
191
-    # With the linuxbridge plugin, if using VLANs for tenant networks,
192
-    # or if using flat or VLAN provider networks, set in ``localrc`` to
193
-    # the name of the network interface to use for the physical
194
-    # network.
195
-    #
196
-    # Example: ``LB_PHYSICAL_INTERFACE=eth1``
197
-    LB_PHYSICAL_INTERFACE=${LB_PHYSICAL_INTERFACE:-}
198 130
 
199
-    # With the openvswitch plugin, set to True in ``localrc`` to enable
200
-    # provider GRE tunnels when ``ENABLE_TENANT_TUNNELS`` is False.
201
-    #
202
-    # Example: ``OVS_ENABLE_TUNNELING=True``
203
-    OVS_ENABLE_TUNNELING=${OVS_ENABLE_TUNNELING:-$ENABLE_TENANT_TUNNELS}
131
+Q_RR_CONF_FILE=$NEUTRON_CONF_DIR/rootwrap.conf
132
+if [[ "$Q_USE_ROOTWRAP" == "False" ]]; then
133
+    Q_RR_COMMAND="sudo"
134
+else
135
+    NEUTRON_ROOTWRAP=$(get_rootwrap_location neutron)
136
+    Q_RR_COMMAND="sudo $NEUTRON_ROOTWRAP $Q_RR_CONF_FILE"
204 137
 fi
205 138
 
139
+# Provider Network Configurations
140
+# --------------------------------
141
+
142
+# The following variables control the Neutron openvswitch and
143
+# linuxbridge plugins' allocation of tenant networks and
144
+# availability of provider networks. If these are not configured
145
+# in ``localrc``, tenant networks will be local to the host (with no
146
+# remote connectivity), and no physical resources will be
147
+# available for the allocation of provider networks.
148
+
149
+# To use GRE tunnels for tenant networks, set to True in
150
+# ``localrc``. GRE tunnels are only supported by the openvswitch
151
+# plugin, and currently only on Ubuntu.
152
+ENABLE_TENANT_TUNNELS=${ENABLE_TENANT_TUNNELS:-False}
153
+
154
+# If using GRE tunnels for tenant networks, specify the range of
155
+# tunnel IDs from which tenant networks are allocated. Can be
156
+# overriden in ``localrc`` in necesssary.
157
+TENANT_TUNNEL_RANGES=${TENANT_TUNNEL_RANGE:-1:1000}
158
+
159
+# To use VLANs for tenant networks, set to True in localrc. VLANs
160
+# are supported by the openvswitch and linuxbridge plugins, each
161
+# requiring additional configuration described below.
162
+ENABLE_TENANT_VLANS=${ENABLE_TENANT_VLANS:-False}
163
+
164
+# If using VLANs for tenant networks, set in ``localrc`` to specify
165
+# the range of VLAN VIDs from which tenant networks are
166
+# allocated. An external network switch must be configured to
167
+# trunk these VLANs between hosts for multi-host connectivity.
168
+#
169
+# Example: ``TENANT_VLAN_RANGE=1000:1999``
170
+TENANT_VLAN_RANGE=${TENANT_VLAN_RANGE:-}
171
+
172
+# If using VLANs for tenant networks, or if using flat or VLAN
173
+# provider networks, set in ``localrc`` to the name of the physical
174
+# network, and also configure ``OVS_PHYSICAL_BRIDGE`` for the
175
+# openvswitch agent or ``LB_PHYSICAL_INTERFACE`` for the linuxbridge
176
+# agent, as described below.
177
+#
178
+# Example: ``PHYSICAL_NETWORK=default``
179
+PHYSICAL_NETWORK=${PHYSICAL_NETWORK:-}
180
+
181
+# With the openvswitch plugin, if using VLANs for tenant networks,
182
+# or if using flat or VLAN provider networks, set in ``localrc`` to
183
+# the name of the OVS bridge to use for the physical network. The
184
+# bridge will be created if it does not already exist, but a
185
+# physical interface must be manually added to the bridge as a
186
+# port for external connectivity.
187
+#
188
+# Example: ``OVS_PHYSICAL_BRIDGE=br-eth1``
189
+OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-}
190
+
191
+# With the linuxbridge plugin, if using VLANs for tenant networks,
192
+# or if using flat or VLAN provider networks, set in ``localrc`` to
193
+# the name of the network interface to use for the physical
194
+# network.
195
+#
196
+# Example: ``LB_PHYSICAL_INTERFACE=eth1``
197
+LB_PHYSICAL_INTERFACE=${LB_PHYSICAL_INTERFACE:-}
198
+
199
+# With the openvswitch plugin, set to True in ``localrc`` to enable
200
+# provider GRE tunnels when ``ENABLE_TENANT_TUNNELS`` is False.
201
+#
202
+# Example: ``OVS_ENABLE_TUNNELING=True``
203
+OVS_ENABLE_TUNNELING=${OVS_ENABLE_TUNNELING:-$ENABLE_TENANT_TUNNELS}
204
+
206 205
 # Neutron plugin specific functions
207 206
 # ---------------------------------
208 207
 
... ...
@@ -241,6 +236,11 @@ fi
241 241
 TEMPEST_SERVICES+=,neutron
242 242
 
243 243
 
244
+# Save trace setting
245
+XTRACE=$(set +o | grep xtrace)
246
+set +o xtrace
247
+
248
+
244 249
 # Functions
245 250
 # ---------
246 251