pcp
[Top] [All Lists]

Re: [pcp] First Cut at Avahi Support for PCP Servers

To: Dave Brolley <brolley@xxxxxxxxxx>
Subject: Re: [pcp] First Cut at Avahi Support for PCP Servers
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Tue, 8 Oct 2013 04:38:16 -0400 (EDT)
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <5251DF3C.7040805@xxxxxxxxxx>
References: <5251DF3C.7040805@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: 3sNxQRXVwdc5zJ+RFEjGdTHOsMsSWw==
Thread-topic: First Cut at Avahi Support for PCP Servers
Hey Dave,

----- Original Message -----
> Hi All,
> 
> I wanted to run this past you all for comments before committing or
> pushing anything. It's code that enables PCP server's to announce
> themselves over the local network using Avahi, if available.
> 
> o Most of the new code is in the file avahi.c which would be part of
> libpcp (src/libpcp/src/avahi.c).
> o This code is accessed via the new API functions
> __pmServerAdvertisePresence() and __pmServerUnadvertisePresence().
> o The Avhahi code is compiled out if the necessary Avahi
> headers/libraries are not available.
> o As en example, in the patch, the new API functions are called from PMCD.

Initial thoughts are - does this belong in libpcp?  Thinking maybe not;
given Avahi is unlikely to be the only auto-discovery model, perhaps we
need a libpcp_discover with an API hiding alternate discovery models
(and perhaps a SASL-like config model for configuring the discovery
mechanisms to be used).

Other folks tend to have lotsa different ways to do host discovery -
https://www.zabbix.com/documentation/2.0/manual/discovery/network_discovery/rule
- and the one sysadmin I've chatted to about this stuff :) points out
that in his clouded environment, Avahi is a non-starter (apparently
thats likely to be the case in all/most clouds).

This hypothetical new library might also contain discovery-mechanism-
specific code for catching the advertisement events and responding to
them, in a mechanism-independent way?  (so that this doesn't leak out
into other areas of the code base).

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>