[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Is there a way to clone host definitions in bb-hosts?
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Is there a way to clone host definitions in bb-hosts?
- From: "John Burk" <john.d.burk (at) gmail.com>
- Date: Tue, 10 Jun 2008 21:46:34 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Gs3euTrrDUaMR3FJGzkfClbMJ82BAY6A1LC8WbrWElI=; b=aYyuIQ7kZVlfPtZ0GT9zkifGzBTgq+1W9/e2rRv0eGDn+DjNJLFg+PXXeIf1r58jvE +IwUb+wY/MLhnUSo42SSWUp4KsGRciWbaWyEKS0af8jatoW6G6sGNXSBzkpAyWGnRm71 mYae8FAacB/VxbyGjSZVu+BBuBMH09jutuYH8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=x1vbtQ5G3ghm7X381wfg/tTNPFRjmWn9NQlm72Dlcl8PXltR0J3LsIJUaatRPMXk+M csj3UoQFXuk1GKh8XV5w8rZDfp0KY/bp4TWq9uOUdiZkUh1nlM+of7OrQdz2Jae7rPsE 7ZNybOdkzOphc2rZJ0iq2RuNLsNkA1KR6cSTk=
- References: <4608520a0806101629k6edd1ee6y61d7e18c0b28f402 (at) mail.gmail.com> <484F3CD1.6050309 (at) cox.net> <484F40C2.9050004 (at) cox.net> <4608520a0806102038v49f0f02apad1a7f29674806e6 (at) mail.gmail.com>
Oh well... would have been nice.
Might be something to add as a feature request. I've been doing
clusters for quite a few years now, and have seen the size of them
increase from commonly less than a hundred hosts to 1000+ in the last
few years. 1000+ is not out of the ordinary now, whereas even 3 years
ago one I did that was 350 hosts would have wound up around #115 in
the top 500 supercomputer list (or so the IBM tech who came by to see
it told me). When the cluster sizes grow like this, the config files
can get kind of unwieldy without some sort of template syntax.
It's too bad there's also not a feature to pull the addr's from the
dns or some other resolution mechanism, and an expression syntax to
define a range of hosts, eg, if you had hosts node0001-node1500, you
could express it in one line as:
+ node[0001-1500] # conn NOPROPRED:+cpu
where the "+" (or some other token) would tell hobbit to do an address
lookup instead of pulling it from the bb-hosts file.
Barring that, the cluster mgmt s/w I use does use a similar type of
syntax for host range definition, and I can always use the cmd-line
tools from that to list the host info for the cluster, then pipe that
through awk/sed and build the client include files on the fly, but it
harks back to the days of perl one-liners. Not that that's
necessarily a bad thing...
johnB
2008/6/10 John Burk <john.d.burk (at) gmail.com>:
> Sweet. This is exactly what I was looking for.
>
> I'll experiment tomorrow and see if the var (guess I'll have to start
> calling it a macro) can be defined in the body of bb-hosts and still
> be evaluated correctly in the include files that contain the client
> entries. I'm guessing it will since the section of the hobbit-alerts
> manpage that deals with macros mentions that macros can be nested, but
> that the inner macro must be defined first. This leads me to believe
> that the config file parser reads line-by-line evaluating as it goes.
>
> I'm just going to get started in the next day or two with alerts
> within hobbit, hence my unfamiliarity with macros. I had quickly
> scanned the hobbit-alerts manpage today but had missed the
> significance of the section on macros, mainly because it looked at
> first glance to be regex evaluation; the example with
> "$WEBHOSTS=%(www|intranet|support|mail).foo.com" caught my eye. Does
> the leading '%' always signify some sort of regular expression in
> hobbit?
>
>
> johnB
>
> 2008/6/10 Tim McCloskey <devzero (at) cox.net>:
>> So I was curious about the whole macro thing and decided to test it out. It
>> has only been a few minutes but the following seems to work fine. I hope
>> this helps in some way.
>>
>>
>>
>> bb-hosts:
>>
>> $foo="dns"
>> ipaddress servername # $foo
>>
>>
>> Regards,
>>
>> Tim
>>
>>
>>
>> Tim McCloskey wrote:
>>>
>>> As mentioned, perhaps someone with knowledge on the topic can answer.
>>>
>>> To extend the question further, since macros (variables) are able to be
>>> used within the hobbit-alerts.cfg file I wonder if variables can be assigned
>>> in bb-hosts and hobbit-clients.cfg? At one point I thought of trying to
>>> keep all of our host/client/alerts data within mysql, but it was only a
>>> thought.
>>>
>>> Regards,
>>> Tim
>>>
>>>
>>> John Burk wrote:
>>> I'm using includes in my bb-hosts to keep the file
>>>>
>>>> length down, but my included files are comprised of hundreds of hosts
>>>> all identical except for the ipaddresses and hostnames.
>>>>
>>>> Surely there must be a way to template this, I just can't find it in
>>>> the bb-hosts manpage...
>>>
>>> ...
>>>>
>>>> and so on in mind-numbing repetition...
>>>> ==============================
>>>>
>>>> I'd like to be able to define the tags in a template, and simply use
>>>> that template. Does this mechanism exist in bb-host? That way
>>>> if/when I need to change the tags for all my hosts, I only need to do
>>>> it in one place, and not on every line in 3 different files.
>>>
>>>
>>>
>>> To unsubscribe from the hobbit list, send an e-mail to
>>> hobbit-unsubscribe (at) hswn.dk
>>>
>>>
>>>
>>
>>
>> To unsubscribe from the hobbit list, send an e-mail to
>> hobbit-unsubscribe (at) hswn.dk
>>
>>
>>
>