[Upgrade] Reuse OVS workaround in docker neutron ovs agent

In puppet neutron ovs agent we apply workaround which we forgot
to reuse in the docker service definition.

Resolves: rhbz#1536142
Closes-Bug: #1744126

Change-Id: If3a63cad754a875f56b604033c1aff498243140c
This commit is contained in:
Lukas Bezdicka 2018-02-07 23:08:40 +01:00
parent 4bef5bd4e4
commit a1c479f93c
2 changed files with 30 additions and 20 deletions

View File

@ -151,23 +151,32 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [NeutronLogging, host_prep_tasks]}
upgrade_tasks:
- name: Check if neutron_ovs_agent is deployed
command: systemctl is-enabled --quiet neutron-openvswitch-agent
tags: common
ignore_errors: True
register: neutron_ovs_agent_enabled
- name: "PreUpgrade step0,validation: Check service neutron-openvswitch-agent is running"
command: systemctl is-active --quiet neutron-openvswitch-agent
when: (neutron_ovs_agent_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable neutron_ovs_agent service
when: (neutron_ovs_agent_enabled.rc == 0) and (step|int == 2)
service: name=neutron-openvswitch-agent state=stopped enabled=no
- name: Set fact for removal of openstack-neutron-openvswitch package
when: step|int == 2
set_fact:
remove_neutron_openvswitch_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-neutron-openvswitch package if operator requests it
yum: name=openstack-neutron-openvswitch state=removed
ignore_errors: True
when: (remove_neutron_openvswitch_package|bool) and (step|int == 2)
list_concat:
- get_attr: [NeutronOvsAgentBase, role_data, ovs_upgrade_tasks]
-
- name: Check if neutron_ovs_agent is deployed
command: systemctl is-enabled --quiet neutron-openvswitch-agent
tags: common
ignore_errors: True
register: neutron_ovs_agent_enabled
- name: "PreUpgrade step0,validation: Check service neutron-openvswitch-agent is running"
command: systemctl is-active --quiet neutron-openvswitch-agent
when:
- step|int == 0
- neutron_ovs_agent_enabled.rc == 0
tags: validation
- name: Stop and disable neutron_ovs_agent service
when:
- step|int == 2
- neutron_ovs_agent_enabled.rc == 0
service: name=neutron-openvswitch-agent state=stopped enabled=no
- name: Set fact for removal of openstack-neutron-openvswitch package
when: step|int == 2
set_fact:
remove_neutron_openvswitch_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-neutron-openvswitch package if operator requests it
yum: name=openstack-neutron-openvswitch state=removed
ignore_errors: True
when:
- step|int == 2
- remove_neutron_openvswitch_package|bool

View File

@ -127,6 +127,7 @@ outputs:
description: Role data for the Neutron OVS agent service.
value:
service_name: neutron_ovs_agent
ovs_upgrade_tasks: {get_attr: [Ovs, role_data, upgrade_tasks]}
monitoring_subscription: {get_param: MonitoringSubscriptionNeutronOvs}
logging_source: {get_param: NeutronOpenVswitchAgentLoggingSource}
logging_groups: