Browse code

Merge "Separate start/stop control of Neutron L2 agent."

Jenkins authored on 2015/07/24 04:35:45
Showing 1 changed files
... ...
@@ -707,11 +707,10 @@ function start_neutron_service_and_check {
707 707
     fi
708 708
 }
709 709
 
710
-# Start running processes, including screen
711
-function start_neutron_agents {
712
-    # Start up the neutron agents if enabled
710
+# Control of the l2 agent is separated out to make it easier to test partial
711
+# upgrades (everything upgraded except the L2 agent)
712
+function start_neutron_l2_agent {
713 713
     run_process q-agt "python $AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE"
714
-    run_process q-dhcp "python $AGENT_DHCP_BINARY --config-file $NEUTRON_CONF --config-file=$Q_DHCP_CONF_FILE"
715 714
 
716 715
     if is_provider_network; then
717 716
         sudo ovs-vsctl --no-wait -- --may-exist add-port $OVS_PHYSICAL_BRIDGE $PUBLIC_INTERFACE
... ...
@@ -726,6 +725,10 @@ function start_neutron_agents {
726 726
             sudo ip route replace $FIXED_RANGE via $NETWORK_GATEWAY dev $OVS_PHYSICAL_BRIDGE
727 727
         fi
728 728
     fi
729
+}
730
+
731
+function start_neutron_other_agents {
732
+    run_process q-dhcp "python $AGENT_DHCP_BINARY --config-file $NEUTRON_CONF --config-file=$Q_DHCP_CONF_FILE"
729 733
 
730 734
     if is_service_enabled q-vpn; then
731 735
         run_process q-vpn "$AGENT_VPN_BINARY $(determine_config_files neutron-vpn-agent)"
... ...
@@ -749,8 +752,18 @@ function start_neutron_agents {
749 749
     fi
750 750
 }
751 751
 
752
-# stop_neutron() - Stop running processes (non-screen)
753
-function stop_neutron {
752
+# Start running processes, including screen
753
+function start_neutron_agents {
754
+    # Start up the neutron agents if enabled
755
+    start_neutron_l2_agent
756
+    start_neutron_other_agents
757
+}
758
+
759
+function stop_neutron_l2_agent {
760
+    stop_process q-agt
761
+}
762
+
763
+function stop_neutron_other {
754 764
     if is_service_enabled q-dhcp; then
755 765
         stop_process q-dhcp
756 766
         pid=$(ps aux | awk '/[d]nsmasq.+interface=(tap|ns-)/ { print $2 }')
... ...
@@ -765,8 +778,6 @@ function stop_neutron {
765 765
         stop_process q-meta
766 766
     fi
767 767
 
768
-    stop_process q-agt
769
-
770 768
     if is_service_enabled q-lbaas; then
771 769
         neutron_lbaas_stop
772 770
     fi
... ...
@@ -781,6 +792,12 @@ function stop_neutron {
781 781
     fi
782 782
 }
783 783
 
784
+# stop_neutron() - Stop running processes (non-screen)
785
+function stop_neutron {
786
+    stop_neutron_other
787
+    stop_neutron_l2_agent
788
+}
789
+
784 790
 # _move_neutron_addresses_route() - Move the primary IP to the OVS bridge
785 791
 # on startup, or back to the public interface on cleanup
786 792
 function _move_neutron_addresses_route {