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

Badly handled error in SiteDirector #7338

Closed
chrisburr opened this issue Dec 5, 2023 · 1 comment · Fixed by #7788
Closed

Badly handled error in SiteDirector #7338

chrisburr opened this issue Dec 5, 2023 · 1 comment · Fixed by #7788
Assignees
Milestone

Comments

@chrisburr
Copy link
Member

One of the LHCb SiteDirectors had a separate issue which then resulted in a crash in DIRAC:

Traceback (most recent call last):
  File "/opt/dirac/versions/v11.0.24-1700482381/Linux-x86_64/lib/python3.11/site-packages/DIRAC/Core/Base/AgentModule.py", line 310, in am_secureCall
    result = functor(*args)
             ^^^^^^^^^^^^^^
  File "/opt/dirac/versions/v11.0.24-1700482381/Linux-x86_64/lib/python3.11/site-packages/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py", line 331, in execute
    result = self.submitPilots()
             ^^^^^^^^^^^^^^^^^^^
  File "/opt/dirac/versions/v11.0.24-1700482381/Linux-x86_64/lib/python3.11/site-packages/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py", line 457, in submitPilots
    res = self._submitPilotsToQueue(pilotsToSubmit, ce, queueName)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/dirac/versions/v11.0.24-1700482381/Linux-x86_64/lib/python3.11/site-packages/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py", line 748, in _submitPilotsToQueue
    submitResult = ce.submitJob(executable, "", pilotsToSubmit)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/dirac/versions/v11.0.24-1700482381/Linux-x86_64/lib/python3.11/site-packages/DIRAC/Resources/Computing/SSHComputingElement.py", line 550, in submitJob
    result = self._submitJobToHost(submitFile, numberOfJobs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/dirac/versions/v11.0.24-1700482381/Linux-x86_64/lib/python3.11/site-packages/DIRAC/Resources/Computing/SSHComputingElement.py", line 597, in _submitJobToHost
    if result["Status"] != 0:
       ~~~~~~^^^^^^^^^^
TypeError: string indices must be integers, not 'str'

where result was

Traceback (most recent call last):
  File "/home/dirac/execute_batch", line 354, in <module>
    result = getattr(batch, method)(**inputDict)
  File "/home/dirac/execute_batch", line 102, in submitJob
    jdlFile.write(
  File "/usr/lib64/python3.9/tempfile.py", line 478, in func_wrapper
    return func(*args, **kwargs)
TypeError: a bytes-like object is required, not 'str'
@fstagni fstagni self-assigned this Dec 5, 2023
@fstagni fstagni added this to the v8.0 milestone Dec 5, 2023
@chrisburr
Copy link
Member Author

There is another bug than #7340 that result might not be a dict for if result["Status"] != 0:

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