Bug 638539 - Infinite add/rem loop when commands called to fast
Summary: Infinite add/rem loop when commands called to fast
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 514492
TreeView+ depends on / blocked
 
Reported: 2010-09-29 09:53 UTC by Miroslav Rezanina
Modified: 2011-10-21 09:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-21 09:25:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miroslav Rezanina 2010-09-29 09:53:35 UTC
Description of problem:

I try to remove and then add vlan interface in my script. E.g.:

vconfig rem eth0.471
vconfig add eth0 471


Calling these commands immediately one after another leads to state when there's infinite loop of removing and then adding vlan. I'm not able to stop this loop unless I reboot machine.

 
Version-Release number of selected component (if applicable):
vconfig-1.9.3
kernel-xen-2.6.18-194.3.1.el5.x86_64

How reproducible:
100%

Steps to Reproduce:
1. vconfig add eth0 471
2. vconfig rem eth0.471; vconfig add eth0.471
3. ip addr show dev eth0.471 - repeat few times
4. while [ -f /proc/net/vlan/eth0.471 ]; do echo "online"; done
  
Actual results:
You can see in ip addr outputs, that number of vlan network is growing. Polling for /proc entry stops soon.

Expected results:

Vlan is created and stable. Polling does not end.

Additional info:

I tested this sequence on fedora (vconfig-1.9-7.fc11.i586) and vlan si re-created correctly.

Comment 1 Petr Pisar 2010-09-29 11:06:22 UTC
(1) `vconfig' is deprecated. Use `ip' command instead.
(2) vconfig syntax is `vconfig add DEVICE VLAN_ID' You called `vconfig add eth0.471'. (See the dot.) In that case VLAN_ID = 0 is passed to kernel. I don't know whether this is supported operation.
(3) If vconfig command exits, there is no way how vconfig could cycle in remove--add loop. This is kernel issue.
(4) vconfig in Fedora 11 and RHEL-5.6 has same code.

Reassigning to kernel.

Comment 2 Paolo Bonzini 2010-09-29 11:33:22 UTC
"vconfig add eth0.471" was a typo, we were of course using "vconfig add eth0 471".  Sorry.

> If vconfig command exits, there is no way how vconfig could cycle in
> remove--add loop.

It's of course not vconfig that's cycling.  But the interface is indeed going down repeatedly and then brought up again.  I agree with moving the bug to the kernel.

Comment 3 Miroslav Rezanina 2011-03-09 11:53:22 UTC
Testing shows that this problem is only with interfaces having /etc/sysconfig/network-scripts script. Manually created interfaces are working correctly.

Comment 4 Paolo Bonzini 2011-03-09 12:40:19 UTC
So perhaps the package should be changed again to initscripts?  Also, can you document here what to put in /etc/sysconfig/network-scripts to reproduce the bug?

Comment 5 Miroslav Rezanina 2011-03-14 08:40:32 UTC
Testing shows that problem is in /etc/sysconfig/network-script/net.hotplug. Calling /sbin/{ifup,ifdown} cause the problematic behavior.

Comment 6 Bill Nottingham 2011-03-14 20:27:31 UTC
Are you doing this with or without configuration for the device?

Comment 7 Bill Nottingham 2011-03-14 20:27:49 UTC
(both the base and the vlan device)

Comment 8 Miroslav Rezanina 2011-03-15 06:55:26 UTC
This is with devices configuration (do you mean in /etc/sysconfig/network-scripts?). Without this configuration problem does not occurs. My futher testing shows that problem somewhere in /etc/sysconfig/network-scripts/if{up,down}-post - not executing these scripts does not cause problem, skiping only  /sbin/if{up,down}-local calling also ok.

Comment 9 Paolo Bonzini 2011-03-15 09:05:05 UTC
What's the content of your /sbin/if{up,down}-local?  Those should not be provided by any package, i.e. the bug is in your configuration if it is really in if*-local.

Comment 10 Miroslav Rezanina 2011-03-15 10:44:54 UTC
Bug is in /etc/sysconfig/network-scripts/if{up,down}-post....Comment 8 means that if I leave before executing if*-post it is ok, if I ends in if*-post before calling if*-local, it fails.

Comment 11 Bill Nottingham 2011-06-20 21:07:21 UTC
(In reply to comment #8)
> This is with devices configuration (do you mean in
> /etc/sysconfig/network-scripts?). Without this configuration problem does not
> occurs. My futher testing shows that problem somewhere in
> /etc/sysconfig/network-scripts/if{up,down}-post - not executing these scripts
> does not cause problem, skiping only  /sbin/if{up,down}-local calling also ok.

So, this should be easily fixed by adding HOTPLUG=no to your configuration, unless I'm missing something.

Comment 12 Miroslav Rezanina 2011-10-10 14:22:43 UTC
Not so easily. When I add HOTPLUG=no to vlan, vconfig rem ethx.y cause eth0 disable to so I'm not able to readd vlan again.

Comment 13 Bill Nottingham 2011-10-10 17:51:05 UTC
I mean, add 'HOTPLUG=no' to *both* the base and the vlan configuration.

Comment 14 Miroslav Rezanina 2011-10-12 08:46:16 UTC
Ok, with both devices set to HOTPLUG=no, base interface is not lost, but command "vconfig rem ethx.y; vconfig add ethx y" cause removing vlan but not it's adding even if "vconfig add" ouput looks like everything is ok.

Comment 15 Bill Nottingham 2011-10-12 17:55:15 UTC
It adds the vlan, but doesn't bring the interface up, correct?

Comment 16 Miroslav Rezanina 2011-10-13 08:48:16 UTC
Nope, it not add vlan at all. I need to add it again. Than it is added but not up.

Comment 17 Miroslav Rezanina 2011-10-21 09:25:50 UTC
Closing - no more interested in this issue.


Note You need to log in before you can comment on or make changes to this bug.