Hi All, I believe I found a strange bug in relayctl. I'm running OpenBSD 4.5 (release) with quite a normal relay.conf (see below).
[r...@openlb46-1] <~> # relayctl monitor sync: imsg type 32 len 12 peerid 0 pid 16630 timestamp: 1249310943, Mon Aug 3 16:49:03 2009 host_status: imsg type 31 len 32 peerid 0 pid 16630 timestamp: 1249310943, Mon Aug 3 16:49:03 2009 id: 1 state: up sync: imsg type 32 len 12 peerid 0 pid 16630 timestamp: 1249310948, Mon Aug 3 16:49:08 2009 host_status: imsg type 31 len 32 peerid 0 pid 16630 timestamp: 1249310948, Mon Aug 3 16:49:08 2009 id: 1 state: up sync: imsg type 32 len 12 peerid 0 pid 16630 timestamp: 1249310953, Mon Aug 3 16:49:13 2009 host_status: imsg type 31 len 32 peerid 0 pid 16630 timestamp: 1249310953, Mon Aug 3 16:49:13 2009 id: 1 state: up <hitting CTRL+c> then, the same command again: [r...@openlb46-1] <~> # relayctl monitor <unknown>: imsg type 2 len 12 peerid 0 pid 12763 timestamp: 1249311051, Mon Aug 3 16:50:51 2009 [r...@openlb46-1] <~> # it instantly quits. I guess that's not the way it should be, right? Additionally relayctl continues to behave strange: [r...@openlb46-1] <~> # relayctl host enable 2 relayctl: wrong message in summary: 17 id 2 is definetly correct: [r...@openlb46-1] <~> # relayctl show hosts Id Type Name Avlblty Status 1 table msn_whitelabel:80 active (1 hosts) 1 host 10.46.25.1 99.39% up total: 86987/87520 checks 2 host 10.46.25.2 disabled I can pkill and start relayd again and the enable disable commands will work. [r...@openlb46-1] <~> # pkill relayd [r...@openlb46-1] <~> # relayd [r...@openlb46-1] <~> # relayctl host enable 2 command succeeded [r...@openlb46-1] <~> # relayctl host disable 2 command succeeded [r...@openlb46-1] <~> # I wouldn't dare to use "relayctl monitor" right now, because of the mentioned issue. We're going to go live with two OpenBSD 4.5 boxes as a router and http load balancer pretty soon. Once again, awesome work on everything. carp, pfsync, relayd, vlan, trunk. woohoo :) However, if this relayctl monitor thing is a bug, what should I do? File a pr? I would be able to get the 4.5-release sources, update them via cvsup to somewhere else and test patches. Just tell me how and when. Or better, verify that it's not a problem at my installation. Some more facts & figures: [r...@openlb46-1] <~> # uname -a OpenBSD openlb46-1.local 4.5 GENERIC.MP#108 i386 [r...@openlb46-1] <~> # cat /etc/relayd.conf # $OpenBSD: relayd.conf,v 1.13 2008/03/03 16:58:41 reyk Exp $ # # Macros # ext_addr="10.46.24.100" ext_whitelabel46_1="10.46.25.1" ext_whitelabel46_2="10.46.25.2" # # Global Options # # interval 10 interval 5 timeout 2000 # prefork 5 prefork 20 log updates # # Each table will be mapped to a pf table. # table <msn_whitelabel> { $ext_whitelabel46_1 $ext_whitelabel46_2 retry 2 } # # Services will be mapped to a rdr rule. # redirect msn_whitelabel { listen on $ext_addr port 80 # tag every packet that goes thru the rdr rule with RELAYD tag RELAYD sticky-address forward to <msn_whitelabel> check http "/relayd.txt" code 200 } hope that's enough. Cheers and keep up the good work, Marian PS.: and keep me CC'ed, I'm not subscribed right now.