Satellite cannot provisioning CentOS 8 Server

The AppStream code is older than Katello 3.12 so it might be in there. @hiero-nymus can you try specifying a custom kickstart provisioning template like the instructions say here? Foreman :: Plugin Manuals

iballou,

As an FYI, the Foreman 1.24.2/Katello 3.14.1 releases do not include the necessary workaround in the ‘Kickstart default’ template, nor in the Installation Media configurations. Those might need to be added to the Community templates, or some special notes created around CentOS 8 provisioning, including all the necessary changes (OS configuration template assignments, Installation Media URL, Repos and Content Views).

For your consideration,

/Mike

I’ll take a look at where we can add more support for this workaround. It would be nice if this can get fixed in Anaconda or Pulp so extra steps aren’t required by Katello users.

1 Like

@hiero-nymus a couple more questions that might help:

Are your AppStream and BaseOS repositories published in a content view that you’ve set up? If so, they should be same environment and content view. If you’ve only synced them but haven’t published them in a content view you should be all set there.

Is your AppStream repo literally named “AppStream”?

Hi @iballou and sorry for the delay.
Yes AppStream and BaseOS repositories are on the same content view and were published too.

Thanks @Mkbrown, I’ve created a new AppStream repository as you described and follow the workaround’s installation from your link. Actually I’ve started the installation and until now, all is fine.

I just have a comment about the filesystems type. The installation seems to work only with ext4 because I’ve received this error with xfs : something like raise FSError : failed to mount.… As someone an Idea about that?

Not sure if this will help anyone else but I am too impatient to wait for a real fix so here’s what I did:

I was getting the “…/…/…/AppStream/” error just like everyone else.
I read the googles.
Came up with bunk.
Impatience commenced.

Created /etc/httpd/conf.d/pulp_aliases.conf on my foreman server with the following contents:

Alias /pulp/repos/home/Library/BaseOS/x86_64/os /var/www/pub/yum/http/repos/home/Library/CentOS_8/custom/CentOS_8/CentOS_8_-_Base-x86_64
Alias /pulp/repos/home/Library/AppStream/x86_64/os /var/www/pub/yum/http/repos/home/Library/CentOS_8/custom/CentOS_8/CentOS_8
-AppStream-x86_64
Alias /pulp/repos/home/Library/centosplus/x86_64/os /var/www/pub/yum/http/repos/home/Library/CentOS_8/custom/CentOS_8/CentOS_8
-_centosplus-x86_64
Alias /pulp/repos/home/Library/Extras/x86_64/os /var/www/pub/yum/http/repos/home/Library/CentOS_8/custom/CentOS_8/CentOS_8
-_Extras-x86_64
Alias /pulp/repos/home/Library/PowerTools/x86_64/os /var/www/pub/yum/http/repos/home/Library/CentOS_8/custom/CentOS_8/CentOS_8
-_PowerTools-_x86_64

restorecon, chmod and chown the new file:

chown root: /etc/httpd/conf.d/pulp_aliases.conf
chmod 640 /etc/httpd/conf.d/pulp_aliases.conf
restorecon -vF /etc/httpd/conf.d/pulp_aliases.conf

restarted foreman stuffs:

foreman-maintain service restart

Partied on.

Note: you may have to tweak the aliases to match the names of your repositories. Once this is all fixed by whomever, you can delete the pulp_aliases.conf file but it shouldn’t hurt anything even after it is fixed.

3 Likes

Thank you, I am marking your answer as a “temporary solution” so it pops up for googlers. This is an important thing to solve.

We’ve had several reports of difficulties provisioning with CentOS 8 in the last number of weeks. @lzap would it be an idea to look for a ‘volunteer’ to do a walk through of troubleshooting this?

1 Like

Like creating a tutorial/blogpost/docs about this? Let me try all of this on my instance to see.

1 Like

Like creating a tutorial/blogpost/docs about this?

Exactly! Thank you. Let me know if you need a proofreader :slight_smile:

@iballou so I created CentOS 8 product, added both BaseOS and AppStream repos, synced both, created a host and it rendered this:

url --url http://katello.nat.lan/pulp/repos/MyOrg/Library/custom/CentOS8/CentOS8-BaseOS/
repo --name CentOS8-AppStream-KS --baseurl http://katello.nat.lan/pulp/repos/MyOrg/Library/custom/CentOS8/CentOS8-AppStream-KS/ 

However it does not work. Is there something I am missing here? I mean, I don’t need the alias hack if we add a secondary repository with the required content, do I?

katello-3.14.0

@mcorr once I get this working I will definitely prepare some content

1 Like

@lzap the issue is your AppStream repo isn’t literally named ‘AppStream’. The alias workaround from above shouldn’t be needed. And I’ll note that the template workaround in our provisioning documentation is there in case people need to have AppStream be named something else in Katello, but if you start with “AppStream” as a name to start you shouldn’t need that either.

1 Like

Also I’ll mention that if you have to do anything more than follow the provisioning instructions to get this to work then there has indeed been some sort of regression since I wrote them. For the people who are still having troubles, I’m not clear if those instructions were used.

Give this a shot if you still haven’t got it working:

/etc/httpd/conf.d/pulp_aliases.conf

