On Sat, Apr 01, 2006 at 10:02:52AM +0200, Dominique Frise wrote:
--- bb-hosts --- 130.223.8.20 uldns1 # dhcp dns smtp ldap://uldns1/o=universite%20de%20lausanne,c=ch 130.223.4.5 uldns2 # dhcp dns smtp ldap://uldns2/o=universite%20de%20lausanne,c=ch include bb-hosts.acadSys
--- bb-host.acadSys --- 130.223.8.20 uldns1 # prefer noconn COMMENT:"Prim. DNS/DHCP/People LDAP/MailGateway" 130.223.4.5 uldns2 # prefer noconn COMMENT:"Sec. DNS/DHCP/People LDAP/MailGateway"
With the simplified configuration above, when I look for "uldns1" with find-host I have following result: [snip] Host uldns1 appears for times!
That's a bug. Attached a patch to fix it.
Also bbhostgrep in custom script doesn't show what I would expect: [bb at iris etc]$ bbhostgrep dhcp
When I put "dispinclude" instead of "include" in bb-hosts, I have: [bb at iris etc]$ bbhostgrep dhcp 130.223.8.20 uldns1 # dhcp 130.223.4.5 uldns2 # dhcp
Am I missing something?
This is really a configuration problem. When using the "prefer" tag, you also tell bbhostgrep to look at only the "preferred" entry in the bb-hosts file. So you really should have put the network tests on the preferred entry in bb-hosts.
bbtest-net takes a somewhat more cautious approach, and performs all of the network tests it sees.
But I agree that it is a trap that is easy to fall into. So perhaps bbhostgrep should ignore the "prefer" ? At least when looking for tests to run, which is what it will commonly be used to do. So I've added an enhancement to bbhostgrep which does that.
Henrik