neutron-ovn-metadata-agent dies on broken namespace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
High
|
Felix Huettner |
Bug Description
neutron-
If the metadata agent dies for reasons outside of its control (e.g. a SIGKILL) during the process of namespace destruction a broken namespace can be left over.
---
Background on pyroute2 namespace management:
Creating a network namespace works by:
1. Forking the process and doing everything in the new child
2. Ensuring /var/run/netns exists
3. Ensuring the file for the network namespace under /var/run/netns exists by creating a new empty file
4. calling `unshare` with `CLONE_NEWNET` to move the process to a new network namespace
5. Creating a bind mount from `/proc/self/ns/net` to the file under /var/run/netns
Deleting a network namespace works the other way around (but shorter):
1. Unmounting the previously created bind mount
2. Deleting the file for the network namespace
---
If the neutron-
When `garbage_
neutron-
```
Traceback (most recent call last):,
File "/usr/local/
sys.
File "/usr/local/
metadata_
File "/usr/local/
agt.start(),
File "/usr/local/
self.sync(),
File "/usr/local/
return f(*args, **kwargs),
File "/usr/local/
self.
File "/usr/local/
ip.
File "/usr/local/
if self.namespace_
File "/usr/local/
return not self.get_devices(),
File "/usr/local/
devices = privileged.
File "/usr/local/
in get_link_
File "/usr/local/
return self(f, *args, **kw),
File "/usr/local/
do = self.iter(
File "/usr/local/
return fut.result(),
File "/usr/local/
return self.__
File "/usr/local/
raise self._exception,
File "/usr/local/
result = fn(*args, **kwargs),
File "/usr/local/
return self.channel.
File "/usr/local/
raise exc_type(
OSError: [Errno 22] failed to open netns
```
Versions: afaik affects all versions
Reproduction: best by creating a empty file with the name `/var/run/
Changed in neutron: | |
assignee: | nobody → Felix Huettner (felix.huettner) |
tags: | added: ovn |
Changed in neutron: | |
importance: | Undecided → High |
summary: |
- neutron-ovn-metadata-agent dies on broken namspace + neutron-ovn-metadata-agent dies on broken namespace |
Fix proposed to branch: master /review. opendev. org/c/openstack /neutron/ +/896251
Review: https:/