[Integration] Modify dirac-admin-get-pilot-output to get remote pilot log #7105
Conversation
eb6b989 to
7ef7644
Compare
968bc9a to
5079df4
Compare
|
|
||
| ############################################################################# | ||
| def getJobPilotOutput(self, jobID, directory=""): | ||
| def getJobPilotOutput(self, jobID, directory="", remote=False): |
There was a problem hiding this comment.
Somehow it does not feel right that user would have to decide about this (seems too low level to be exposed at API level)
There was a problem hiding this comment.
What would be an other option? If it is used in an Dirac-admin command then it is an expert route. The intention was to have a classic log retrieval mechanism a default one, and the external log retriever only used in special cases, no?
There was a problem hiding this comment.
Then things can be tried in this order?
There was a problem hiding this comment.
We could try to get logs in a specific order: classic then remote. The specific order could even be configurable on the server. The point is, that if someone ever wants to test the remote log retrieval and the classic logs come first, then there is no way to get the remote logs by using a dirac-admin command line if we drop the -r flag.
So my proposal is:
- remove the
-rflag - set the default order to classic/remote
- add a config flag to the CS
(remoteLogsPriority=True)or similar. DefaultFalse.
|
You would need to rebase and fix the conflicts. |
e4de37d to
7c8eed5
Compare
|
I rebased, but there are some strange errors I don't recognise... |
7c8eed5 to
1639db7
Compare
| lfn = os.path.join(uploadPath, pilotStamp + ".log") | ||
| sLog.info("LFN to download: ", lfn) |
There was a problem hiding this comment.
Is this really an LFN? Looks like just a path to a file to me.
There was a problem hiding this comment.
It is. It is passed to getFile later
There was a problem hiding this comment.
I am afraid we have been using this pattern in other places, but os.path is not the most precise way to manipulate/create LFNs, as this is OS-dependent. We might argue that we only run on Linux so it does not really matter, but more precise would be to at least to use posixpath instead (@chaen and @atsareg might comment)
c026d53 to
705f6b5
Compare
45f05a1 to
6611f60
Compare
6611f60 to
21f3471
Compare
BEGINRELEASENOTES
*WMS
NEW: Enhance dirac-admin-get-pilot-output to download remote pilot logs. Currently only from a SE.
ENDRELEASENOTES
Changes are:
dirac_admin_get_pilot_output.py- add a -r switch to get remote pilot logs rather than classic ones.DiracAdmin.pyto call a service method for remote logsPilotManagerHandler.pyto load a plugin for pilot logs retrieval.FileCacheDownloadPlugin.pya plugin to download a log file and return it to a client