CentOS 8 install fails missing "../../../AppStream" repo when Installation Media is foreman repo.
"pulp/repos/ORG/Library/custom/CentOS8/base-x86_64" somehow goes to:
#1 Updated by Alexander von Gluck IV over 3 years ago
- File centos8-product.png centos8-product.png added
- Found in Releases Katello 3.13.0 added
#2 Updated by Alexander von Gluck IV over 3 years ago
I've added a "sister" ticket to CentOS here:
This could be a bug on their end.
#3 Updated by Alexander von Gluck IV over 3 years ago
- Priority changed from Normal to High
- 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.
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.
#4 Updated by James Shewey over 3 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.
#5 Updated by Florian Faltermeier over 3 years ago
I've exactly the same issue (Foreman 1.23 / Katello 3.13).
#6 Updated by Chris Roberts over 3 years ago
- Target version set to Katello 3.14.0
- Category set to Provisioning
#7 Updated by Ian Ballou over 3 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.
#8 Updated by Samir Jha over 3 years ago
- Triaged changed from No to Yes
- Assignee set to Ian Ballou
- Category changed from Provisioning to Documentation
#9 Updated by Matthew LeSieur over 3 years ago
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).
<%= @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):
<%= @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.
#10 Updated by Ian Ballou over 3 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.
#11 Updated by Lukas Zapletal over 3 years ago
- Related to Feature #28116: Automatically add AppStream repo next to BaseOS as additional media added
#12 Updated by Jonathon Turel about 3 years ago
- Triaged changed from Yes to No
- Target version deleted (
#13 Updated by Ian Ballou about 3 years ago
- Status changed from New to Closed
Related documentation can be found here: https://theforeman.org/plugins/katello/3.13/user_guide/provisioning/index.html
#14 Updated by Ian Ballou about 3 years ago
- Triaged changed from No to Yes
#15 Updated by Jonathon Turel about 3 years ago
- Target version set to Katello Recycle Bin
#16 Updated by Lukas Zapletal almost 3 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