-------- Original Message --------
Subject: Re:relayctl host disable doesn't loop through all hosts
From: Reyk Floeter <[email protected]>
To: Pierre-Yves Ritschard <[email protected]>
CC: Pascal Lalonde <[email protected]>, [email protected]
Date: Wed Apr 01 2009 09:57:24 GMT-0400 (Eastern Daylight Time)
> On Wed, Apr 01, 2009 at 09:22:44AM +0200, Pierre-Yves Ritschard wrote:
>
>> * Pascal Lalonde ([email protected]) wrote:
>>
>>> Hello,
>>>
>>> I've been playing with relayd lately. There is a behavior which seems
>>> unintuitive and I was wondering if that was a bug or the intended
>>> behavior.
>>>
>>>
>> It's the intended behavior but I have been meaning to fix that at some
>> point.
>>
>>
>
> no, it shouldn't be "fixed". one host can have different services with
> different states at the same time.
>
> if you want to reuse a single host check, use the "parent" keyword to
> inherit the host state from a previous entry, eg. "10.0.1.101 parent
> 1" to use the state of host 1 for host 4 and so on. this also allows
> you to disable host 1 and all of its children at the same time.
>
>
I still don't understand what is the intended behaviour of "host
disable" command, since it only disables the check for the first service
being listed in the show summary command. It seems to me that this might
be a bug since in the man page it says:
"host disable [name | id]
Disable a host. Treat it as though it were always down."
If the host is down, it implies that the services will be down as well.
>>> When I try to disable a host (e.g.: relayctl host disable 10.0.1.101),
>>> and that host is part of more than one table, only the first occurence
>>> gets disabled. I'm testing with relayd from Feb 28th snapshot.
>>>
>>> I would suppose it should disable all occurences, since disabling by ID
>>> already lets you choose specific instances of that host.
>>>
>>> # relayctl show summary
>>> Id Type Name Avlblty Status
>>> 1 redirect test active
>>> 1 table test:8080 active
>>> (3 hosts)
>>> 1 host 10.0.1.101 100.00% up
>>> 2 host 10.0.1.102 100.00% up
>>> 3 host 10.0.1.103 100.00% up
>>> 2 redirect test2 active
>>> 2 table test2:30000 active
>>> (6 hosts)
>>> 4 host 10.0.1.101 100.00% up
>>> 5 host 10.0.1.102 100.00% up
>>> 6 host 10.0.1.103 100.00% up
>>> 7 host 10.0.1.104 100.00% up
>>> 8 host 10.0.1.105 100.00% up
>>> 9 host 10.0.1.106 100.00% up
>>> # relayctl host disable 10.0.1.101
>>> command succeeded
>>> # relayctl show summary
>>> Id Type Name Avlblty Status
>>> 1 redirect test active
>>> 1 table test:8080 active
>>> (2 hosts)
>>> 1 host 10.0.1.101 disabled
>>> 2 host 10.0.1.102 100.00% up
>>> 3 host 10.0.1.103 100.00% up
>>> 2 redirect test2 active
>>> 2 table test2:30000 active
>>> (6 hosts)
>>> 4 host 10.0.1.101 100.00% up
>>> 5 host 10.0.1.102 100.00% up
>>> 6 host 10.0.1.103 100.00% up
>>> 7 host 10.0.1.104 100.00% up
>>> 8 host 10.0.1.105 100.00% up
>>> 9 host 10.0.1.106 100.00% up
>>>
>>> Thanks in advance!
>>>
>
>
--
Emery Guivremont
Administrateur Riseau/ Network Administrator
Gameloft - Global Network Service