Project

Profile

Help

Issue #8173

closed

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

Added by jsherril@redhat.com about 3 years ago. Updated over 2 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Debian:
Platform Release:
Target Release - Debian:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Quarter:

Description

Ticket moved to GitHub: "pulp/pulp_deb/398":https://github.com/pulp/pulp_deb/issues/398


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: https://github.com/pulp/pulp_deb/blob/ff7bf434b0c3aabdf165f2f9793f4acce668c724/pulp_deb/app/tasks/synchronizing.py#L546

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.

Actions #1

Updated by quba42 about 3 years ago

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...)

Actions #2

Updated by quba42 almost 3 years ago

  • Sprint/Milestone set to Wishlist
Actions #3

Updated by knzivid almost 3 years ago

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?

Actions #4

Updated by quba42 almost 3 years ago

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.

Actions #6

Updated by pulpbot over 2 years ago

  • Description updated (diff)
  • Status changed from NEW to CLOSED - DUPLICATE

Also available in: Atom PDF