From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 25 21:50:02 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47E72106572A for ; Wed, 25 Feb 2009 21:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1F7EC8FC21 for ; Wed, 25 Feb 2009 21:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n1PLo2YI003570 for ; Wed, 25 Feb 2009 21:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n1PLo17v003569; Wed, 25 Feb 2009 21:50:01 GMT (envelope-from gnats) Resent-Date: Wed, 25 Feb 2009 21:50:01 GMT Resent-Message-Id: <200902252150.n1PLo17v003569@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrew Daugherity Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DF95106566C for ; Wed, 25 Feb 2009 21:48:20 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 114868FC1D for ; Wed, 25 Feb 2009 21:48:20 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n1PLmJSb051437 for ; Wed, 25 Feb 2009 21:48:19 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n1PLmJrT051436; Wed, 25 Feb 2009 21:48:19 GMT (envelope-from nobody) Message-Id: <200902252148.n1PLmJrT051436@www.freebsd.org> Date: Wed, 25 Feb 2009 21:48:19 GMT From: Andrew Daugherity To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/132112: [patch] devd unnecessarily reconfigures carp(4) interfaces X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Feb 2009 21:50:06 -0000 >Number: 132112 >Category: bin >Synopsis: [patch] devd unnecessarily reconfigures carp(4) interfaces >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 25 21:50:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Andrew Daugherity >Release: 7.1 >Organization: Texas A&M University >Environment: FreeBSD imslb4.tamu.edu 7.1-RELEASE-p1 FreeBSD 7.1-RELEASE-p1 #0: Wed Jan 14 15:03:53 CST 2009 root@imslb4.tamu.edu:/usr/obj/usr/src/sys/IMS amd64 >Description: While debugging some other problems with carp, I discovered that devd reconfigures carp interfaces after they have already been brought up by the netif rc script. This is unnecessary and prints useless error messages, and due to the bug in kern/132107, breaks my carp setup. Looking at the console scrollback when rc_debug is enabled, I see that the following happens: * '/etc/rc.d/netif start' brings up network interfaces, including carp interfaces * some time later, devd is started via '/etc/rc.d/devd start' * devd calls pccard_ether on interfaces it thinks aren't "up", including carp interfaces -- e.g. '/etc/pccard_ether carp0 start' * pccard_ether calls '/etc/rc.d/netif start carp0' (which then causes the problem in kern/132107) * pccard_ether does the equivalent of '/etc/rc.d/routing static'; this prints error messages to the console about the routes already existing >How-To-Repeat: Configure a carp interface as described in the handbook: cloned_interfaces="carp0" ifconfig_carp0="vhid 16 $carp_advskew pass XXXXXXXX 10.95.0.1/21" Note in the console output that carp0 is configured at the same time as other ethernet interfaces, and then configured again some time later, followed by the routing error messages. If you set rc_debug="YES" you will see the execution trace described above. >Fix: Copy into devd.conf: ==== # don't have devd call network_start on carp interfaces; for some reason this # loses the advskew setting (kern/132107) and is entirely superfluous. notify 100 { match "system" "IFNET"; match "subsystem" "carp[0-9]+"; match "type" "ATTACH"; action "echo devd called on $subsystem, type $type"; }; ==== There's probably a better action line to use than the echo statement, but the important thing is that it overrides the default attach behavior (action "/etc/pccard_ether $subsystem start"). >Release-Note: >Audit-Trail: >Unformatted: