Re: Possible devd bug
On Fri, 20 Jul 2007 13:16:23 +0200 (CEST) Bartłomiej Rutkowski <[EMAIL PROTECTED]> wrote: > From: Bartłomiej Rutkowski <[EMAIL PROTECTED]> > To: Norberto Meijome <[EMAIL PROTECTED]> > Subject: Re: Possible devd bug > Date: Fri, 20 Jul 2007 13:16:23 +0200 (CEST) > X-Mailer: Sylpheed 2.4.0 (GTK+ 2.10.12; i386-portbld-freebsd6.2) Please keep the list in CC. > Well, I can confirm right now, that devd does not trigger, when you put eth > interface into > DOWN state by "#ifconfig ifnameX down". Now, is that intentional behaviour or > a bug? well..i never expected devd to trigger a LINK_DOWN or UP event when one issues an ifconfig down. The meanings are different - link up or down means the physical layer, ifconfig [nic] up/down means 'enable the card in the OS' or, as the man page puts it : [...] downMark an interface ``down''. When an interface is marked ``down'', the system will not attempt to transmit messages through that interface. If possible, the interface will be reset to disable reception as well. . [...] up Mark an interface ``up''. This may be used to enable an inter- face after an ``ifconfig down''. [...] --- you can have a card up or down, with or not link - they are independent. Either link or interface down means you cannot transmit via it, but for different reasons. > This > makes those LINK_UP devd triggers totally unusable. no, it makes them perfectly usable for the intended objectives of devd :) B _ {Beto|Norberto|Numard} Meijome Lack of planning on your part does not constitute an emergency on ours. I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Possible devd bug
On Fri, 20 Jul 2007 12:53:23 +0200 (CEST) Bartłomiej Rutkowski <[EMAIL PROTECTED]> wrote: > On Fri, 20 Jul 2007 20:41:46 +1000 > Norberto Meijome <[EMAIL PROTECTED]> wrote: > > > do you get the LINK_UP event at all? > > Otherwise, you should be able to figure out what the issue is with your > > config file ... > > > > Good luck, > > With rules as such: > http://rafb.net/p/TJvMJy48.html > > I am getting output as such: > http://rafb.net/p/EZ8HGk42.html > > What is going on? > I'm sorry - I don't see what the problem is - you tell it to execute ifconfig up/down on LINK_UP/DOWN, and that's what it says it's doing. _ {Beto|Norberto|Numard} Meijome Mind over matter: if you don't mind, it doesn't matter I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Possible devd bug
On Fri, 20 Jul 2007 20:41:46 +1000 Norberto Meijome <[EMAIL PROTECTED]> wrote: Well, I can confirm right now, that devd does not trigger, when you put eth interface into DOWN state by "#ifconfig ifnameX down". Now, is that intentional behaviour or a bug? This makes those LINK_UP devd triggers totally unusable. -- Bartłomiej Rutkowski <[EMAIL PROTECTED]> ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Possible devd bug
On Fri, 20 Jul 2007 20:41:46 +1000 Norberto Meijome <[EMAIL PROTECTED]> wrote: > do you get the LINK_UP event at all? > Otherwise, you should be able to figure out what the issue is with your > config file ... > > Good luck, With rules as such: http://rafb.net/p/TJvMJy48.html I am getting output as such: http://rafb.net/p/EZ8HGk42.html What is going on? -- Bartłomiej Rutkowski <[EMAIL PROTECTED]> ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Possible devd bug
On Fri, 20 Jul 2007 09:28:55 +0200 (CEST) Bartłomiej Rutkowski <[EMAIL PROTECTED]> wrote: > Hi all, > > I have been playing with OpenOspf lately, and I came to a place, when I > needed to ensure that an ethernet interface should always go into DOWN state > when it loses its link (physically, for example the switch becames turned > off). I have tried to hire the devd daemon to do the job with such small > definitions: > > notify 100 { > match "system" "IFNET"; > match "type""LINK_DOWN"; > media-type "ethernet"; > action "/sbin/ifconfig $subsystem down"; > }; > > notify 200 { > match "system" "IFNET"; > match "type""LINK_UP"; > media-type "ethernet"; > action "/sbin/ifconfig $subsystem up"; > }; > > And what is happening? Well, basically, when the interface detects that eth > cable has been detached, devd triggers and makes it DOWN, which is ok. But, > when the card got the cable attached once again (and interface detects the > media type and gets ACTIVE state) devd never triggers the second rule, which > should get the interface UP again. > I have tried that with replacing action statements with ones with proper > logging actions, and when interface is UP devd gets the proper state changes > information. > > Now the question is: why devd doesent receive any information from interfaces > in DOWN state? Is that proper behaviour, or a bug? Thanks for any reply, and > for your attention. > hi , What do you get when you run devd in debug mode : /etc/rc.d/devd stop /sbin/devd -d -D in my case, i get the following on pulling the cat5 on bge0 [EMAIL PROTECTED] [Fri Jul 20 20:36:28 2007] /usr/home/betom # /sbin/devd -D -d Parsing /etc/devd.conf setting scsi-controller-regex=(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)[0-9]+ Parsing files in /etc/devd Parsing files in /usr/local/etc/devd Parsing /usr/local/etc/devd/ayiin.conf Processing event '!system=IFNET subsystem=bge0 type=LINK_DOWN' Pushing table setting system=IFNET setting subsystem=bge0 setting type=LINK_DOWN Processing notify event Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^IFNET Testing type=LINK_DOWN against ^ATTACH Testing system=IFNET against ^IFNET Testing type=LINK_DOWN against ^DETACH Testing system=IFNET against ^IFNET Testing type=LINK_DOWN against ^LINK_UP Testing system=IFNET against ^IFNET Testing type=LINK_DOWN against ^LINK_UP Popping table [AND HERE I PLUG IT BACK IN ] Processing event '!system=IFNET subsystem=bge0 type=LINK_UP' Pushing table setting system=IFNET setting subsystem=bge0 setting type=LINK_UP Processing notify event Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^IFNET Testing type=LINK_UP against ^ATTACH Testing system=IFNET against ^IFNET Testing type=LINK_UP against ^DETACH Testing system=IFNET against ^IFNET Testing type=LINK_UP against ^LINK_UP Testing media type of bge0 against 0x20 bge0 has media type 0x20 Executing '/etc/rc.d/dhclient start bge0' Popping table - do you get the LINK_UP event at all? Otherwise, you should be able to figure out what the issue is with your config file ... Good luck, _ {Beto|Norberto|Numard} Meijome "Too bad ignorance isn't painful." Don Lindsay I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"