Skip to content
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

Question: Tags/RequiredTags added twice to pilot.cfg #197

Closed
aldbr opened this issue Jul 3, 2023 · 3 comments · Fixed by #198
Closed

Question: Tags/RequiredTags added twice to pilot.cfg #197

aldbr opened this issue Jul 3, 2023 · 3 comments · Fixed by #198

Comments

@aldbr
Copy link
Contributor

aldbr commented Jul 3, 2023

Not a real issue, just a question related to DIRACGrid/DIRAC#7086

Tags/RequiredTags are added both in /LocalSite and /Resources/Computing/CEDefaults. Is that expected?

See here:

for queueParamName, queueParamValue in self.pp.queueParameters.items():
if isinstance(queueParamValue, list): # for the tags
queueParamValue = ",".join([str(qpv).strip() for qpv in queueParamValue])
self.cfg.append("-o /LocalSite/%s=%s" % (queueParamName, quote(queueParamValue)))

And here:

self.pp.tags = list(set(self.pp.tags))
if self.pp.tags:
self.cfg.append('-o "/Resources/Computing/CEDefaults/Tag=%s"' % ",".join((str(x) for x in self.pp.tags)))
self.pp.reqtags = list(set(self.pp.reqtags))
if self.pp.reqtags:
self.cfg.append(
'-o "/Resources/Computing/CEDefaults/RequiredTag=%s"' % ",".join((str(x) for x in self.pp.reqtags))
)

Thanks

@fstagni
Copy link
Contributor

fstagni commented Jul 3, 2023

Looks to me that they are only added in

self.pp.tags = list(set(self.pp.tags))
if self.pp.tags:
self.cfg.append('-o "/Resources/Computing/CEDefaults/Tag=%s"' % ",".join((str(x) for x in self.pp.tags)))
self.pp.reqtags = list(set(self.pp.reqtags))
if self.pp.reqtags:
self.cfg.append(
'-o "/Resources/Computing/CEDefaults/RequiredTag=%s"' % ",".join((str(x) for x in self.pp.reqtags))
)

??

@aldbr
Copy link
Contributor Author

aldbr commented Jul 3, 2023

self.pp.tags is created from resourceDict here:

self.pp.tags += resourceDict["Tag"]

And self.pp.queueParameters is also created from resourceDict and then used to feed self.cfg with /LocalSite options:

self.pp.queueParameters = resourceDict
for queueParamName, queueParamValue in self.pp.queueParameters.items():
if isinstance(queueParamValue, list): # for the tags
queueParamValue = ",".join([str(qpv).strip() for qpv in queueParamValue])
self.cfg.append("-o /LocalSite/%s=%s" % (queueParamName, quote(queueParamValue)))

Am I wrong?

@fstagni
Copy link
Contributor

fstagni commented Jul 4, 2023

Bof, anyway the 2 locations are rather equivalent, so leave 1 only (none of them is obviously better than the other)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants