Skip to content

Commit 914b93c

Browse files
committed
Changes to integrate with ACI 4.1 and new packages (SOC-10403)
This commit provides changes in plugin packages and config files needed for integration of SOC with ACI 4.1 and higher versions. ACI 4.1 uses a slightly different set of plugin packages and configs for integration with OpenStack. This includes: - python-gbpclient renamed to python-group-based-policy-client - ovs-bridge-name in opflex-agent-ovs.conf removed - addition of int-bridge-name and access-bridge-name in opflex-agent-ovs.conf - Renaming of agent-ovs to opflex-agent For uniformity, the template for opflex-agent-ovs.conf is now renamed from 10-opflex-agent-ovs.conf.erb to opflex-agent-ovs.conf.erb - The neutron template schema and json templates are updated to provide integration_bridge and access_bridge details with default values. The corresponding migration scripts are also updated. (cherry picked from commit cb5347d)
1 parent 2f98991 commit 914b93c

File tree

6 files changed

+40
-10
lines changed

6 files changed

+40
-10
lines changed

chef/cookbooks/neutron/attributes/default.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
default[:neutron][:metadata_agent_config_file] = "/etc/neutron/neutron-metadata-agent.conf.d/100-metadata_agent.conf"
3333
default[:neutron][:ml2_config_file] = "/etc/neutron/neutron.conf.d/110-ml2.conf"
3434
default[:neutron][:nsx_config_file] = "/etc/neutron/neutron.conf.d/110-nsx.conf"
35+
default[:neutron][:ml2_cisco_config_file] = "/etc/neutron/neutron.conf.d/115-ml2_cisco.conf"
36+
default[:neutron][:ml2_cisco_apic_config_file] = "/etc/neutron/neutron.conf.d/115-ml2_cisco_apic.conf"
37+
default[:neutron][:opflex_config_file] = "/etc/opflex-agent-ovs/conf.d/10-opflex-agent-ovs.conf"
3538
default[:neutron][:rpc_workers] = 1
3639

