Neutron containers are not sharing namespaces

Bug #1947423 reported by Uriel Medina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
New
Undecided
Unassigned

Bug Description

The container "neutron_l3_agent" is not "sharing" the namespaces.

I added the "LOG.debug" inside "neutron/agent/linux/ip_lib.py" inside the "list_network_namespaces" function,like this:

def list_network_namespaces(**kwargs):
    """List all network namespace entries.

    :param kwargs: Callers add any filters they use as kwargs
    """
    if cfg.CONF.AGENT.use_helper_for_ns_read:
        LOG.debug("Trying list_network_namespaces, with response: {response}".format(
            response=privileged.list_netns(**kwargs)
        ))
        return privileged.list_netns(**kwargs)
    else:
        return netns.listnetns(**kwargs)

When i print the "neutron-l3-agent.log" I get this (which it's all good)
2021-10-15 22:18:13.890 21 DEBUG neutron.agent.linux.ip_lib [-] Trying list_network_namespaces, with response: ('qrouter-2bc67140-8de0-4920-9fba-9fd4c0ac1ffb', 'qdhcp-7c744f36-e636-46f0-97e3-8e90ba9c296b', 'qrouter-425b0589-5d0b-4ee1-9389-4a34b1b45848', 'qdhcp-377fe94b-1f28-4eff-92f7-907798bd3f54') list_network_namespaces /var/lib/kolla/venv/lib/python3.8/site-packages/neutron/agent/linux/ip_lib.py:929

But if I print the "neutron-metering-agent.log", I get no response:
2021-10-15 22:18:37.663 7 DEBUG neutron.agent.linux.ip_lib [-] Trying list_network_namespaces, with response: () list_network_namespaces /var/lib/kolla/venv/lib/python3.8/site-packages/neutron/agent/linux/ip_lib.py:929

**Enviroment**
Ubuntu 20.04
Docker 20.10.9
Kolla Ansible pip package 12.2.0
Using all-in-one inventory

**Globals.yml**
config_strategy: "COPY_ALWAYS"
kolla_base_distro: "ubuntu"
kolla_install_type: "source"
openstack_release: "wallaby"
kolla_internal_vip_address: "192.168.0.12"
network_interface: "ens160"
neutron_external_interface: "ens192"
neutron_plugin_agent: "openvswitch"
enable_haproxy: "yes"
enable_neutron_metering: "yes"
docker_disable_default_iptables_rules: "no"

Revision history for this message
Mehmet TOPCU (mehmettopcu) wrote :

I solved the problem I had with the metering agent with the following change, it may be useful.

diff --git a/ansible/roles/neutron/defaults/main.yml b/ansible/roles/neutron/defaults/main.yml
index a1f58d6dd0dbe6ba4cb2250319c2bbec2b606578..5dc5190d1faaeee239d19922ce2f12a8995f5706 100644
--- a/ansible/roles/neutron/defaults/main.yml
+++ b/ansible/roles/neutron/defaults/main.yml
@@ -494,6 +494,9 @@ neutron_metering_agent_default_volumes:
   - "{{ node_config_directory }}/neutron-metering-agent/:{{ container_config_directory }}/:ro"
   - "/etc/localtime:/etc/localtime:ro"
   - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
+ - "/lib/modules:/lib/modules:ro"
+ - "neutron_metadata_socket:/var/lib/neutron/kolla/"
+ - "/run/netns:/run/netns:shared"
   - "kolla_logs:/var/log/kolla/"
   - "{{ kolla_dev_repos_directory ~ '/neutron/neutron:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/neutron' if neutron_dev_mode | bool else '' }}"
 ironic_neutron_agent_default_volumes:

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.