Project

General

Profile

Actions

Bug #27948

closed

CentOS 8 install fails missing "../../../AppStream" repo when Installation Media is foreman repo.

Added by Alexander von Gluck IV over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Documentation
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Foreman 1.23.0

```
foreman-installer-katello-1.23.0-1.el7.noarch
tfm-rubygem-foreman-tasks-0.16.2-1.fm1_23.el7.noarch
tfm-rubygem-foreman_discovery-15.1.0-1.fm1_23.el7.noarch
foreman-release-1.23.0-1.el7.noarch
tfm-rubygem-foreman_remote_execution_core-1.2.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.13-1.fm1_23.el7.noarch
foreman-client-release-1.23.0-1.el7.noarch
foreman-release-scl-7-2.el7.noarch
tfm-rubygem-foreman_ansible_core-3.0.1-1.fm1_23.el7.noarch
tfm-rubygem-foreman_remote_execution-1.8.2-1.fm1_23.el7.noarch
foreman-debug-1.23.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.4-4.el7.noarch
katello-ca-consumer-kwforeman.kw.com-1.0-1.noarch
foreman-proxy-1.23.0-1.el7.noarch
tfm-rubygem-foreman-tasks-core-0.3.2-1.fm1_23.el7.noarch
tfm-rubygem-foreman_docker-5.0.0-2.fm1_23.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.3.0-1.el7.noarch
tfm-rubygem-foreman_ansible-3.0.5-1.fm1_23.el7.noarch
foreman-installer-1.23.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.18.0-1.el7.noarch
foreman-cli-1.23.0-1.el7.noarch
rubygem-foreman_maintain-0.4.5-1.el7.noarch
foreman-selinux-1.23.0-1.el7.noarch
foreman-1.23.0-1.el7.noarch
foreman-postgresql-1.23.0-1.el7.noarch
```

"pulp/repos/ORG/Library/custom/CentOS8/base-x86_64" somehow goes to:
"pulp/repos/ORG/Library/custom/CentOS8/base-x86_64/../../../AppStream/x86_64/os/"


Files

foreman.png View foreman.png 305 KB Alexander von Gluck IV, 09/26/2019 03:02 PM
centos8-product.png View centos8-product.png 126 KB Alexander von Gluck IV, 09/26/2019 03:04 PM

Related issues 1 (0 open1 closed)

Related to Foreman - Feature #28116: Automatically add AppStream repo next to BaseOS as additional mediaClosedLukas ZapletalActions
Actions #1

Updated by Alexander von Gluck IV over 4 years ago

Actions #2

Updated by Alexander von Gluck IV over 4 years ago

I've added a "sister" ticket to CentOS here:

https://bugs.centos.org/view.php?id=16470

This could be a bug on their end.

Actions #3

Updated by Alexander von Gluck IV over 4 years ago

  • Subject changed from CentOS 8 PXE install fails missing "AppStream" repo to CentOS 8 install fails missing "../../../AppStream" repo when Installation Media is foreman repo.
  • Priority changed from Normal to High

This is going to be a painful one folks. Adjusting Subject as we learned more about it. CentOS folks are saying it's a foreman problem. Since the BaseOS repo references ../../../ , it goes above the Product name, making any kind of "aliases" too vague.

A work around seems to be setting your installation media to the upstream CentOS repositories vs the local ones. however since that relative path is in the repo definitions... updates will fail as well.

Actions #4

Updated by James Shewey over 4 years ago

It's a really ugly hack, but you can use an Apache rewrite to work around this. I was able to add a rewrite rule to /etc/httpd/conf.d/pulp_rpm.conf and set the /pulp/repos/ Location to:

<VirtualHost *:80>
  ServerName hostname.domain.com

  ## Vhost docroot
  DocumentRoot "/usr/share/foreman/public" 

  ## Directories, there should at least be a declaration for /usr/share/foreman/public
  <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule (.*)/AppStream/x86_64/os/repodata/(.*) $1/custom/CentOS_8/CentOS_8_-_Base/repodata/$2 [R]
  </IfModule>

This works successfully, and I was able to kickstart my install but isn't very generalizable as a fix because the path will differ for each deployment.

Actions #5

Updated by Florian Faltermeier over 4 years ago

Hello,

I've exactly the same issue (Foreman 1.23 / Katello 3.13).

Regards,
Florian

Actions #6

Updated by Chris Roberts over 4 years ago

  • Category set to 215
  • Target version set to Katello 3.14.0
Actions #7

