CS copy section

7 views
Skip to first unread message

Stéphane Poss

unread,
Oct 7, 2014, 9:09:35 AM10/7/14
to diracgri...@googlegroups.com
Hi,
I'd like to know how I can copy a given section and rename the copy (like what is done in the web interface), but python wise?
The reason is as follows: I need to have 2 /Systems sections, one for when my EC2 server is running, and 1 without. I want to script the starting of said server and thus also automatically change the CS (copy, not move, /Systems_amazon to /Systems). I can't see in the CSAPI any method which looks like that...
Of course, this wouldn't be needed if the RPCClient would check if the URL is listening...

Cheers,
S Poss.

Andrei Tsaregorodtsev

unread,
Oct 7, 2014, 9:15:17 AM10/7/14
to diracgri...@googlegroups.com
  Why not you just use 2 different setups ?

  Andrei
--
You received this message because you are subscribed to the Google Groups "diracgrid-develop" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diracgrid-deve...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stéphane Poss

unread,
Oct 7, 2014, 9:29:53 AM10/7/14
to diracgri...@googlegroups.com
Hum, good point... I have to think about it.

Stéphane Poss

unread,
Oct 7, 2014, 9:52:42 AM10/7/14
to diracgri...@googlegroups.com
Ok, so there is one problem with that: I need to change the Setup on the central server too so that it also picks up the new URLs. This implies I need to change the dirac.cfg of the machine... The copy of the section has the advantage that I only need to restart the services/agents... Is there a way in the SystemAdmin to alter the machine's dirac.cfg?


Cheers, and thanks for the input,
SP.

Andrei Tsaregorodtsev

unread,
Oct 7, 2014, 11:12:32 AM10/7/14
to diracgri...@googlegroups.com
  You can just start the services/agents with the -o /DIRAC/Setup=<currently_needed_setup>. Or you can have two version of dirac.cfg and
swap them as necessary. But I do not know how your clients will know which setup to use. I must admit this is a rather tricky case.

  Anderi

Stéphane Poss

unread,
Oct 7, 2014, 11:20:48 AM10/7/14
to diracgri...@googlegroups.com
With either solutions you propose, I need to change the files on the machine, either the run files or the dirac.cfg... This isn't very nice... Clearly the second would be the 'best'. But it's still ugly and I'd rather be able to mimic what can be done in the portal when copying a section...

I don't have any clients, as no one submits jobs directly. Jpobs are inserted in a DB and I have an agent that looks for new things to do. So this isn't really a concern yet. It will become one if I start to submit jobs from the clients directly...

Cheers,
SP

Stéphane Poss

unread,
Oct 8, 2014, 3:15:59 AM10/8/14
to diracgri...@googlegroups.com
Hi,
Seems the Modificator is what I was looking for...

Cheers,
S Poss.
Reply all
Reply to author
Forward
0 new messages