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

Fixes #28049 - Index yum repo w/o errata refactoring w/ Pulp 3 #8412

Merged

Conversation

ianballou
Copy link
Member

@ianballou ianballou commented Nov 4, 2019

This PR enables yum content indexing with Pulp 3. Limitations:

  1. Kickstart repos might not work, but I am testing this currently.
  2. Cannot index package groups, SRPMs, or yum metadata files.
  3. Manifest refresh is not supported yet.

TESTING:
Try to sync various repositories and view their errata, distribution information, packages, and appstream modules. Note the limitations above. Don't try to sync the RHEL 7 Server RPMs repo unless you have more than 12 GB ram.

For now, remove any empty string checks in this file:

~/foreman/.vendor/ruby/2.5.0/gems/pulp_rpm_client-<insert version>/lib/pulp_rpm_client/models/rpm_update_record.rb

The empty string checks will look like this:

if issued_date.to_s.length < 1
    fail ArgumentError, 'invalid value for "issued_date", the character length must be great than or equal to 1.'
end

We're hoping to merge this sooner rather than later. Since it's Pulp 3 and doesn't affect normal Katello users, we may merge with some of the following TODOs unchecked.

TODO:

  • Write more tests
  • Test Kickstart repo (this works but we don't index package groups yet)
  • Get eval out of my code thanks to https://pulp.plan.io/issues/5650
  • Ensure that Kickstart repos can be synced and booted from
  • Try syncing RHEL/CentOS 8 AppStream repo
  • Limit how much is fetched from Pulp 3 during indexing (:PULP_INDEXED_FIELDS)
  • Properly test CVEs and BZs in erratum_test.rb (Pulp 3 having issues with file:///var/www/test_repos/zoo/ repo)
  • Add Package Group support (in this PR or another?)
    • We'll add this in another PR.

@theforeman-bot
Copy link

Issues: #28049

@sjha4
Copy link
Member

sjha4 commented Nov 5, 2019

@ianballou : Did you hit this: http://pastebin.test.redhat.com/811594 ?

@ianballou
Copy link
Member Author

@sjha4 yeah, looks like I'll need to update the bindings again.

@sjha4
Copy link
Member

sjha4 commented Nov 5, 2019

Tested sync and indexing after modifying binding gem code a little. Able to index packages,errata modules etc.. 👍
One thing I noticed is you can not go the packages> package one > details page as it tries to go to pulp v2 api..Are you seeing that behavior?

@ianballou
Copy link
Member Author

oh yeah @sjha4 I see that too, I'll have to check why

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch from 071c676 to 3b525cf Compare November 5, 2019 20:24
@sjha4
Copy link
Member

sjha4 commented Nov 5, 2019

So using this https://fedorapeople.org/groups/katello/fakerepos/zoo repo, when syncing errata, the associated packages are not indexed correctly. I believe only the first is getting indexed.
For example RHEA-2010:9984 should have penguin and walrus and RHEA-2010:9983 should have cheetah, elephant and girraffe. (https://fedorapeople.org/groups/katello/fakerepos/zoo/repodata/updateinfo.xml)

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch from 3b525cf to 9280ac3 Compare November 5, 2019 21:27
@ianballou
Copy link
Member Author

@sjha4 yeah I see that too. Looks like it doesn't happen for all repos, since more than one package per errata was indexed for this larger zoo repo https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch from 9280ac3 to be579b8 Compare November 6, 2019 14:26
@ianballou
Copy link
Member Author

@sjha4 I fixed the missing packages issue.

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch from be579b8 to ca59c22 Compare November 6, 2019 16:44
@ianballou
Copy link
Member Author

I've made a work-around for the issue where individual package pages were failing to load. There's still an issue where the package 'provides' and 'requires' data comes back in a weird format, so I'm stubbing those for now.

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch 6 times, most recently from 459cfba to 36da611 Compare November 6, 2019 20:50
@jlsherrill
Copy link
Member

I'm not seeing any kickstart distribution information being indexed, is that known/tracked?

@ianballou
Copy link
Member Author

ianballou commented Nov 7, 2019 via email

@jlsherrill
Copy link
Member

I was testing the RHEL 7.7 kickstart repo:

image

@ianballou
Copy link
Member Author

@jlsherrill I'll give that a test, I expected that data to populate

@jlsherrill
Copy link
Member

as we discussed on irc, it seemed to be a pulp bug, so i've filed that

@ianballou
Copy link
Member Author

fixed the indexing of file and build information for packages.

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch from 37cc0b0 to 46fec9e Compare November 8, 2019 19:42
@ianballou
Copy link
Member Author

Now package dependencies should be listed ok. The approach I took to generate the strings should be revisited. Hopefully at some point the data will be returned from Pulp as a hash with the correct keys rather than an array where we need to guess from the indices.

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch 2 times, most recently from 7ff238a to c48eb8a Compare November 11, 2019 19:14
@ianballou
Copy link
Member Author

I've refactored some of the pulp3 tests to give them a pulp3 module. There were issues with class naming for RpmTest since there wasn't a pulp3 module but it shared a name with the pulp2 tests.

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch 2 times, most recently from 3b68e1c to b2bd157 Compare November 11, 2019 22:30
@sjha4
Copy link
Member

sjha4 commented Nov 12, 2019

@ianballou : What version of the pulp_rpm_client are you on? I believe I am on pulp_rpm_client-3.0.0b71571331815 which doesn't have the file lib/pulp_rpm_client/models/rpm_update_record.rb file. The validations are in the update_record.rb file which makes me think I am on a newer version.

@ianballou
Copy link
Member Author

ianballou commented Nov 12, 2019

@sjha4 I'm on the same version as master at the moment. pulp_rpm_client-3.0.0b8.dev01573228480 has rpm_update_record.rb

@sjha4
Copy link
Member

sjha4 commented Nov 12, 2019

Findings based on testing with 3.0.0b8.dev01573228480:
Pulp3:

  1. Can sync and index yum repos after some known modifications to the binding gem.
  2. Tabs on the Content>Package page don't load: http://pastebin.test.redhat.com/813392

Pulp2:
All the flows I tested work as expected.

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch from b2bd157 to 5924fd5 Compare November 12, 2019 20:07
@sjha4
Copy link
Member

sjha4 commented Nov 12, 2019

@ianballou : Seeing a routing error now:
Screenshot from 2019-11-12 15-34-20

nvm if you don't see this cause my confidence in my pulp3 box is not too high..Could be unrelated..

@ianballou
Copy link
Member Author

@sjha4 yeah I think it has to do with our boxes having slightly different versions of the pulp code. It'll be easier to confirm when we can bring up a new clean pulp box again

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch from 5924fd5 to 005c21e Compare November 12, 2019 21:14
@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch 5 times, most recently from d1c8c86 to 1bfabe3 Compare December 3, 2019 15:25
@jlsherrill
Copy link
Member

jlsherrill commented Dec 3, 2019

seeing strange behavior when looking at the files list for an rpm, notice some files don't have paths:

image

@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch 3 times, most recently from cef9926 to 8a4636f Compare December 3, 2019 20:41
@ianballou ianballou force-pushed the 28049-pulp3-index-yum-no-errata branch from 8a4636f to 940b277 Compare December 3, 2019 21:00
Copy link
Member

@jlsherrill jlsherrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APJ!

@ianballou ianballou merged commit 4b8709c into Katello:master Dec 3, 2019
@ianballou ianballou deleted the 28049-pulp3-index-yum-no-errata branch December 3, 2019 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants