tripleo-heat-templates/puppet/services/opendaylight-ovs.yaml
Mathieu Bultel d3f47eb0b9 Add manual ovs upgrade script for workaround ovs upgrade issue
When we upgrade OVS from 2.5 to 2.6, the postrun package update
restart the services and drop the connectivity
We need to push this manual upgrade script and executed to the
nodes for newton to ocata

The special case is needed for 2.5.0-14 specifically see related
bug for more info (or, older where the postun tries restart).
See related review at [1] for the minor update/manual upgrade.

Related-Bug: 1669714
Depends-On: I3227189691df85f265cf84bd4115d8d4c9f979f3
Co-Authored-By: Sofer Athlan-Guyot <sathlang@redhat.com>

[1] https://review.openstack.org/#/c/450607/

Change-Id: If998704b3c4199bbae8a1d068c31a71763f5c8a2
(cherry picked from commit d2d319ec0e)
2017-04-06 10:48:03 +00:00

96 lines
3.5 KiB
YAML

heat_template_version: ocata
description: >
OpenDaylight OVS Configuration.
parameters:
OpenDaylightPort:
default: 8081
description: Set opendaylight service port
type: number
OpenDaylightUsername:
default: 'admin'
description: The username for the opendaylight server.
type: string
OpenDaylightPassword:
default: 'admin'
type: string
description: The password for the opendaylight server.
hidden: true
OpenDaylightConnectionProtocol:
description: L7 protocol used for REST access
type: string
default: 'http'
OpenDaylightCheckURL:
description: URL postfix to verify ODL has finished starting up
type: string
default: 'restconf/operational/network-topology:network-topology/topology/netvirt:1'
OpenDaylightApiVirtualIP:
type: string
default: ''
OpenDaylightProviderMappings:
description: Mappings between logical networks and physical interfaces.
Required for VLAN deployments. For example physnet1 -> eth1.
type: comma_delimited_list
default: "datacentre:br-ex"
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
resources:
OpenVswitchUpgrade:
type: ./openvswitch-upgrade.yaml
outputs:
role_data:
description: Role data for the OpenDaylight service.
value:
service_name: opendaylight_ovs
config_settings:
opendaylight::odl_rest_port: {get_param: OpenDaylightPort}
opendaylight::username: {get_param: OpenDaylightUsername}
opendaylight::password: {get_param: OpenDaylightPassword}
opendaylight_check_url: {get_param: OpenDaylightCheckURL}
opendaylight::nb_connection_protocol: {get_param: OpenDaylightConnectionProtocol}
neutron::agents::ml2::ovs::local_ip: {get_param: [ServiceNetMap, NeutronTenantNetwork]}
neutron::plugins::ovs::opendaylight::provider_mappings: {get_param: OpenDaylightProviderMappings}
tripleo.opendaylight_ovs.firewall_rules:
'118 neutron vxlan networks':
proto: 'udp'
dport: 4789
'136 neutron gre networks':
proto: 'gre'
step_config: |
include tripleo::profile::base::neutron::plugins::ovs::opendaylight
upgrade_tasks:
yaql:
expression: $.data.ovs_upgrade + $.data.opendaylight_upgrade
data:
ovs_upgrade:
get_attr: [OpenVswitchUpgrade, role_data, upgrade_tasks]
opendaylight_upgrade:
- name: Check if openvswitch is deployed
command: systemctl is-enabled openvswitch
tags: common
ignore_errors: True
register: openvswitch_enabled
- name: "PreUpgrade step0,validation: Check service openvswitch is running"
shell: /usr/bin/systemctl show 'openvswitch' --property ActiveState | grep '\bactive\b'
when: openvswitch_enabled.rc == 0
tags: step0,validation
- name: Stop openvswitch service
tags: step1
when: openvswitch_enabled.rc == 0
service: name=openvswitch state=stopped