fullstack job failing to create namespace because it's already exists
Bug #1717582 reported by
Slawek Kaplonski
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Undecided
|
Slawek Kaplonski |
Bug Description
In fullstack tests there is many times error with creating e.g. "host-xxxx" namespace. Error message tells that such namespace already exists and test is failing because of that.
It looks that this is kind of race condition when ip.netns.exists() method return false but few miliseconds later namespace already exists and ip.netns.add() method fails.
It is in method ensure_namespace() in https:/
Changed in neutron: | |
assignee: | nobody → Slawek Kaplonski (slaweq) |
status: | New → In Progress |
tags: | added: neutron-proactive-backport-potential |
tags: | removed: neutron-proactive-backport-potential |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/503890 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=fd1403fd9a9 71cf3cbd863fa33 ca68eb019fbdc1
Committed: https:/
Submitter: Jenkins
Branch: master
commit fd1403fd9a971cf 3cbd863fa33ca68 eb019fbdc1
Author: Sławek Kapłoński <email address hidden>
Date: Thu Sep 14 02:11:50 2017 +0000
Fix for race condition during netns creation
In some cases if ip_lib. IPWrapper. ensure_ namespace( ) method man7.org/ linux/man- pages/man7/ netlink. 7.html is not
is called more than once for same namespace in very short
period of time it could raise error that "File already exists"
for second call of this method.
It happens often e.g. in fullstack tests.
Reason of such problem is in Netlink protocol which is used
by iproute2 to communicate with kernel. This protocol, according
to http://
reliable so it is not guaranteed when the message will be
delivered to kernel and when action will be really executed.
Because of that if on quite loaded host ensure_namespace() method
would be executed twice it can lead to error described above.
This patch is changing way how ensure_namespace() method works nError exception with this
to avoid raising ProcessExecutio
error message.
Closes-Bug: #1717582 e1faa97665bfd47 f1fa38ef727
Change-Id: I1898426789c85c