Not seeing my repos via pulp-admin

Problem:
I don’t see any yum repos via “pulp-admin repo list” after creating a product for CentOS-7 and setting up the “base” and “updates” yum repos.
I do however see them via “hammer repository list”

Then, after I create and publish a content view “pulp-admin repo list” shows a single entry:

[root@katello tools]# pulp-admin repo list
±---------------------------------------------------------------------+
Repositories
±---------------------------------------------------------------------+

Id: 3-CentOS-7-v1_0-puppet-8d33d1d6-900f-48ff-acb6-d21f596a42d8
Display Name: CentOS-7 Puppet Environment
Description: None
Content Unit Counts:

I don’t know if that’s intented behaviour, but all of the online documentation I’ve found for importing CentOS errata into Foreman seem to expect “pulp-admin list repo” to actually list those repos.

pulp-admin is being authenticated through the $HOME/.pulp/admin.conf configuration file.

Expected outcome:

I would expect “pulp-admin repo list” to list the yum repos I have already created and synced through the web ui or hammer.

Foreman and Proxy versions:
foreman-2.1.0-1.el7
foreman-proxy-2.1.0-1.el7

Foreman and Proxy plugin versions:
katello-3.16.0-0.4.rc5.el7

Distribution and version:
CentOS 7.8.2003

Other relevant data:

I get the exact same output. I think they have switched from MongoDB to Postgres. Why one repo remains is probably due to the Frankenstein nature of foreman. Pulp interfaces with MongoDB.

Apparently “getting errata into Centos is a Centos issue“

I will have to dig out an old technique of having Centos mirrors on my servers and injecting the errata into them. I then point Katello at them rather than the Centos mirrors.

Thanks for the reply. This does indeed look like a switch from MongoDB to PostgreSQL, probably as a result of the Pulp2 → Pulp3 update.

The singular repo I saw from pulp repo list is found in mongodb:

[root@katello tools]# mongo
MongoDB shell version v3.4.9
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.9
> use pulp_database;
switched to db pulp_database
> db.repos.find()

{ "_id" : ObjectId("5f1cad6e4a54e704e2a80ecb"), "repo_id" : "1-centos-7-v1_0-puppet-a7227dc4-5668-43ae-bbf6-d3a0a67b0f32", "display_name" : "centos-7 Puppet Environment", "notes" : { "_repo-type" : "puppet-repo" }, "scratchpad" : {  }, "content_unit_counts" : {  }, "_ns" : "repos" }

And the actual Yum repos are stored in PostgreSQL:

[root@katello tools]# su - postgres
[postgres@katello ~]$ psql pulpcore
psql (12.1)
Type "help" for help.
pulpcore=# select pulp_id, name from core_repository;

               pulp_id                |     name
--------------------------------------+---------------
 e0c17697-0649-49ad-b6c3-50606b1b5531 | base-38848
 a5b2c791-36ce-43d9-aa73-b9cd8adc6aeb | updates-47970
 bd454296-a9f4-47a8-af00-9311585ec40c | epel-98560
(3 rows)

So it looks like Pulp is using PostgreSQL for repo metadata instead of MongoDB but pulp-admin is still using the MongoDB backend.

Hello addi,

That is correct. We are switching to using pulp3 with a postgresql db for yum in 3.16. We do not have a pulp3 equivalent for pulp-admin right now shipping with katello. Is this a fresh installation of katello 3.16rc?

Thanks & Regards,
Samir Jha

Correct, this was a fresh 3.16rc installation.

Can you expand on this a little bit?
Am I understanding you to be saying you import the errata metadata on the various hosts/clients and then “point Katello at them rather then the CentOS mirrors” ?

How do you perform that second operation ?

I think I was being thick there for a moment, I guess your saying just change the url in the repo.

Wouldnt it be a good idea to just use a dedicated box to be the local sync’ed repo ?

We have now moved from centos7 to centos8 and the method no longer works.Please read the last line in bold first!

Effectively we made a “mrepo” repository copy for all the online repos we needed (centos, epel etc etc). (We had to do that anyway due to our servers not being on the internet). <of course only 64 bit repos>.

Each mrepo folder was placed under its own folder in /var/web/html/pub/centos7repos/. (if we were online we could have had a daily script that automatically mrepo’d from online repositories to /var/web/…/centos7repos/.

We then injected errata into those /var/…/centos7repo/repositories using the Generate_updateinfo.py method.

Of course this script relies on the great work done by “http://cefs.steve-meier.de/”)
I think the example given at GitHub - vmfarms/generate_updateinfo is overly complicated.
It is a three step process

  1. download errata.latest.xml.bz2
  2. generate updateinfo.xml using Generate_updateinfo.py and errata.latest.xml.bz2
  3. inject updateinfo.xml into /var/…/centos7repo/

We then created repositories in forman but rather than point to https://centsos.org… etc we pointed to our own local server http:///pub/centos7repo/epel http:///pub/centos7repo/baseos etc etc. Remember folks disk space is CHEAP, I don’t want to hear "oh you could have two copies of the same file on the same server …it is soooooo wasteful, urghuh! "

One thing I remember, because I cant program in “py” (python?), I had to disable checks to get it to work. I changed references from centos6 to 7.

However soon as it worked we moved to centos8 …I have to say I never did any integrity checking on whether it worked properly due to the sudden change of OS

#tTwoCopiesOnTheSameServer

just noticed someone has edited generate_updateinfo.py, and included “8” as well as “7”. However I don’t think there is a errata.latest.xml.bz2 for centos8. I wonder why the person included 8

Thanks Michael, Ill give it a try shortly.

actually I think we did not use mrepo to make a copy of the online repos.
I think we used rsync.
However I now think there is a better way for centos7

for centos8 their is an even better way as you don’t need to use createrepo reposync does everything.

Also all you are doing is placing files in /pub/centos7repo/ you dont need to mess with /etc/yum.conf.d/ foreman does that side of things. You are just created a local web based repositoty

Also http://cefs.steve-meier.de includes centos8 errata but it is all “beta” testing