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

Installing monitoring of a task is failing #970

Closed
benoit74 opened this issue May 17, 2024 · 2 comments
Closed

Installing monitoring of a task is failing #970

benoit74 opened this issue May 17, 2024 · 2 comments
Labels

Comments

@benoit74
Copy link
Collaborator

benoit74 commented May 17, 2024

See https://farm.openzim.org/pipeline/4c6cbc3a-8cb8-4428-a539-4d68f8ca7a0e/debug issues

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/docker/api/client.py", line 265, in _raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.45/containers/create?name=monitor_4c6cb

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/task-worker", line 60, in main
    sys.exit(worker.run())
             ^^^^^^^^^^^^
  File "/usr/src/app/task/worker.py", line 740, in run
    self.start_monitor()
  File "/usr/src/app/task/worker.py", line 301, in start_monitor
    self.monitor = start_monitor(
                   ^^^^^^^^^^^^^^
  File "/usr/src/app/common/docker.py", line 328, in start_monitor
    return run_container(
           ^^^^^^^^^^^^^^
  File "/usr/src/app/common/docker.py", line 92, in run_container
    return retried_docker_call(docker_client.containers.run, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/app/common/docker.py", line 61, in retried_docker_call
    raise exc
  File "/usr/src/app/common/docker.py", line 50, in retried_docker_call
    return docker_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/docker/models/containers.py", line 873, in run
    container = self.create(image=image, command=command,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/docker/models/containers.py", line 932, in create
    resp = self.client.api.create_container(**create_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/docker/api/container.py", line 439, in create_container
    return self.create_container_from_config(config, name, platform)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/docker/api/container.py", line 456, in create_container_from_config
    return self._result(res, True)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/docker/api/client.py", line 271, in _result
    self._raise_for_status(response)
  File "/usr/local/lib/python3.12/site-packages/docker/api/client.py", line 267, in _raise_for_status
    raise create_api_error_from_http_exception(e) from e
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation) from e
docker.errors.APIError: 500 Server Error for http+docker://localhost/v1.45/containers/create?name=monitor_4c6cb: Internal Server Error ("plugin no-trivial-root failed with error: AuthZPlugin.AuthZReq: --cap-add not allowed")
@benoit74 benoit74 added the bug label May 17, 2024
@rgaudin
Copy link
Member

rgaudin commented May 17, 2024

pixelmemory does not support monitoring which requires additional permissions

@benoit74
Copy link
Collaborator Author

And the fact that we need tohave a flag somewhere which would prevent starting a monitored task on a worker not supporting it is tracked in #741

@benoit74 benoit74 closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants