[noctool-devel] compact configurations for identical machines
Ingvar
ingvar at hexapodia.net
Thu May 22 06:23:52 UTC 2008
Jim writes:
> I was thinking about what a bear it will be to have to specify each of my
> compute node systems in my clusters individually.
>
> I was thinking about syntax such as the following that would create an
> equipment object for each of 256 hosts named l001 through l256.
>
> (machine-cluster "LosLobos" linux-host
> (user "download")
> (disks
> (disk "/dev/sda1" 80 95))
> (machinerange "l001-l256"))
It is definitely a cool idea. I am not ENTIRELY sure what the best syntax for
the name range would be, but it's definitely something that would be handy for
many users.
> What do y'all think? Is there a better way to do this? Something like
> this would reduce the size of my shop's config file a couple orders of
> magnitude - in turn, I'd screw things up accordingly less often :)
At the moment, you could PROBABLY use LOOP and friends, but that'd be icky.
The whole config file is a chain of macros expanded to code generating
configuration objects. On further consideration, no, you can't (yes, I tested,
no you're not supposed tio, it seems it worked...).
I was actually thinking, the other day, that the current config-nesting only
allows a nested macro to use a single context and I was trying to thing of a
use-case where one would want stuff nested in more than one and now I have one.
I'll get the changes necessary for defnested sorted before heading off to
work. I suspect a workable method for naming the individual hosts would be a
"member-name" config stanza, taking (say) a format-string (either C or CL, we
should eb able to compile the former to the latter), a start number and an end
number. I feel that making sure you do the right thing for something like
"l001-l256" is just plain hard in the general case.
Imagine trying t figure out how many hosts and what they SHOULD be called when
faced with something like "rtr-f01-001-rtr-f03-999". Is that 999 routers, 333
named "...f01...", 3 routers, named "...f01-001", "f02-500" and "...f03-999"
or 2997 routers? I could make a case for all of those. :) I also suspect we
only want to support a single range, to make things MUCH easier.
//Ingvar
More information about the Noctool-devel
mailing list