← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1934646] Re: fullstack fails locally after several times run due to shared dhclient lease file

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/799438
Committed: https://opendev.org/openstack/neutron/commit/3b46df48476fdfd5a479ad537d190474f39e395b
Submitter: "Zuul (22348)"
Branch:    master

commit 3b46df48476fdfd5a479ad537d190474f39e395b
Author: LIU Yulong <i@xxxxxxxxxxxx>
Date:   Mon Jul 5 15:19:54 2021 +0800

    Change fullstack dhclient lease file to tmp folder
    
    Each cases are sharing the common lease path for dhclient,
    for instance, in CentOS it is: /var/lib/dhclient/dhclient.leases.
    That means all fullstack cases will use this file to store
    fake VM's NIC DHCP lease information.
    
    After run several times of fullstack cases, the dhclient will
    get failed to set the test fake VM port's IP due to the mess
    settings in this file.
    
    This patch sets each fake VM's NIC lease file path to the
    tmp folder with it's port id.
    
    This may fix some cases that cannot set the IP addr to the test
    device properly via DHCP.
    
    Closes-Bug: #1934646
    Change-Id: Ia87fa7c08df473acbcf1600035d99a83ed4b4375


** 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/1934646

Title:
  fullstack fails locally after several times run due to shared dhclient
  lease file

Status in neutron:
  Fix Released

Bug description:
  Each cases are sharing the common lease path for dhclient,
  for instance, in CentOS it is: /var/lib/dhclient/dhclient.leases.
  That means all fullstack cases will use this file to store
  fake VM's NIC DHCP lease information.

  After run several times of fullstack cases, the dhclient will
  get failed to set the test fake VM port's IP due to the mess
  settings in this file. Errors are:
  """
  # ip netns exec test-f00c713e-97df-440a-9bd0-e88a0bc5ab38 dhclient -4 -sf /opt/stack/neutron/.tox/dsvm-fullstack/bin/fullstack-dhclient-script --no-pid -d port71fc1d
  Internet Systems Consortium DHCP Client 4.2.5
  Copyright 2004-2013 Internet Systems Consortium.
  All rights reserved.
  For info, please visit https://www.isc.org/software/dhcp/
   
  Can't allocate interface portd8lease {
    interface .
   
  This version of ISC DHCP is based on the release available
  on ftp.isc.org.  Features have been added and other changes
  have been made to the base software release in order to make
  it work better with this distribution.
   
  Please report for this software via the CentOS Bugs Database:
      http://bugs.centos.org/
   
  exiting.
  """

  
  The mess settings looks like this:

  }
  lease {
    interface "portb88816 {
    interface "port71fd02";
    fixed-address 20.0.0.115;
  ...

  
  There is a "{" after the port name.

  Looks like there is a race condition among different cases, so this
  file is rendered with broken settings.

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


References