Hey Udo, udo waechter wrote: > Hi, > On 03.10.2008, at 19:15, Luke Kanies wrote: > >> >> On Oct 3, 2008, at 4:37 AM, udo waechter wrote: >>>>> >>>>> I would like to know how I could have many hosts export the >>>>> "same" (as in identical) resource. Is this possible? >>>> >>>> As with non-exported resources, you can't have multiple instances of >>>> the same resource. How would it even make sense to have multiple >>>> hosts trying to create the same file on a given machine? Who would >>>> win? >>> Well, in this case I have one host that is the "master". Some or all >>> of the other hosts might need to trigger a certain configuration on >>> the "master". >>> This special case here is: Create a file that represents a template >>> for a queue. A queue might contain one host, or many. >>> I do not want to configure this resource on two hosts (the master >>> and all clients), but only on one (i.e. the "clients"). >>> >>> In this case there would be "at least one host" who configures (one >>> file on) another host. The question that I have still remains. Is >>> this somehow possible? >> >> I'm still unclear on exactly what you're trying to do -- are you >> trying to get information from each generating host into the file? If >> so, use file fragments and join them on the server. >> >> If not, can you explain more clearly? >> > Sorry for the unclearness. The content of the file on the server is > the same, no matter which host exports it. There might be more of > these files (for different queues, and then with different content). I > do want to configure queues for the Sun Grid Engine. For this I need a > template on the Gridmaster host. Hosts can be members of different > queues (at least one). Each of the queues will be configured by > exactly one template. > > What I want to achieve is: Have a define (called "sge::queue", see my > initial post on this topic) that is called on a (at least one) host. > > for example > > node client1, client2, client3{ > sge::queue{"testqueue": ....} > } One approach would be to have each client export a fragment of information needed by the master to create the queue. The define would have to be per host though and the queue would be an attribute of the sqe::queue define i.e.
node client1, client2, client3 { sge::queue{"$hostname: queue => "testqueue", template=>"$hostnam_queue_frag.erb" } You would probably want to have the define place the fragments into a temp directory based on the queue name. In order to build the queue file on the master server, simply collect the resources and have an exec piece together the file from the fragments. If you have multiple masters serving different queues you could even specify the queue when collecting the exported resources: Sge::queue<<| queue == "testqueue"|>> > > This should result in a file on the Gridmaster: > queue.template_testqueue that contains the configuration for the queue > (the "template" mentioned above.) This template is then used by the > gridmaster to configure the "testqueue"-queue. Since more than one > host can be in the testqueue, the "define sge::queue" would try to > create the template more than once. > > I can not create the template once on the gridmaster, since I do not > know how many hosts are in a queue beforehand. > > I need this as a file, since the tools to configure the grid engine > allow me to manage queues only by such a file. I can not set > parameters directly. > The above approach should work for your requirements. > I have classes called sge::exechost and sge::submithost and > sge::master that do configure execution hosts (those that compute > stuff), submit hosts (those that can submit jobs) and the master host, > that manages the grid engine and does the scheduling of jobs. > > A execution host has to be the member of at least one queue. > Perhaps, when you have this all working you can put together as a module and share it with the community. > > I hope that things are clearer now. > Thanks again, > udo. > > Let me know how it goes, -teyo -- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---