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

Python error during leapp upgrade. #70

Open
toddr opened this issue Mar 24, 2023 · 1 comment
Open

Python error during leapp upgrade. #70

toddr opened this issue Mar 24, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@toddr
Copy link

toddr commented Mar 24, 2023

When running leapp upgrade from cpanel-elevate, the user is encountering the following python failure:

* 2023-02-23 15:17:23 (1412) [INFO] ******************************************************************************************
* 2023-02-23 15:17:23 (1413) [INFO] *
* 2023-02-23 15:17:23 (1414) [INFO] * Starting stage 3 of 5
* 2023-02-23 15:17:23 (1415) [INFO] *
* 2023-02-23 15:17:23 (1416) [INFO] ******************************************************************************************
* 2023-02-23 15:17:23 (1169) [INFO] Stage 3: skipping prep_for_leapp (already run)
* 2023-02-23 15:17:23 (1713) [INFO] Running leapp upgrade
* 2023-02-23 15:17:23 (4078) [INFO] Running: /usr/bin/leapp upgrade
* 2023-02-23 15:17:23 (4079) [INFO] 
* 2023-02-23 15:17:23 (4093) [INFO] Traceback (most recent call last):
* 2023-02-23 15:17:23 (4093) [INFO]   File "/usr/bin/leapp", line 5, in <module>
* 2023-02-23 15:17:23 (4093) [INFO]     from pkg_resources import load_entry_point
* 2023-02-23 15:17:23 (4093) [INFO]   File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
* 2023-02-23 15:17:23 (4093) [INFO]     import packaging.requirements
* 2023-02-23 15:17:23 (4093) [INFO]   File "/usr/lib/python2.7/site-packages/packaging/requirements.py", line 60, in <module>
* 2023-02-23 15:17:23 (4093) [INFO]     MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
* 2023-02-23 15:17:23 (4093) [INFO] TypeError: __call__() takes exactly 2 arguments (1 given)
* 2023-02-23 15:17:23 (4110) [INFO] 
* 2023-02-23 15:17:23 (657) [INFO] Sending notification: Fail to update to AlmaLinux 8
* 2023-02-23 15:17:23 (662) [ERROR] The elevation process failed during stage 3.
* 2023-02-23 15:17:23 (662) [ERROR] 
* 2023-02-23 15:17:23 (662) [ERROR] You can continue the process after fixing the errors by running:
* 2023-02-23 15:17:23 (662) [ERROR] 
* 2023-02-23 15:17:23 (662) [ERROR]     /usr/local/cpanel/scripts/elevate-cpanel --continue
* 2023-02-23 15:17:23 (662) [ERROR] 
* 2023-02-23 15:17:23 (662) [ERROR] You can check the error log by running:
* 2023-02-23 15:17:23 (662) [ERROR] 
* 2023-02-23 15:17:23 (662) [ERROR]     /usr/local/cpanel/scripts/elevate-cpanel
* 2023-02-23 15:17:23 (662) [ERROR] 
* 2023-02-23 15:17:23 (662) [ERROR] Last Error:
* 2023-02-23 15:17:23 (662) [ERROR] 
* 2023-02-23 15:17:23 (662) [ERROR] The 'leapp upgrade' process failed.
* 2023-02-23 15:17:23 (662) [ERROR] 
* 2023-02-23 15:17:23 (662) [ERROR] Please investigate, resolve then re-run the following command to continue the update:
* 2023-02-23 15:17:23 (662) [ERROR] 
* 2023-02-23 15:17:23 (662) [ERROR]     /scripts/elevate-cpanel --continue
* 2023-02-23 15:17:23 (529) [FATAL] The 'leapp upgrade' process failed.

I notice:

TypeError: __call__() takes exactly 2 arguments (1 given)

This appears to be a bug in the leapp code that might need correction?

@toddr toddr added the bug Something isn't working label Mar 24, 2023
@troglodyne
Copy link

Seems pretty strange, as this is happening during import on line 5. I'd guess that in
packaging/requirements.py
where it is doing
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
It should be doing
MARKER_EXPR = originalTextFor(MARKER_EXPR(), "marker")
...but this is not inside leapp itself, but within something it's requiring from site-packages. Almost makes me think some version of a dependency is not what it is expecting.

I don't suppose this is all that surprising, as after all it's not like we're paranoid and using virtualenv without --system-libs in this project or anything like that to enforce specific versions of python modules. I'd just say this this is more than likely PEBCAK on the user's part, though it'd be hard to figure out without more investigation.

Considering the other fellow in the linked cpanel-elevate case found that a similar issue was due to openssl11-libs being installed, I'd say my thoughts about it being just something odd about the environment as even more likely.

Regardless, no real way of fixing this "class" of bug report without doing what I say is not being done currently -- being paranoid and operating in a virtualenv with specific versions of modules you need bundled with the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants