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

Trying to upgrade to a more recent Defectdojo version using an old godojo version #91

Closed
alexbrenes opened this issue Jun 27, 2024 · 1 comment

Comments

@alexbrenes
Copy link

Hello.

I am trying to upgrade my Defectdojo server, but I have faced multiple issues with Python's version.

I am currently using Defectdojo v2.19.2 and I wanted to move to v2.35.3. The 2.19.2 version was installed with no problem in Ubuntu 22.04, using Python 3.10.

Since I am using godojo for the installation, the Python's version was a huge problem, but at the end I was able to solve the issues. What I have not been capable to solve is when I execute dojo-start, it uses /opt/dojo/lib/python3.10 instead of Python3.11. This behavior provokes multiple errors.

I manually ran the dojo-start commands to check out the error, here is the head:

/opt/dojo/django-DefectDojo$ C_FORCE_ROOT="true" celery -A dojo worker -l info --concurrency 3
[27/Jun/2024 21:45:05] ERROR [celery.utils.dispatch.signal:280] Signal handler <bound method DjangoFixup.on_import_modules of <celery.fixups.django.DjangoFixup object at 0x7fb680640280>> raised: TypeError("catch_warnings.__init__() got an unexpected keyword argument 'action'")
Traceback (most recent call last):
  File "/opt/dojo/lib/python3.10/site-packages/celery/utils/dispatch/signal.py", line 276, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/opt/dojo/lib/python3.10/site-packages/celery/fixups/django.py", line 100, in on_import_modules
    self.worker_fixup.validate_models()
  File "/opt/dojo/lib/python3.10/site-packages/celery/fixups/django.py", line 138, in validate_models
    self.django_setup()
  File "/opt/dojo/lib/python3.10/site-packages/celery/fixups/django.py", line 134, in django_setup
    django.setup()
  File "/opt/dojo/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/opt/dojo/lib/python3.10/site-packages/django/apps/registry.py", line 116, in populate

It should be running using Python3.11. How can I replace the Python it should use?

@mtesauro
Copy link
Collaborator

@alexbrenes
You have to install an updated version of Python along side the one that ships with Ubuntu 22.04.

The lag between distro Python's and those that DefectDojo is one of the reasons (along with updates being tricky at best) that we're going to deprecating godojo - see the GH discussion at:
DefectDojo/django-DefectDojo#11199
in the "Future Deprecation: Iron installs via godojo" section.

Best I can say is search online for a way to add a more recent Python version to your Ubuntu install and then you'll have to update or change out the virtualenv that DefectDojo uses in /opt/dojo/

I did accommodate fresh installs using a different Python version that you've pre-installed with godojo release 1.2.4 but trying to make that work on upgrades isn't really feasible without a substantial investment in time end effort that doesn't make sense given godojo is being deprecated.

HTH

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

No branches or pull requests

2 participants