Project

Profile

Help

Issue #2781

closed

Vendor field is present in db if RPM is uploaded, it is missed in case of sync

Added by ttereshc almost 7 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.17.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Sprint 40
Quarter:

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

Related to RPM Support - Task #3924: Add a migration for the "vendor" fieldCLOSED - CURRENTRELEASEdalley

Actions
Actions #1

Updated by ttereshc almost 7 years ago

  • Priority changed from Normal to High
  • Triaged changed from No to Yes
Actions #2

Updated by ttereshc almost 7 years ago

  • Sprint Candidate changed from No to Yes
Actions #4

Updated by Ichimonji10 over 6 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.

Actions #5

Updated by ttereshc over 6 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?

Actions #6

Updated by dkliban@redhat.com almost 6 years ago

  • Sprint set to Sprint 40
Actions #7

Updated by dalley almost 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
Actions #8

Updated by dalley almost 6 years ago

  • Status changed from ASSIGNED to POST
Actions #9

Updated by dalley almost 6 years ago

  • Status changed from POST to MODIFIED
Actions #10

Updated by dalley over 5 years ago

  • Platform Release set to 2.17.0
Actions #11

Updated by ipanova@redhat.com over 5 years ago

  • Sprint/Milestone set to 2.17.0
Actions #12

Updated by ipanova@redhat.com over 5 years ago

  • Platform Release changed from 2.17.0 to master
Actions #13

Updated by ipanova@redhat.com over 5 years ago

  • Platform Release deleted (master)
Actions #14

Updated by ipanova@redhat.com over 5 years ago

  • Platform Release set to 2.17.0
Actions #15

Updated by ipanova@redhat.com over 5 years ago

  • Status changed from MODIFIED to 5
Actions #16

Updated by dalley over 5 years ago

  • Related to Task #3924: Add a migration for the "vendor" field added
Actions #17

Updated by ipanova@redhat.com over 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #18

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added
Actions #19

Updated by ttereshc over 2 years ago

  • Sprint/Milestone deleted (2.17.0)

Also available in: Atom PDF