[noctool-devel] compact configurations for identical machines
Ingvar
ingvar at hexapodia.net
Thu May 29 06:49:56 UTC 2008
Jim writes:
> I'm still thinking about this one...
>
> > Or, wait, even better!
> >
> > Does this look at least vaguely sane?
> > (cluster ("rtr-~3,'0d" 1 10)
> > (machine name linux-host
> > (user "testuser")))
>
> Using your example from earlier, how would we specify something like
> "rtr-f01-001" through "rtr-f03-999". This is *different* than your
> objection to my initial syntax - what in the heck would a format string
> look like if this were actually trying to specify 3000 or so routers... (*
> OK, imagine we're either not FORMAT ninjas or we're using something that
> doesn't make julienne fries in addition to printing, like C's printf ;)
> I UNDERSTAND IT IS POSSIBLE TO CURE CANCER WITH A SINGLE INVOCATION OF
> FORMAT ;) *)
At the moment? A bit tricky, methinks. But, just ABOUT doable, I think:
(cluster ("rtr-f~2,'0d-~~3,'0d" 1 3 fmtstr)
(cluster (fmtstr 1 999)
(machine name linux-host
(user "testuser"))))
If/when I finish a simplistic converter from C-style format strings, it'd be
slightly easier, as you can have one as "C-style" and one as "lisp-style" and
not need the double-escaping.
> This seems like a better place to screw things up royally than I had
> initially anticipated :P :) Its going to be difficult to get this right
> I'm thinking...
>
> *To get something working*, I'm thinking we should just accept a format
> string something like Ingvar's suggestion quoted above. There are,
> hopefully, more interesting problems to solve. :)
Mmmm. I actually left the (cluster ...) as is, just so having
"cluster-in-cluster" would be an option (most of the time, I don't think it'll
be needed but I suspect we'll have to write some config documentation, one of
these days, and having the "cluster" bit in the cookbook might well be a Good
Thing).
//Ingvar
More information about the Noctool-devel
mailing list