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

If no drones are running, but drone_registry contains non-existent drones, Tardis crashes #86

Closed
olifre opened this issue Sep 28, 2019 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@olifre
Copy link

olifre commented Sep 28, 2019

Stacktrace:

root: 2019-09-28 12:15:28 Destroying VM with ID 7132
cobald.runtime.runner.asyncio: 2019-09-28 12:15:28 runner aborted: <cobald.daemon.runners.asyncio_runner.AsyncioRunner object at 0x7f746d6e70b8>
Traceback (most recent call last):
  File "/opt/cobald/lib64/python3.6/site-packages/tardis/adapters/sites/htcondor.py", line 149, in handle_exceptions
    yield
  File "/opt/cobald/lib64/python3.6/site-packages/tardis/agents/siteagent.py", line 45, in terminate_resource
    return await self._site_adapter.terminate_resource(resource_attributes)
  File "/opt/cobald/lib64/python3.6/site-packages/tardis/adapters/sites/htcondor.py", line 138, in terminate_resource
    response = AttributeDict(pattern.search(response.stdout).groupdict())
AttributeError: 'NoneType' object has no attribute 'groupdict'

The cause should be that:

response = await self._executor.run_command("condor_submit", stdin_input=submit_jdl)
pattern = re.compile(r"^.*?(?P<Jobs>\d+).*?(?P<ClusterId>\d+).$", flags=re.MULTILINE)
response = AttributeDict(pattern.search(response.stdout).groupdict())

does not check if pattern.search is a NoneType before using it.

CC @wiene

@giffels giffels added bug Something isn't working duplicate This issue or pull request already exists labels Oct 1, 2019
@giffels
Copy link
Member

giffels commented Oct 1, 2019

Thanks for reporting. Same as #82

@giffels giffels closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants