-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v6r20] MultiVO TransformationSystem #3723
Conversation
d416f69
to
eb3473b
Compare
@@ -110,6 +111,27 @@ def execute(self): | |||
""" | |||
|
|||
operationsOnTransformationDict = {} | |||
owner, ownerGroup, ownerDN = None, None, None | |||
# getting the credentials for submission | |||
if getProxyInfo(False, False)['OK']: # there is a shifterProxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you name the parameters please ?
owner, ownerGroup, ownerDN = None, None, None | ||
# getting the credentials for submission | ||
if getProxyInfo(False, False)['OK']: # there is a shifterProxy | ||
res = getProxyInfo(False, False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could call that only once for the test and the result ?
|
||
if not requestClient: | ||
self.requestClient = ReqClient() | ||
self.requestClient = ReqClient(useCertificates=useCertificates, | ||
delegatedDN=ownerDN, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pfiou :-) Have you seen this actually used somewhere, or do you just trust the comments I've put a couple of years ago ? :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact I am not sure how this works.
Do you set the ownerDN and the ownerGroup of the Request somewhere ? If not, it tries to get it from proxyInfo, which would not do anything now if I understand properly.
However, with the rpcStub fix that was merged lately, I am not sure of what will happen with these delegatedDN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean these comments? 🤣
DIRAC/Core/DISET/private/BaseClient.py
Lines 52 to 53 in 6926fc6
:param delegatedDN: Not clear what it can be used for. | |
:param delegatedGroup: Not clear what it can be used for. |
I saw those, laughed, looked at git
I also thought about the stub changes and rebased my developments yesterday, things are still working.
The ownerDN/group of the requests are (already) set in the RequestTasks TaskManager
DIRAC/TransformationSystem/Client/TaskManager.py
Lines 267 to 282 in 6926fc6
def _assignRequestToTask(self, oRequest, taskDict, transID, taskID, ownerDN, ownerGroup): | |
"""set ownerDN and group to request, and add the request to taskDict if it is | |
valid, otherwise remove the task from the taskDict | |
:param oRequest: Request | |
:param dict taskDict: dictionary of tasks, modified in this function | |
:param int transID: Transformation ID | |
:param int taskID: Task ID | |
:param str ownerDN: certificate DN used for the requests | |
:param str onwerGroup: dirac group used for the requests | |
:returns: None | |
""" | |
oRequest.RequestName = self._transTaskName(transID, taskID) | |
oRequest.OwnerDN = ownerDN | |
oRequest.OwnerGroup = ownerGroup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:D yes, these.
Good that it works. Not sure what you are praising though ! :D
fbcc138
to
c3655cc
Compare
The looks OK to me, but you need to add info here: https://github.com/DIRACGrid/DIRAC/wiki/DIRAC-v6r21 and in the documentation, both the technical docu of the agents and in the /docs part. |
What do you mean with technical doc ? configuration parameters etc? |
c3ae97c
to
47edd83
Compare
For proper working of the RTA we need a fix for #3727 |
47edd83
to
a9934cf
Compare
Yes I meant what you have done: config parameters inside the code. |
9fd701c
to
e278278
Compare
Added the config like parameter descriptions for direct comparison, will remove the other one later on. https://diracsailer.readthedocs.io/en/multivosquashed/CodeDocumentation/TransformationSystem/Agent/RequestTaskAgent.html (clear your cache if you don't see it) Also realised that the doc was wrong two options are actually UpdateFilesStatus and UpdateTasksStatus... |
@@ -254,12 +247,28 @@ def _getClients(self): | |||
return {'TransformationClient': threadTransformationClient, | |||
'TaskManager': threadTaskManager} | |||
|
|||
def _getDelegatedClients(self, ownerDN=None, ownerGroup=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you simply modify _getClients()
instead of adding one more function? For extensions is one less thing to extend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, moved the parameters into _getClients
@atsareg any comment for the layout of the parameters? table vs config like structure? |
1fbef5f
to
46f1769
Compare
Will be rebased on v6r20 |
43ebb78
to
9cb36a9
Compare
…cept operation is used in the except block
TaskManagerAgentBase: add option ShifterCredentials to set the credentials to use for all submissions, this is single VO only TaskManagerAgentBase: WorkflowTasks/RequestTasks: pass ownerDN and ownerGroup parameter to all the submission clients if using shifterProxy ownerDN and ownerGroup are None thus reproducing the original behaviour TaskManagerAgentBase: refactor adding operations for transformation to separate function to ensure presence of Owner/DN/Group in dict entries
execute is running after _execute(?), so we need to find ShifterCredentials in initialize
…g template like structure
9cb36a9
to
830d860
Compare
These changes make the WorkflowTaskAgent and RequestTask agent work without a shifterProxy by setting the owner as the delegatedDN/group for all the submission clients to the WMS and RMS.
This should be completely optional. If shifterProxy is set things should work as before.
Plus some refactoring and minor fixes
Addresses #3695