Issue #2781
closedVendor field is present in db if RPM is uploaded, it is missed in case of sync
Added by ttereshc over 7 years ago. Updated almost 3 years ago.
Description
There is an information about vendor for RPM unit in metadata (primary.xml).
In case of upload this information is added to db and thus available via search API.
In case of sync vendor is always set to None and it looks more as unfinished work than the intentional removal of data.
It is not a regression, it has been this way for years.
Related issues
Updated by ttereshc over 7 years ago
- Priority changed from Normal to High
- Triaged changed from No to Yes
Updated by Ichimonji10 about 7 years ago
According to this issue, if one uploads an RPM with vendor metadata to Pulp, then that vendor metadata is available. As far as I can tell, that's not true. If I upload an RPM with vendor metadata to Pulp, then that vendor metadata is not available. This can be demonstrated with a simple script:
pulp-admin rpm repo create --repo-id foo
wget 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-with-vendor/rpm-with-vendor-1-1.fc25.noarch.rpm'
pulp-admin rpm repo uploads rpm --repo-id foo --file rpm-with-vendor-1-1.fc25.noarch.rpm
pulp-admin rpm repo content rpm --repo-id foo --str-eq 'vendor=Pulp Fixtures'
pulp-admin rpm repo content rpm --repo-id foo --str-eq 'license=Public Domain'
Here's some console output from when running the searches:
$ pulp-admin rpm repo content rpm --repo-id foo --str-eq 'vendor=Pulp Fixtures'
$ pulp-admin rpm repo content rpm --repo-id foo --str-eq 'license=Public Domain'
Arch: noarch
Buildhost: host-172-16-46-37.openstacklocaldocker-np-ci-rhos-20022.localdo
Checksum: 2f69f4bf6958d4c2281888cdf9df85d87f0117e39ff997c67ec4336d184d25b6
Checksumtype: sha256
Description: This RPM has a vendor
Epoch: 0
Filename: rpm-with-vendor-1-1.fc25.noarch.rpm
License: Public Domain
Name: rpm-with-vendor
Provides: rpm-with-vendor = 1-1.fc25-0
Release: 1.fc25
Requires:
Version: 1
If I reset Pulp and run a script with a feed URL, the same thing happens:
pulp-admin rpm repo create --repo-id bar --feed 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-with-vendor/'
pulp-admin rpm repo sync run --repo-id bar
pulp-admin rpm repo content rpm --repo-id bar --str-eq 'vendor=Pulp Fixtures'
pulp-admin rpm repo content rpm --repo-id bar --str-eq 'license=Public Domain'
Here's some console output from when running the searches:
$ pulp-admin rpm repo content rpm --repo-id bar --str-eq 'vendor=Pulp Fixtures'
$ pulp-admin rpm repo content rpm --repo-id bar --str-eq 'license=Public Domain'
Arch: noarch
Buildhost: host-172-16-46-37.openstacklocaldocker-np-ci-rhos-20022.localdo
Checksum: 2f69f4bf6958d4c2281888cdf9df85d87f0117e39ff997c67ec4336d184d25b6
Checksumtype: sha256
Description: This RPM has a vendor
Epoch: 0
Filename: rpm-with-vendor-1-1.fc25.noarch.rpm
License: Public Domain
Name: rpm-with-vendor
Provides: rpm-with-vendor = 1-1.fc25-0
Release: 1.fc25
Requires:
Version: 1
This behaviour is consistent for Pulp 2.14 and master (2.15). Here's the packages installed on one of my test systems:
[root@rhel-7-pulp-2-14 ~]# rpm -qa | grep pulp | sort
pulp-admin-client-2.14.3-0.1.alpha.git.14.0437abb.el7.noarch
pulp-docker-admin-extensions-3.0.3-0.1.alpha.git.13.1abca9e.el7.noarch
pulp-docker-plugins-3.0.3-0.1.alpha.git.13.1abca9e.el7.noarch
pulp-ostree-admin-extensions-1.3.1-0.1.alpha.git.7.f22fcec.el7.noarch
pulp-ostree-plugins-1.3.1-0.1.alpha.git.7.f22fcec.el7.noarch
pulp-puppet-admin-extensions-2.14.3-0.1.alpha.git.7.c75cc6e.el7.noarch
pulp-puppet-plugins-2.14.3-0.1.alpha.git.7.c75cc6e.el7.noarch
pulp-python-admin-extensions-2.0.3-0.1.alpha.git.6.8ffc1e8.el7.noarch
pulp-python-plugins-2.0.3-0.1.alpha.git.6.8ffc1e8.el7.noarch
pulp-rpm-admin-extensions-2.14.3-0.1.alpha.git.6.8d330c9.el7.noarch
pulp-rpm-plugins-2.14.3-0.1.alpha.git.6.8d330c9.el7.noarch
pulp-selinux-2.14.3-0.1.alpha.git.14.0437abb.el7.noarch
pulp-server-2.14.3-0.1.alpha.git.14.0437abb.el7.noarch
python-isodate-0.5.0-4.pulp.el7.noarch
python-kombu-3.0.33-8.pulp.el7.noarch
python-pulp-bindings-2.14.3-0.1.alpha.git.14.0437abb.el7.noarch
python-pulp-client-lib-2.14.3-0.1.alpha.git.14.0437abb.el7.noarch
python-pulp-common-2.14.3-0.1.alpha.git.14.0437abb.el7.noarch
python-pulp-docker-common-3.0.3-0.1.alpha.git.13.1abca9e.el7.noarch
python-pulp-oid_validation-2.14.3-0.1.alpha.git.14.0437abb.el7.noarch
python-pulp-ostree-common-1.3.1-0.1.alpha.git.7.f22fcec.el7.noarch
python-pulp-puppet-common-2.14.3-0.1.alpha.git.7.c75cc6e.el7.noarch
python-pulp-python-common-2.0.3-0.1.alpha.git.6.8ffc1e8.el7.noarch
python-pulp-repoauth-2.14.3-0.1.alpha.git.14.0437abb.el7.noarch
python-pulp-rpm-common-2.14.3-0.1.alpha.git.6.8d330c9.el7.noarch
python-pulp-streamer-2.14.3-0.1.alpha.git.14.0437abb.el7.noarch
systemctl status
doesn't show anything unusual.
Updated by ttereshc about 7 years ago
Interesting catch :)
I believe this commit which landed in 2.14.0 introduced the change of the upload behavior. Upload now works in the same way as sync does. That explains why you no longer can see the vendor field for uploaded RPMs. Before that change upload implementation of parsing rpm metadata was custom and vendor field was imported and saved in DB. So my expectation is that if you try to upload rpm with vendor data using Pulp 2.13, you'll see it.
I'm not sure how to treat it. Is it a regression since Pulp 2.14.0? The feature itself (having vendor information in Pulp) has never been fully implemented (only upload worked this way) and thus it was almost not possible to use it.
Thoughts?
Updated by dalley over 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to dalley
Added by dalley over 6 years ago
Updated by dalley over 6 years ago
- Status changed from ASSIGNED to POST
Updated by dalley over 6 years ago
- Status changed from POST to MODIFIED
Applied in changeset b10573314e28f34f68bfd7e8289f0083acf9e431.
Updated by ipanova@redhat.com over 6 years ago
- Platform Release changed from 2.17.0 to master
Updated by ipanova@redhat.com over 6 years ago
- Platform Release deleted (
master)
Updated by ipanova@redhat.com over 6 years ago
- Status changed from MODIFIED to 5
Updated by dalley over 6 years ago
- Related to Task #3924: Add a migration for the "vendor" field added
Updated by ipanova@redhat.com about 6 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Fix missing vendor metadata
closes #2781 https://pulp.plan.io/issues/2781