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

Ubuntu 22.04 upgrade #1114

Closed
DawoudSheraz opened this issue Aug 20, 2024 · 5 comments
Closed

Ubuntu 22.04 upgrade #1114

DawoudSheraz opened this issue Aug 20, 2024 · 5 comments
Assignees

Comments

@DawoudSheraz
Copy link
Contributor

DawoudSheraz commented Aug 20, 2024

  • Ensure CI uses the latest ubuntu
  • Ensure dockerfile is updated to use ubuntu 24.04 22.04
  • Ensure any documentation/references are updated
  • Ensure the change works as expected post-upstream release

See #1113 for context

@DawoudSheraz DawoudSheraz mentioned this issue Aug 20, 2024
7 tasks
@DawoudSheraz DawoudSheraz self-assigned this Aug 27, 2024
@Faraz32123 Faraz32123 self-assigned this Sep 30, 2024
@DawoudSheraz
Copy link
Contributor Author

Draft PR #1117

@DawoudSheraz
Copy link
Contributor Author

While the PR is not complete yet, adding the details of the changes so far:

@DawoudSheraz
Copy link
Contributor Author

DawoudSheraz commented Oct 8, 2024

There are issues with xmlsec import as part of SAML3. The following error is raised when building the image. It is unclear of the exact cause, though various online resources mention uninstalling and re-installing specific versions of xmlsec and its dependencies.

------
 > [production 19/37] RUN ./manage.py lms --settings=tutor.i18n pull_plugin_translations --verbose --repository='openedx/openedx-translations' --revision='main':
10.74 Traceback (most recent call last):
10.74   File "/openedx/edx-platform/./manage.py", line 103, in <module>
10.74     startup.run()
10.74   File "/openedx/edx-platform/lms/startup.py", line 20, in run
10.74     django.setup()
10.74   File "/openedx/venv/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
10.75     apps.populate(settings.INSTALLED_APPS)
10.75   File "/openedx/venv/lib/python3.11/site-packages/django/apps/registry.py", line 116, in populate
10.75     app_config.import_models()
10.75   File "/openedx/venv/lib/python3.11/site-packages/django/apps/config.py", line 269, in import_models
10.75     self.models_module = import_module(models_module_name)
10.75                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10.75   File "/opt/pyenv/versions/3.11.8/lib/python3.11/importlib/__init__.py", line 126, in import_module
10.75     return _bootstrap._gcd_import(name[level:], package, level)
10.75            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10.75   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
10.75   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
10.75   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
10.75   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
10.75   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
10.75   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
10.75   File "/openedx/edx-platform/common/djangoapps/third_party_auth/models.py", line 21, in <module>
10.75     from social_core.backends.saml import SAMLAuth
10.75   File "/openedx/venv/lib/python3.11/site-packages/social_core/backends/saml.py", line 13, in <module>
10.75     from onelogin.saml2.auth import OneLogin_Saml2_Auth
10.75   File "/openedx/venv/lib/python3.11/site-packages/onelogin/saml2/auth.py", line 12, in <module>
10.75     import xmlsec
10.75 ImportError: /openedx/venv/lib/python3.11/site-packages/xmlsec.cpython-311-x86_64-linux-gnu.so: undefined symbol: xmlSecOpenSSLTransformRsaMd5GetKlass
------
Dockerfile:180
--------------------
 178 |     # Pull latest translations via atlas
 179 |     RUN make clean_translations
 180 | >>> RUN ./manage.py lms --settings=tutor.i18n pull_plugin_translations --verbose --repository='openedx/openedx-translations' --revision='main' 
 181 |     RUN ./manage.py lms --settings=tutor.i18n pull_xblock_translations --repository='openedx/openedx-translations' --revision='main' 
 182 |     RUN atlas pull --repository='openedx/openedx-translations' --revision='main'  \
--------------------
ERROR: failed to solve: process "/bin/sh -c ./manage.py lms --settings=tutor.i18n pull_plugin_translations --verbose --repository='openedx/openedx-translations' --revision='main'" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/vsdzhaw6o2k2qp9q1y4qucco0
Error: Command failed with status 1: docker buildx build --tag=docker.io/overhangio/openedx:18.1.3-nightly --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx:18.1.3-nightly-cache --build-context=edx-platform=/Users/faraz.maqsood/Desktop/redwood/edx-platform /Users/faraz.maqsood/Desktop/test312/tutor_test_env/env/build/openedx

@DawoudSheraz
Copy link
Contributor Author

xmlsec/lxml issue might be due to some missing xmlsec related packages. At first, it appears there might be version conflicts and installing specific versions of xmlsec and lxml would be the answer. However, the "specific" versions are same as the versions specified in edx-platform base.txt requirements. Some more R&D hinted at installing packages like libxmlsec before installing xmlsec to ensure the lib linkages take place on OS level correctly. Testing this and the updating PR accordingly.

@DawoudSheraz DawoudSheraz changed the title Ubuntu 24.04 upgrade Ubuntu 22.04 upgrade Oct 22, 2024
@DawoudSheraz
Copy link
Contributor Author

It was planned to upgrade the Open edX Image to use Ubuntu 24.04 as base OS. However, when CI was set to use ubuntu-latest on edx-platform, it caused a variety of issues and Ubuntu had to be set to 22.04. Therefore, to ensure Tutor is in line with upstream behavior, this ticket will now focus on Ubuntu 22.04 upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants