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

sync fails under certain conditions due to python3-apt not being installed #398

Closed
pulpbot opened this issue Jan 4, 2022 · 7 comments
Closed
Labels

Comments

@pulpbot
Copy link
Member

pulpbot commented Jan 4, 2022

Author: @jlsherrill (jsherril@redhat.com)

Redmine Issue: 8173, https://pulp.plan.io/issues/8173


A katello user here: https://projects.theforeman.org/issues/31701 reported this. When syncing a deb repo (unsure which one), it errors with:

/usr/lib/python3.6/site-packages/debian/deb822.py:727 UserWarning: Parsing of Deb822 data with python3-apt's apt_pkg was requested but this package is not importable. Is python3-apt installed?

Looking at the code, the default value for use_apt_pkg is True: https://salsa.debian.org/python-debian-team/python-debian/-/blob/master/lib/debian/deb822.py#L2331

and pulp isn't overriding it:

for package_paragraph in deb822.Packages.iter_paragraphs(package_index.main_artifact.file):

so its defaulting to True.

A full traceback isn't available, nor what repository they were syncing, but we could ask for that info if needed.

@pulpbot pulpbot added this to the Wishlist milestone Jan 4, 2022
@pulpbot
Copy link
Member Author

pulpbot commented Jan 4, 2022

From: @quba42 (quba42)
Date: 2021-01-28T16:31:42Z


I have noticed this warning in the past, I just never noticed any actual failures or adverse effects resulting from it.

Looking at the original Katello bug report I am not 100% sure what exactly failed, and if it is really related to the warning.

That being said I should probably stop kicking that particular can down the road and investigate.

With respect to the warning I guess there are two possibilities:

  1. Stop requesting "parsing of Deb822 data with python3-apt's apt_pkg"
  2. Simply add python3-apt to the pulp_deb dependencies.

I have no idea which is better or if this will solve the issue. Perhaps we can ask the user with the problem to retest the sync after manually installing the python3-apt package? (Though I am also not sure if this package is available on RPM based setups...)

@pulpbot
Copy link
Member Author

pulpbot commented Jan 4, 2022

From: knzivid (knzivid)
Date: 2021-05-05T06:32:10Z


I noticed the same while syncing https://apt.kitware.com/

pulp_1 | /usr/local/lib/python3.6/site-packages/debian/deb822.py:740: UserWarning: Parsing of Deb822 data with python3-apt's apt_pkg was requested but this package is not importable. Is python3-apt installed?
pulp_1 | warnings.warn(msg)

I can retest the sync after installing python3-apt. Is there an ubuntu based docker image for pulp similar to pulp/pulp-oci-images?

@pulpbot
Copy link
Member Author

pulpbot commented Jan 4, 2022

From: @quba42 (quba42)
Date: 2021-05-05T07:25:43Z


The short answer is: I don't think there is a pulp container image running on Debian or Ubuntu.

Within the pulp_installer repo, there is a pulp3-sandbox-debian10 Vagrant box which might be the closest thing. Alternatively it might be possible to install libapt and python-apt on top of the existing CentOS container image, but that would certainly require some tinkering.

@pulpbot
Copy link
Member Author

pulpbot commented Jan 4, 2022

From: @quba42 (quba42)
Date: 2021-08-05T12:57:00Z


See also: https://github.com/pulp/community/discussions/73

@quba42 quba42 linked a pull request Jan 31, 2022 that will close this issue
@stale
Copy link

stale bot commented May 25, 2022

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

@stale stale bot added the stale label May 25, 2022
@quba42 quba42 removed this from the Wishlist milestone Aug 23, 2023
@stale
Copy link

stale bot commented Aug 23, 2023

This issue is no longer marked for closure.

@quba42
Copy link
Collaborator

quba42 commented Aug 23, 2023

We have explored this annoying warning many times, and have never been able to come up with a better solution than ignoring it.

@quba42 quba42 closed this as completed Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants