NeutronApiSDNContext does not allow for multiple neutron-plugin-api-subordinates

Bug #1931313 reported by David Ames
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Neutron API Charm
New
Undecided
Unassigned

Bug Description

The NeutronApiSDNContext does not allow for multiple neutron-plugin-api-subordinates. The context is returned [0] on the first unit of the first relation.

In the context of ironic and OVN we will need at least two neutron-plugin-api-subordinates one for each.

[0] https://github.com/openstack/charm-neutron-api/blob/master/hooks/neutron_api_context.py#L821

Revision history for this message
David Ames (thedac) wrote :

Simplest option is to just return the context outside the loops. However, [0] seems to have made this explicit. Need to discuss the original intention.

[0] https://github.com/openstack/charm-neutron-api/commit/4ac5e3f71c2594cd9e74b4dcb36f494ba3dff53d

Revision history for this message
David Ames (thedac) wrote :

The problem is much bigger. NeutronApiSDNConfigFileContext could also be affected.

But the bigger issue is merging multiple (conflicting?) settings like neutron-plugin and mechanism-drivers:

# relation-get
egress-subnets: 192.168.151.60/32
ingress-address: 192.168.151.60
mechanism-drivers: ovn
neutron-plugin: ovn
poke: "1"
private-address: 192.168.151.60
service-plugins: metering,segments,ovn-router
subordinate_configuration: '{"neutron-api": {"/etc/neutron/plugins/ml2/ml2_conf.ini":
  {"sections": {"ovn": [["ovn_nb_connection", "ssl:192.168.151.65:6641,ssl:192.168.151.32:6641,ssl:192.168.151.56:6641"],
  ["ovn_nb_private_key", "/etc/neutron/plugins/ml2/key_host"], ["ovn_nb_certificate",
  "/etc/neutron/plugins/ml2/cert_host"], ["ovn_nb_ca_cert", "/etc/neutron/plugins/ml2/neutron-api-plugin-ovn.crt"],
  ["ovn_sb_connection", "ssl:192.168.151.65:16642,ssl:192.168.151.32:16642,ssl:192.168.151.56:16642"],
  ["ovn_sb_private_key", "/etc/neutron/plugins/ml2/key_host"], ["ovn_sb_certificate",
  "/etc/neutron/plugins/ml2/cert_host"], ["ovn_sb_ca_cert", "/etc/neutron/plugins/ml2/neutron-api-plugin-ovn.crt"],
  ["ovn_l3_scheduler", "leastloaded"], ["ovn_metadata_enabled", true], ["enable_distributed_floating_ip",
  false], ["dns_servers", ""], ["dhcp_default_lease_time", 43200], ["ovn_dhcp4_global_options",
  ""], ["ovn_dhcp6_global_options", ""], ["vhost_sock_dir", "/run/libvirt-vhost-user"]],
  "ml2_type_geneve": [["vni_ranges", "1001:2000"], ["max_header_size", "38"]]}}}}'
tenant-network-types: geneve,gre,vlan,flat,local

root@juju-206174-0-lxd-6:/var/lib/juju/agents/unit-neutron-api-0/charm# relation-get -r neutron-plugin-api-subordinate:21 - neutron-ironic-agent/0
egress-subnets: 192.168.151.60/32
ingress-address: 192.168.151.60
mechanism-drivers: openvswitch,hyperv,l2population,baremetal
neutron-plugin: ironic
private-address: 192.168.151.60
subordinate_configuration: '{}'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.