← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1717582] Re: fullstack job failing to create namespace because it's already exists

 

Reviewed:  https://review.openstack.org/503890
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=fd1403fd9a971cf3cbd863fa33ca68eb019fbdc1
Submitter: Jenkins
Branch:    master

commit fd1403fd9a971cf3cbd863fa33ca68eb019fbdc1
Author: Sławek Kapłoński <slawek@xxxxxxxxxxxx>
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
    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://man7.org/linux/man-pages/man7/netlink.7.html is not
    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
    to avoid raising ProcessExecutionError exception with this
    error message.
    
    Closes-Bug: #1717582
    Change-Id: I1898426789c85ce1faa97665bfd47f1fa38ef727


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1717582

Title:
  fullstack job failing to create namespace because it's already exists

Status in neutron:
  Fix Released

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://github.com/openstack/neutron/blob/master/neutron/agent/linux/ip_lib.py#L204

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1717582/+subscriptions


References