[Bug 926229] Re: [network/multi_nic] test hangs on dhclient when run
Jeff Lane
jeffrey.lane at canonical.com
Wed Apr 11 21:04:19 UTC 2012
Ok... so after talking to roadmr about this, the easiest way to get
around this for checkbox sake is to remove the dhclient call from the
networking/multi_nic_* jobs and insist on the user configuring all
network devices prior to running checkbox. I think that's a reasonable
workaround for this issue.
The root cause seems to be dhclient choking a bit... if it's run more
than once on eth0, it goes into this loop. but only on eth0. for eth1,
I can run dhclient to bring the device up, shut eth1 down, and use
dhclient again, and each time it just spaws a new instance of dhclient
for eth1.
this seems to be very easily reproducible on my server here by doing the
following:
1: comment out any ethX configuration in /etc/network/interfaces
2: reboot to ensure a clean system
3: run this short script:
for x in 1 2 3; do
sudo dhclient eth0
ifconfig eth0
sleep 1
sudo ifconfig eth0 down
ifconfig
done
What you should see happening is that on the first iteration, dhclient
successfully brings eth0 up, displays the output of 'ifconfig eth0' then
shuts it down and the second run of ifconfig only shows the 'lo'
interface active.
On the second iteration, however, the script will appear to hang. So
move to a different console and 'tail -f /var/log/syslog' and you will
now see the infinite loop of DHCPREQEUST, DHCPDISCOVER, and DHCPOFFER
messages but never an ack.,
Move back to the first console and ctrl-c to stop dhclient which is now
hung. this will move on to the 'ifconfig eth0' line again, and you'll
see that eth0 was actually activated, dhclient just never realized that.
Then on the third iteration, you'll have to ctrl-c again to kill
dhclient one more time.
Now, after that is complete, do a 'ps axf |grep dhclient' and you should
see only one instace:
$ ps axf |grep dhclient |grep -v grep
2811 ? Ss 0:00 dhclient eth0
NOW, run that script again, but this time use eth1 (this has to be done
on a system with two ethernet devices that are connected to a working
LAN:
When this runs against eth1, you'll see that the script complets all
three loops successfully without dhclient being hung up at all. And
after it's done, redo the ps command:
$ ps axf |grep dhclient |grep -v grep
2811 ? Ss 0:00 dhclient eth0
3151 ? Ss 0:00 dhclient eth1
3238 ? Ss 0:00 dhclient eth1
3326 ? Ss 0:00 dhclient eth1
So it appears that there is actually a problem with dhclient.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/926229
Title:
[network/multi_nic] test hangs on dhclient when run
Status in Checkbox System Testing:
Confirmed
Status in “isc-dhcp” package in Ubuntu:
New
Bug description:
DIscovered this while testing a server during a test run of the
checkbox offline process.
First, the config:
1U server with 2 eth ports. To install, I completely simulated the
offline experience by disconnecting both NIC ports from my LAN,
installing Precise Server alpha 2 from USB stick and then installing
the checbox-certification tarball.
After that was installed, I reconnected the NIC ports to my LAN.
Note that because they were not connected during installation, there
is no config for them in /etc/network/interfaces.
Next, I started checkbox-certification and allowed it to begin
testing. Once it hit network/multi_nic it just stopped.
The process being run at the time was dhclient, the first step in the
multi_nic test.
Unfortunately, I forgot to save any logs before reinstalling the
system for other things...
To manage notifications about this bug go to:
https://bugs.launchpad.net/checkbox/+bug/926229/+subscriptions
More information about the foundations-bugs
mailing list