3740
default[:neutron][:db][:database] = "neutron"
@@ -126,8 +129,8 @@
126129
cisco_apic_pkgs: ["python-apicapi",
127130
"python-neutron-ml2-driver-apic"],
128131
cisco_apic_gbp_pkgs: ["openstack-neutron-gbp",
129-
"python-gbpclient"],
130-
cisco_opflex_pkgs: ["agent-ovs",
132+
"python-group-based-policy-client"],
133+
cisco_opflex_pkgs: ["opflex-agent",
131134
"lldpd",
132135
"openstack-neutron-opflex-agent"],
133136
infoblox_pkgs: ["python-infoblox-client",
@@ -172,8 +175,8 @@
172175
cisco_apic_pkgs: ["python-apicapi",
173176
"python-neutron-ml2-driver-apic"],
174177
cisco_apic_gbp_pkgs: ["openstack-neutron-gbp",
175-
"python-gbpclient"],
176-
cisco_opflex_pkgs: ["agent-ovs",
178+
"python-group-based-policy-client"],
179+
cisco_opflex_pkgs: ["opflex-agent",
177180
"lldpd",
178181
"neutron-opflex-agent"],
179182
infoblox_pkgs: [],

chef/cookbooks/neutron/recipes/cisco_apic_agents.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,14 @@
9292
end
9393

9494
# Update config file from template
95-
opflex_agent_conf = "/etc/opflex-agent-ovs/conf.d/10-opflex-agent-ovs.conf"
9695
apic = neutron[:neutron][:apic]
9796
opflex_list = apic[:opflex].select { |i| i[:nodes].include? node[:hostname] }
9897
opflex_list.any? || raise("Opflex instance not found for node '#{node[:hostname]}'")
9998
opflex_list.one? || raise("Multiple opflex instances found for node '#{node[:hostname]}'")
10099
opflex = opflex_list.first
101-
template opflex_agent_conf do
100+
template node[:neutron][:opflex_config_file] do
102101
cookbook "neutron"
103-
source "10-opflex-agent-ovs.conf.erb"
102+
source "opflex-agent-ovs.conf.erb"
104103
mode "0755"
105104
owner "root"
106105
group neutron[:neutron][:platform][:group]
@@ -110,6 +109,8 @@
110109
socketgroup: neutron[:neutron][:platform][:group],
111110
opflex_peer_ip: opflex[:peer_ip],
112111
opflex_peer_port: opflex[:peer_port],
112+
opflex_int_bridge: opflex[:integration_bridge],
113+
opflex_access_bridge: opflex[:access_bridge],
113114
opflex_vxlan_encap_iface: opflex[:vxlan][:encap_iface],
114115
opflex_vxlan_uplink_iface: opflex[:vxlan][:uplink_iface],
115116
opflex_vxlan_uplink_vlan: opflex[:vxlan][:uplink_vlan],

chef/cookbooks/neutron/templates/default/10-opflex-agent-ovs.conf.erb renamed to chef/cookbooks/neutron/templates/default/opflex-agent-ovs.conf.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636

3737
"renderers": {
3838
"stitched-mode": {
39-
"ovs-bridge-name": "br-int",
39+
"int-bridge-name": "<%= @opflex_int_bridge %>",
40+
"access-bridge-name": "<%= @opflex_access_bridge %>",
4041
"encap": {
4142
"vxlan" : {
4243
"encap-iface": "<%= @opflex_vxlan_encap_iface %>",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
def upgrade(tattr, tdep, attr, dep)
2+
unless attr["apic"]["opflex"].key?("integration_bridge")
3+
attr["apic"]["opflex"]["integration_bridge"] = tattr["apic"]["opflex"]["integration_bridge"]
4+
end
5+
unless attr["apic"]["opflex"].key?("access_bridge")
6+
attr["apic"]["opflex"]["access_bridge"] = tattr["apic"]["opflex"]["access_bridge"]
7+
end
8+
9+
return attr, dep
10+
end
11+
12+
def downgrade(tattr, tdep, attr, dep)
13+
unless tattr["apic"]["opflex"].key?("integration_bridge")
14+
attr["apic"]["opflex"].delete("integration_bridge") if attr.key?("integration_bridge")
15+
end
16+
unless tattr["apic"]["opflex"].key?("access_bridge")
17+
attr["apic"]["opflex"].delete("access_bridge") if attr.key?("access_bridge")
18+
end
19+
20+
return attr, dep
21+
end

chef/data_bags/crowbar/template-neutron.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@
6565
"peer_ip": "",
6666
"peer_port": 8009,
6767
"encap": "vxlan",
68+
"integration_bridge": "br-int",
69+
"access_bridge": "br-fabric",
6870
"vxlan": {
69-
"encap_iface": "br-int_vxlan0",
71+
"encap_iface": "br-fab_vxlan0",
7072
"uplink_iface": "vlan.4093",
7173
"uplink_vlan": 4093,
7274
"remote_ip": "",
@@ -195,7 +197,7 @@
195197
"neutron": {
196198
"crowbar-revision": 0,
197199
"crowbar-applied": false,
198-
"schema-revision": 124,
200+
"schema-revision": 125,
199201
"element_states": {
200202
"neutron-server": [ "readying", "ready", "applying" ],
201203
"neutron-network": [ "readying", "ready", "applying" ],

chef/data_bags/crowbar/template-neutron.schema

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@
7373
"peer_ip": { "type": "str", "required" : true },
7474
"peer_port": { "type": "int", "required" : true },
7575
"encap": { "type": "str", "required": true },
76+
"integration_bridge": { "type": "str", "required": true },
77+
"access_bridge": { "type": "str", "required": true },
7678
"vxlan": { "type": "map", "required": true, "mapping" : {
7779
"encap_iface": {"type": "str", "required": true },
7880
"uplink_iface": { "type": "str", "required": true },

0 commit comments

Comments
 (0)