Synchronisation of Ubuntu repositories failing on a Centos 7 host

Problem: Foreman / Katello version 2.3.3 (this a new installation)

Expected outcome: To be able to synch Repository for Ubuntu servers

Foreman and Proxy versions:

Foreman and Proxy plugin versions:

Distribution and version: Centos 7

Other relevant data:
I was able to able to synch Centos 7 repository in following a wiki found on the Internet, but I am not able synch Ubuntu repositories to the Ubuntu archive site
I was able to upload the Ubuntu GPG keys found on the following link
https://docs.orcharhino.com/or/docs/sources/management_ui/the_content_menu/content_credentials.html
all trails are failing

Since it is a new installation, I am going to assume you are using Pulp 3 for Debian/Ubuntu content.

However, I still need more information to analyze this more fully.

  • How did you set up the repository you are trying to sync (upstream URL, distributions/releases, components, architectures, content credentials, etc.)?
  • What error are you getting when you are trying to sync?
  • If possible: What version of pulp_deb and pulpcore is installed?

Without this information the best I can do, is point you at some more generic documentation regarding deb type repositories: Products and Repositories - orcharhino documentation

1 Like

Hi ,
Thank you for the quick response.
I did not use any credential as I don’t know what to supply as Upstream Username and Upstream Password; so, I left it blank.
I am a too new discovering and learning using Katello /Foreman; I did not now that I need to install pulp_deb and pulpcore; please point me to the right wiki so I can install them.
The error message I am getting is: “RuntimeError: A sub task failed”

When creating the Ubuntu Repository
On the Repository I filled out the fields as follow:
Label: Ubuntu 18.04-main
Type: deb
Upstream URL: Index of /ubuntu
Releases: bionic
Components: main
Architecture: amd64
Verify SSL
Upstream Username
Upstream Password
Publish via HTTP is checked
GPG Key Ubuntu-18.04-GPG-key
SS CA Cert
SSL Client
SS Client Key

If Katello allowed you to select deb for repository type, then you already have Pulp (as well as the Debian plugin) installed.

You can check if you are running Pulp 2 or Pulp 3 by going on the Administer > About page. In the “System Status” area, on the “Smart Proxies” tab, there should be a list of “Features” that your smart proxy (you probably only have one) provides. If it says “Pulp” you are on Pulp 2 if it says “pulpcore” (I think) you are on Pulp 3.

If you have a task that says “A sub task failed”, you should also be able to find that sub task to find the actual error message. I am not sure where exactly you are in the UI, but look for things like “More Details” or the “Sub Tasks” button. Alternatively go to the Monitor > Tasks page, and filter by result != success (Assuming you don’t have a lot of failed tasks it should be easy to find the one you want).

Once you find the right failed task, you can also switch to the “Errors” tab to find not just the final error but the entire back trace.

1 Like

Administer >> About is showing.
Pulp, Pulpcore, Puppet CA, Puppet, Logs, and Registration 2.3.3
For searching errors
I select Ubuntu 18.04 Repository and undern the Sync status section, I click on warning >> then I click on the Errors tab and the following sections:
a) Action section: showing b Actions::Pulp3::Repository::Sync
b) Output section : if I search for Result =

File “/usr/lib64/python3.6/asyncio/base_events.py”, line 484, in run_until_complete\n" +
" return future.result()\n" +
" File “/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py”, line 225, in create_pipeline\n" +
" await asyncio.gather(*futures)\n" +
" File “/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py”, line 43, in call\n" +
" await self.run()\n" +
" File “/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/artifact_stages.py”, line 152, in run\n" +
" pb.done += task.result() # download_count\n" +
" File “/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/artifact_stages.py”, line 178, in _handle_content_unit\n" +
" await asyncio.gather(*downloaders_for_content)\n" +
" File “/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/models.py”, line 88, in download\n" +
" download_result = await downloader.run(extra_data=self.extra_data)\n" +

c) Exception section: Katello::Errors::Pulp3Error: Server disconnected

d) Backtrace section: the search for “error” is showing

/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:569:in block in execute_run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:472:in block in with_error_handling’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:472:in catch' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:472:in with_error_handling’

Can you successfully synchronize other repositories? For example RPM?

Hi,
Yes can successfully synchronize with RPM repositories
A can now successfully synchronize with deb repositories.
You pointed to the right direction as I did not know where to search for logs errors, After some tests it worked fine
The whole mistake was on the Upstream URL ; I had to check the right url from the /etc/apt/sources.list
example: for Ubuntu 18.04 the right setting is (depending on the packages to synchronize with)
Upstream URL = http://archive.ubuntu.com/ubuntu
Releases: bionic
Components: mainbionic-updates
Publish via HTTP

All work fine now,
Thank you very much and you may close the case

I don’t see a mainbionic-updates component for the bionic Release (a.k.a. distribution) of the http://archive.ubuntu.com/ubuntu/ repo. I only see main, multiverse, restricted, and universe, but you can also just leave the Components: field blank to sync all of them.

Hi ,
synchronizing yum and deb repositories work fine now.
Now I need to register Ubuntu clients to the Foreman server.
I was able to register a CentOS server using wiki found on the Internet , but I did search for any procedure with steps on how to register Ubuntu / Debian servers but I can’t find any.

See this thread for Ubuntu client instructions: Ubuntu client

How to create the /pulp_deb_signing.key ?

I followed the procedure you pointed to me

https://docs.orcharhino.com/or/docs/sources/usage_guides/attach_existing_hosts_guide.html

Down in the section Attaching Hosts Manually, then >> Debian/Ubuntu Hosts

The instruction said to add the key as below

wget “https://orcharhino.example.com/pub/pulp_deb_signing.key” -O - | apt-key add -

I am wondering how to create the pulp_deb_signing.key for Debian / Ubuntu

Then seached and tried making a key in following the procedure in the lin below, but at the end it did not work as the server is taking this certificate as self signed certificate

The in following the procedure on the first link and after creating the local repository in /etc/apt/sources.list.d

apt-get update && apt-get -y install apt-transport-katello katello-upload-profile

The error message below:

"Reading package lists… Done

E: The repository ‘http://foreman1.intra.avancie.com/pulp/deb/Default_Organization/Library/custom/Ubuntu_18_04_Bionic/Ubuntu_18_04_Repo-bionic-updates default Release’ is not signed.

N: Updating from such a repository can’t be done securely, and is therefore disabled by default.

N: See apt-secure(8) manpage for repository creation and user configuration details.

root@ubuntuclitest:/etc/apt/sources.list.d"

Please help.

That thread is about signing for pulp2. If you are on Foreman 2.3.3 / Katello 3.18, then you will be using pulp3.