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

Incorrect args for worker pods #111

Closed
kurokobo opened this issue Aug 1, 2023 · 3 comments · Fixed by #118
Closed

Incorrect args for worker pods #111

kurokobo opened this issue Aug 1, 2023 · 3 comments · Fixed by #118

Comments

@kurokobo
Copy link
Contributor

kurokobo commented Aug 1, 2023

With the latest quay.io/ansible/eda-server:main, worker pod failed to start with following error:

$ kubectl -n eda logs eda-worker-694fc4d474-4f85b
Traceback (most recent call last):
  File "/app/venv/bin/aap-eda-manage", line 6, in <module>
    sys.exit(main())
  File "/app/src/src/aap_eda/manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/app/venv/lib64/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/app/venv/lib64/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/app/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/app/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/app/venv/lib64/python3.9/site-packages/django_rq/management/commands/rqworker.py", line 120, in handle
    w = get_worker(*args, **worker_kwargs)
  File "/app/venv/lib64/python3.9/site-packages/django_rq/workers.py", line 50, in get_worker
    worker_class = get_worker_class(kwargs.pop('worker_class', None))
  File "/app/venv/lib64/python3.9/site-packages/django_rq/workers.py", line 36, in get_worker_class
    worker_class = import_attribute(worker_class)
  File "/app/venv/lib64/python3.9/site-packages/rq/utils.py", line 220, in import_attribute
    attribute_owner = getattr(module, attribute_owner_name)
AttributeError: module 'aap_eda.core.tasking' has no attribute ''

There is no longer aap_eda.core.tasking.Worker class (via ansible/eda-server#318)

- aap-eda-manage rqworker --with-scheduler --worker-class aap_eda.core.tasking.Worker

Not tested well on my side but it seems to be aap_eda.core.tasking.DefaultWorker.

Sorry for the messy note 😥

@kurokobo
Copy link
Contributor Author

kurokobo commented Aug 2, 2023

Ah, I'm not (yet) familier with architecture of EDA Server, but DefaultWorker is for non-activation tasks, and ActivationWorker is for activation related tasks, so are both of them required for fully functional EDA Server?

In the current implementation, this Operator deploy worker based on single deployment, but should it be two sepalated deployment, I guess.

@kurokobo
Copy link
Contributor Author

kurokobo commented Aug 2, 2023

Related to: ansible/eda-server#330

@kurokobo
Copy link
Contributor Author

kurokobo commented Aug 4, 2023

Adding image and image_version with specific (old) tag is the temporary workaround for this issue.

spec:
  ...
  image: quay.io/ansible/eda-server
  image_version: sha-a6e4d66  # This is the latest image that still contains aap_eda.core.tasking.Worker class
  ..

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.

1 participant