Alias /pulp/repos/MyOrg/Library/BaseOS/x86_64/os /var/www/pub/yum/http/repos/MyOrg/Library/custom/CentOS8/CentOS8-BaseOS
Alias /pulp/repos/MyOrg/Library/AppStream/x86_64/os /var/www/pub/yum/http/repos/MyOrg/Library/custom/CentOS8/CentOS8-AppStream-KS
Alias /pulp/repos/MyOrg/Library/centosplus/x86_64/os /var/www/pub/yum/http/repos/MyOrg/Library/custom/CentOS8/CentOS8-centosplus
Alias /pulp/repos/MyOrg/Library/Extras/x86_64/os /var/www/pub/yum/http/repos/MyOrg/Library/custom/CentOS8/CentOS8-Extras
Alias /pulp/repos/MyOrg/Library/PowerTools/x86_64/os /var/www/pub/yum/http/repos/MyOrg/Library/custom/CentOS8/CentOS-PowerTools

I’m taking a stab in the dark at how your aliases would need to be configured based on the limited information I can extract as to how your repos, etc. are named.

You can always grep the 404 errors from your /var/log/httpd/foreman_access.log with something like:

grep -oP ‘(?<=GET ).Library.(?=/repodata/repomd.xml HTTP/1.[12]" 404)’ /var/log/httpd/foreman_access.log| sort -u

Those directories that are returned by that command are the ones you’ll need to create the appropriate aliases for.

The grep command I placed above was reformatted by the website so I’m trying to fix it here:

grep -oP ‘(?<=GET ).*Library.*(?=/repodata/repomd.xml HTTP/1.[12]" 404)’ /var/log/httpd/foreman_access.log | sort -u

That fixed the asterisks but the single quotes are still being altered so make sure if grep gives you a syntax error that you replace the single quotes manually.

Nope. Is there a reason why we don’t ship this automatic repository id renaming? I think it would be very useful:

In fact, if this gets into develop I will want to backport this into 2.0.

1 Like

I was hoping this Anaconda bug would be temporary, but it looks like it 's going to stick around. I think having it in the community templates is a good idea.

Is the solution using the pulp aliasing the best way to resolve this issue?
In a previously post I’ve said that the solution of @Mkbrown was ok and it was really so… but now I cannot anymore provisioning CentOS 8. It is really strange…For this reason I ask me if this solution still ok .

@hiero-nymus, the best way to resolve this issue is to use the special CentOS 8 instructions on our provisioning guide (Foreman :: Plugin Manuals). If you don’t want to name your AppStream repo “AppStream”, you could also try adding in the kickstart template changes that @lzap mentioned above in his community templates PR.

If you’re still having troubles, could you paste us your rendered kickstart template? I would like to see if you have a repo --name ... line for your AppStream repo and if it has the correct naming.

1 Like

@iballou Thanks for you reply. I followed instructions as described in URL and it was running for about one week before. For this reason I don’t understand this issue.

Please here’s my kickstart template portion:
<%= @mediapath %><%= proxy_string %>
<% @additional_media.each do |medium| -%>
<% if (medium[:url].include?(“AppStream”) and @host.operatingsystem.name == ‘CentOS’ and os_major >= 8) -%>
repo --name AppStream --baseurl <%= medium[:url] %>
<% else -%>
repo --name <%= medium[:name] %> --baseurl <%= medium[:url] %> <%= medium[:install] ? ’ --install’ : ‘’ %><%= proxy_string %>
<% end -%>
<% end %>
<% end %>
lang <%= host_param(‘lang’) || ‘en_US.UTF-8’ %>
selinux --<%= host_param(‘selinux-mode’) || host_param(‘selinux’) || ‘enforcing’ %>
keyboard <%= host_param(‘keyboard’) || ‘us’ %>
skipx

Here’re my repo:

ID    | NAME                          | PRODUCT  | CONTENT TYPE | URL                                                   
------|-------------------------------|----------|--------------|---------------------------------------------------------------------------------
10498 | AppStream                     | CentOS 8 | yum          | http://mirror.centos.org/centos-8/8/AppStream/x86_64/kickstart/
10200 | CentOS 8 AppStream            | CentOS 8 | yum          | http://mirror.centos.org/centos/8/AppStream/x86_64/os 
10427 | CentOS 8 AppStream kickstart  | CentOS 8 | yum          | http://mirror.centos.org/centos/8/AppStream/x86_64/kickstart/
10199 | CentOS 8 BaseOS               | CentOS 8 | yum          | http://mirror.centos.org/centos/8/BaseOS/x86_64/os    
10202 | CentOS 8 centosplus           | CentOS 8 | yum          | http://mirror.centos.org/centos/8/centosplus/x86_64/os
10198 | CentOS 8 Extras               | CentOS 8 | yum          | http://mirror.centos.org/centos/8/extras/x86_64/os    
10426 | CentOS 8 kickstart            | CentOS 8 | yum          | http://mirror.centos.org/centos/8/BaseOS/x86_64/kickstart/
10201 | CentOS 8 PowerTools           | CentOS 8 | yum          | http://mirror.centos.org/centos/8/PowerTools/x86_64/os
------|-------------------------------|----------|--------------|---------------------------------------------------------------------------------