Check for a different version of LBaaS agent before stop
This patch fixes the task which tries to stop neutron-lbaas-agent. When the neutron-lbaas-agent is not installed the task fails. Added tasks to check if there is a different version of the neutron LBaaS agent service configured before tring to stop it. Change-Id: I0ae17303903f8eb7909638f6217fe94a9fd9bb6b Closes-Bug: #1555256
This commit is contained in:
parent
ba11de3626
commit
c464e3b64b
@ -20,16 +20,30 @@
|
|||||||
#
|
#
|
||||||
# These tasks will ensure that the correct agent is the only one running.
|
# These tasks will ensure that the correct agent is the only one running.
|
||||||
|
|
||||||
|
- name: Check if LBaaS agent v1 upstart script exists when v2 is in neutron_plugins_base
|
||||||
|
stat: path=/etc/init/neutron-lbaas-agent.conf
|
||||||
|
register: neutron_lbaas_upstart
|
||||||
|
when: neutron_lbaasv2 | bool
|
||||||
|
|
||||||
|
- name: Check if LBaaS agent v2 upstart script exists when v1 is in neutron_plugins_base
|
||||||
|
stat: path=/etc/init/neutron-lbaasv2-agent.conf
|
||||||
|
register: neutron_lbaasv2_upstart
|
||||||
|
when: neutron_lbaas | bool
|
||||||
|
|
||||||
- name: Ensure LBaaS v1 agent is stopped when v2 is in neutron_plugins_base
|
- name: Ensure LBaaS v1 agent is stopped when v2 is in neutron_plugins_base
|
||||||
service:
|
service:
|
||||||
name: neutron-lbaas-agent
|
name: neutron-lbaas-agent
|
||||||
enabled: no
|
enabled: no
|
||||||
state: stopped
|
state: stopped
|
||||||
when: neutron_lbaasv2 | bool
|
when:
|
||||||
|
- neutron_lbaasv2 | bool
|
||||||
|
- neutron_lbaas_upstart.stat.exists
|
||||||
|
|
||||||
- name: Ensure LBaaS v2 agent is stopped when v1 is in neutron_plugins_base
|
- name: Ensure LBaaS v2 agent is stopped when v1 is in neutron_plugins_base
|
||||||
service:
|
service:
|
||||||
name: neutron-lbaasv2-agent
|
name: neutron-lbaasv2-agent
|
||||||
enabled: no
|
enabled: no
|
||||||
state: stopped
|
state: stopped
|
||||||
when: neutron_lbaas | bool
|
when:
|
||||||
|
- neutron_lbaas | bool
|
||||||
|
- neutron_lbaasv2_upstart.stat.exists
|
||||||
|
Loading…
Reference in New Issue
Block a user