Bug 879049

Summary: When running start_udev, if a network device is already present, it will try to add it again.
Product: Red Hat Enterprise Linux 6 Reporter: David Hill <dhill>
Component: initscriptsAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3CC: dhill, udev-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-21 14:29:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Hill 2012-11-21 22:52:23 UTC
Description of problem:
When running start_udev, if a network device is already present, it will try to add it again.
The bug lies in : "/etc/sysconfig/network-scripts/net.hotplug"

add|register)

    case $INTERFACE in
        # interfaces that are brought up as a part of configuration
        ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*)
            exit 0
            ;;
        # interfaces that are registered then brought up
        *)
            export IN_HOTPLUG=1
            if [ -x /sbin/ifup ]; then
                addr=$(get_hwaddr ${INTERFACE})
                if [ -n "$addr" ]; then
                        nconfig=$(get_config_by_hwaddr ${addr})
                        [ -n "$nconfig" ] && INTERFACE=$nconfig
                fi
                exec /sbin/ifup $INTERFACE
            fi
            ;;
    esac
    ;;

and the udev policy :
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/virtual/net/lo", RUN+="/sbin/ifup $env{INTERFACE}"
ACTION=="add", SUBSYSTEM=="net", PROGRAM="/lib/udev/rename_device", RESULT=="?*", ENV{INTERFACE_NAME}="$result"
SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/net.hotplug"


Version-Release number of selected component (if applicable):


How reproducible:
Everytime

Steps to Reproduce:
1. Run start_udev
2. It will try to add the interface that is already present
3.
  
Actual results:
Crash the network if you have bonding

Expected results:
Do not add an interface that is already present.

Additional info:

Comment 2 Lukáš Nykrýn 2012-11-28 15:41:36 UTC
wrt to this article https://access.redhat.com/knowledge/solutions/154183 you should not call start_udev by yourself.

Comment 3 David Hill 2012-11-28 16:03:25 UTC
"Hello,

As the "max_sectors_kb" values can be changed on the fly. running start_udev for changing it should be fine.

let us know in case of any questions.

Thank you
Nitin"


That'w what I've been told by your support...  is the udevadm present on all versions of redhat?   I still have to support rhel3, rhel4, rhel5 and rhel6 with this...  start_udev is available on all rhels so it was easier to manage.

Comment 4 Lukáš Nykrýn 2012-11-29 09:21:52 UTC
But does udevadm method work in your case (on rhel6)?

Comment 5 David Hill 2012-11-29 15:13:32 UTC
I'll have to try it for RHEL6... find the equivalent for RHEL5, RHEL4 and RHEL3...  I think we don't have any fiberchannel on RHEL3 so I may skip that one but it will take some time to do this.

Comment 7 Lukáš Nykrýn 2013-04-02 15:23:52 UTC
Did you have some time to test calling udevadm on rhel6?

Comment 8 David Hill 2013-04-04 10:43:08 UTC
No didn't have time to test it but I'm pretty sure it will do the trick ... I still think that start_udev should look after a running udev and run udevadm instead but that's your call!

You can close this ticket if nothing will be fixed on your side.

Thank you very much!