← Back to team overview

fuel-dev team mailing list archive

Re: Nailgun agent handler improvements

 

Yes, the node status handler needs to be split this way, we should do some
basic validation that it's the node we expect (mac & uuid) but other wise
the separation is needed. for agent. I'd probably always call ping and just
stop doing it in the existing Node*Handler. Also some node providers might
not easily track node online status (like vmware) so we might want to be
able to change the node timeout or disable it on a per node basis.


On Sat, Apr 5, 2014 at 7:11 AM, Igor Kalnitsky <ikalnitsky@xxxxxxxxxxxx>wrote:

> Hello fuelers,
>
> Currently in Nailgun we have two Node handlers, which can do the same
> things:
>
> - NodeCollectionHandler
> - NodeAgentHandler
>
> As far as I know, the last one was introduced to increase performance,
> since
> updating information can take some time and on 1000+ nodes it may be a
> bottle
> neck. The only thing I dislike is that we have the same logic in two places
> and it complicates the code maintenance.
>
> So I want to suggest another solution, which keeps performance improvements
> and gets rid of code duplication. The idea is that we can add some
> resource,
> request on which will just make some simple thing like updating node's
> online
> status.
>
> Technically it should be something like this:
>
>     POST /api/nodes/42/ping/
>
> where 42 is a node id
>
>
> Pros:
>
> - new handler will make just one query in pure SQL (UPDATE query)
>
> Cons:
>
> - discovery agents should decide which requests to do:
>
>   * put updated data to node collection handler if data was changed since
> last request
>   * post ping request to update online status (data wasn't changed, afaik
> most of cases)
>
> I have made some tests and such ping handler works a bit quicker than
> agent handler,
> and obvious it's a simple.
>
> So what do you think about it?
>
> Thanks,
> Igor
>
>
> --
> Mailing list: https://launchpad.net/~fuel-dev
> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~fuel-dev
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Andrew
Mirantis
Ceph community

References