From 5f313f27c9120b0e3bac905d155c2b6d234d27bb Mon Sep 17 00:00:00 2001 From: Numan Siddique Date: Thu, 13 Jul 2017 17:14:51 +0530 Subject: Add 'ovn-controller' service Presently the ovn-controller service (puppet/services/neutron-compute-plugin-ovn.yaml) is started only on compute nodes. But for the cases where the controller nodes provide the north/south traffic, we need ovn-controller service runninng in controller nodes as well. This patch - Renames the neutron-compute-plugin-ovn.yaml to ovn-controller.yaml which makes more sense and sets the service name as 'ovn-controller'. - Adds the service 'ovn-controller' to Controller and Compute roles. - Adds the missing 'upgrade_tasks' section in ovn-dbs.yaml and ovn-controller.yaml Depends-On: Ie3f09dc70a582f3d14de093043e232820f837bc3 Depends-On: Ide11569d81f5f28bafccc168b624be505174fc53 Change-Id: Ib7747406213d18fd65b86820c1f86ee7c39f7cf5 --- puppet/services/neutron-compute-plugin-ovn.yaml | 72 --------------------- puppet/services/ovn-controller.yaml | 86 +++++++++++++++++++++++++ puppet/services/ovn-dbs.yaml | 14 ++++ 3 files changed, 100 insertions(+), 72 deletions(-) delete mode 100644 puppet/services/neutron-compute-plugin-ovn.yaml create mode 100644 puppet/services/ovn-controller.yaml (limited to 'puppet') diff --git a/puppet/services/neutron-compute-plugin-ovn.yaml b/puppet/services/neutron-compute-plugin-ovn.yaml deleted file mode 100644 index dfd87eda..00000000 --- a/puppet/services/neutron-compute-plugin-ovn.yaml +++ /dev/null @@ -1,72 +0,0 @@ -heat_template_version: pike - -description: > - OpenStack Neutron Compute OVN agent - -parameters: - EndpointMap: - default: {} - description: Mapping of service endpoint -> protocol. Typically set - via parameter_defaults in the resource registry. - type: json - DefaultPasswords: - default: {} - type: json - RoleName: - default: '' - description: Role name on which the service is applied - type: string - RoleParameters: - default: {} - description: Parameters specific to the role - type: json - ServiceData: - default: {} - description: Dictionary packing service data - 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 - OVNSouthboundServerPort: - description: Port of the Southbound DB Server - type: number - default: 6642 - OVNTunnelEncapType: - description: Tunnel encapsulation type - type: string - default: geneve - NeutronBridgeMappings: - description: > - The OVS logical->physical bridge mappings to use. See the Neutron - documentation for details. Defaults to mapping br-ex - the external - bridge on hosts - to a physical name 'datacentre' which can be used - to create provider networks (and we use this for the default floating - network) - if changing this either use different post-install network - scripts or be sure to keep 'datacentre' as a mapping network name - type: comma_delimited_list - default: "datacentre:br-ex" - - -outputs: - role_data: - description: Role data for the Neutron Compute OVN agent - value: - service_name: neutron_compute_plugin_ovn - config_settings: - ovn::southbound::port: {get_param: OVNSouthboundServerPort} - ovn::controller::ovn_encap_type: {get_param: OVNTunnelEncapType} - ovn::controller::ovn_encap_ip: {get_param: [ServiceNetMap, NeutronApiNetwork]} - ovn::controller::ovn_bridge_mappings: {get_param: NeutronBridgeMappings} - nova::compute::force_config_drive: true - tripleo.neutron_compute_plugin_ovn.firewall_rules: - '118 neutron vxlan networks': - proto: 'udp' - dport: 4789 - '119 neutron geneve networks': - proto: 'udp' - dport: 6081 - step_config: | - include ::tripleo::profile::base::neutron::agents::ovn diff --git a/puppet/services/ovn-controller.yaml b/puppet/services/ovn-controller.yaml new file mode 100644 index 00000000..fbc5559a --- /dev/null +++ b/puppet/services/ovn-controller.yaml @@ -0,0 +1,86 @@ +heat_template_version: pike + +description: > + OpenStack OVN Controller agent + +parameters: + EndpointMap: + default: {} + description: Mapping of service endpoint -> protocol. Typically set + via parameter_defaults in the resource registry. + type: json + DefaultPasswords: + default: {} + type: json + RoleName: + default: '' + description: Role name on which the service is applied + type: string + RoleParameters: + default: {} + description: Parameters specific to the role + type: json + ServiceData: + default: {} + description: Dictionary packing service data + 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 + OVNSouthboundServerPort: + description: Port of the Southbound DB Server + type: number + default: 6642 + OVNTunnelEncapType: + description: Tunnel encapsulation type + type: string + default: geneve + NeutronBridgeMappings: + description: > + The OVS logical->physical bridge mappings to use. See the Neutron + documentation for details. Defaults to mapping br-ex - the external + bridge on hosts - to a physical name 'datacentre' which can be used + to create provider networks (and we use this for the default floating + network) - if changing this either use different post-install network + scripts or be sure to keep 'datacentre' as a mapping network name + type: comma_delimited_list + default: "datacentre:br-ex" + + +outputs: + role_data: + description: Role data for the OVN Controller agent + value: + service_name: ovn_controller + config_settings: + ovn::southbound::port: {get_param: OVNSouthboundServerPort} + ovn::controller::ovn_encap_type: {get_param: OVNTunnelEncapType} + ovn::controller::ovn_encap_ip: {get_param: [ServiceNetMap, NeutronApiNetwork]} + ovn::controller::ovn_bridge_mappings: {get_param: NeutronBridgeMappings} + nova::compute::force_config_drive: true + tripleo.ovn_controller.firewall_rules: + '118 neutron vxlan networks': + proto: 'udp' + dport: 4789 + '119 neutron geneve networks': + proto: 'udp' + dport: 6081 + step_config: | + include ::tripleo::profile::base::neutron::agents::ovn + upgrade_tasks: + - name: Check if ovn_controller is deployed + command: systemctl is-enabled ovn-controller + tags: common + ignore_errors: True + register: ovn_controller_enabled + - name: "PreUpgrade step0,validation: Check service ovn-controller is running" + shell: /usr/bin/systemctl show 'ovn-controller' --property ActiveState | grep '\bactive\b' + when: ovn_controller_enabled.rc == 0 + tags: step0,validation + - name: Stop ovn-controller service + tags: step1 + when: ovn_controller_enabled.rc == 0 + service: name=ovn-controller state=stopped diff --git a/puppet/services/ovn-dbs.yaml b/puppet/services/ovn-dbs.yaml index f6f3e3c8..2b98008b 100644 --- a/puppet/services/ovn-dbs.yaml +++ b/puppet/services/ovn-dbs.yaml @@ -57,3 +57,17 @@ outputs: - {get_param: OVNSouthboundServerPort} step_config: | include ::tripleo::profile::base::neutron::ovn_northd + upgrade_tasks: + - name: Check if ovn_northd is deployed + command: systemctl is-enabled ovn-northd + tags: common + ignore_errors: True + register: ovn_northd_enabled + - name: "PreUpgrade step0,validation: Check service ovn-northd is running" + shell: /usr/bin/systemctl show 'ovn-northd' --property ActiveState | grep '\bactive\b' + when: ovn_northd_enabled.rc == 0 + tags: step0,validation + - name: Stop ovn-northd service + tags: step1 + when: ovn_northd_enabled.rc == 0 + service: name=ovn-northd state=stopped -- cgit 1.2.3-korg