Updated by Ian Ballou over 4 years ago

I've just tested this and provisioning CentOS 8 works if the Appstream repo is sent to Anaconda. The related code is here: https://github.com/Katello/katello/blob/master/app/services/katello/managed_content_medium_provider.rb#L19

To get it work I created an "AppStream" repo (http://mirror.centos.org/centos-8/8/AppStream/x86_64/os/) in the same lifecycle environment and content view as my CentOS 8 repo and synced it. Then, after host creation, I checked that my kickstart file mentioned AppStream (like `repo --name AppStream --baseurl http://foreman-nuc1.example.com/pulp/repos/Demo/Library/custom/CentOS/AppStream/`). That should be done automatically.

I'll update our provisioning documentation to include this scenario.

Actions #8

Updated by Samir Jha over 4 years ago

  • Category changed from 215 to Documentation
  • Assignee set to Ian Ballou
  • Triaged changed from No to Yes
Actions #9

Updated by Matthew LeSieur over 4 years ago

Ian,
I was able to successfully provision a CentOS 8 host from Satellite 6.5 with your suggestion of adding the "AppStream" repository to the provisioning template. As it turns out, the default template "Kickstart default" already includes code that specifies the additional repository, except the name is not "AppStream" (the repository name below, "centos-8-appstream-x86_64", is site specific).

Template snippet:

<%= @mediapath %><%= proxy_string %>
<% @additional_media.each do |medium| -%>
repo --name <%= medium[:name] %> --baseurl <%= medium[:url] %> <%= medium[:install] ? ' --install' : '' %>
<% end -%>

Rendered template snippet:

url --url http://satellite.example.com/pulp/repos/Example_Organization/Example_Lifecycle/centos-linux-8-standard/custom/centos-linux/centos-8-release-x86_64/
repo --name centos-8-appstream-x86_64 --baseurl http://satellite.example.com/pulp/repos/Example_Organization/Example_Lifecycle/centos-linux-8-standard/custom/centos-linux/centos-8-appstream-x86_64/

I had to update the template to change the name of the repository to "AppStream" (I know the code below is not ideal, but it works for this specific case):

Template snippet:

<%= @mediapath %><%= proxy_string %>
<% @additional_media.each do |medium| -%>
<% if (@host.operatingsystem.name == 'CentOS_Linux' and os_major >= 8) -%>
repo --name AppStream --baseurl <%= medium[:url] %> <%= medium[:install] ? ' --install' : '' %>
<% else -%>
repo --name <%= medium[:name] %> --baseurl <%= medium[:url] %> <%= medium[:install] ? ' --install' : '' %>
<% end -%>
<% end -%>

Rendered template snippet:

url --url http://satellite.example.com/pulp/repos/Example_Organization/Example_Lifecycle/centos-linux-8-standard/custom/centos-linux/centos-8-release-x86_64/
repo --name AppStream --baseurl http://satellite.example.com/pulp/repos/Example_Organization/Example_Lifecycle/centos-linux-8-standard/custom/centos-linux/centos-8-appstream-x86_64/

I do not think the problem is Foreman/Satellite in this case, I think CentOS Anaconda should be updated to allow other repository names. RHEL 8 hosts install correctly with the additional media set to something other than "AppStream", so I do not see why CentOS should be any different.

Thanks
Matthew LeSieur

Actions #10

Updated by Ian Ballou over 4 years ago

Hey Matthew, thanks for the detailed info there on getting provisioning working with different naming. I agree that the real bug here is with CentOS 8 & Anaconda. In the meantime, we'll direct people to either change the AppStream repo name or to edit the existing provisioning template / make a new one specific for CentOS 8.

Actions #11

Updated by Lukas Zapletal over 4 years ago

  • Related to Feature #28116: Automatically add AppStream repo next to BaseOS as additional media added
Actions #12

Updated by Jonathon Turel about 4 years ago

  • Target version deleted (Katello 3.14.0)
  • Triaged changed from Yes to No
Actions #13

Updated by Ian Ballou about 4 years ago

  • Status changed from New to Closed
Actions #14

Updated by Ian Ballou about 4 years ago

  • Triaged changed from No to Yes
Actions #15

Updated by Jonathon Turel about 4 years ago

  • Target version set to Katello Recycle Bin
Actions #16

Updated by Lukas Zapletal almost 4 years ago

I believe this needs to be fixed in Pulp, that's the cleanest thing we can do. Filed: https://pulp.plan.io/issues/6470

Actions

Also available in: Atom PDF