Project

General

Profile

Feature #20895

provisiong template @mediapath is static and not picking up content source from host

Added by Oliver Weinmann about 1 year ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Brad
Fixed in Releases:
Found in Releases:

Description

Hi,

while deploying a fresh host via Katello in our DMZ I noticed that it tries to pull the intall files from the main katello server instead of the capsule selected under content source. I figured that in the provisioning template @mediapath is somehow static and pointing to the main katello server. As I usually do when facing problems with Katello I joined the IRC chat and immediatley got an answer with a workaround that works perfectly.

I replaced <%= @mediapath %> in the kickstart provisioning template with:

<%= @mediapath.gsub(foreman_server_fqdn.to_s, @host.content_source.to_s) %>

and now mediapath points to the selected content source.

katello_centos7-newhost.PNG View katello_centos7-newhost.PNG 36.5 KB Oliver Weinmann, 09/21/2017 04:25 AM
repodetails.PNG View repodetails.PNG 60.4 KB Oliver Weinmann, 09/21/2017 05:17 AM
hostgroup_1.PNG View hostgroup_1.PNG 38 KB Oliver Weinmann, 09/21/2017 05:20 AM
hostgroup_2.PNG View hostgroup_2.PNG 45 KB Oliver Weinmann, 09/21/2017 05:42 AM
Katello centos7 newhost Repodetails Hostgroup 1 Hostgroup 2

History

#1 Updated by Andrew Kofink about 1 year ago

  • Assignee set to Partha Aji
  • Legacy Backlogs Release (now unused) set to 250

#2 Updated by Brad Buckingham about 1 year ago

  • Target version set to 217

#3 Updated by Partha Aji 12 months ago

Can you provide me the following details
1) OS Family of the OS you were trying to provision
2) The template you tweaked the media path.

#4 Updated by Partha Aji 12 months ago

Can you also
3) provide the version and arch.
4) make sure you have synced/published the KS trees in the right cv/env.
5) make sure the repositories have bootable distributions created out of them by going to repo details UI page and getting the distribution info. (please paste that info too)

#5 Updated by Oliver Weinmann 12 months ago

Hi,

sorry for not giving you all the details. I have to admit that I don't have the latest Katello installed, so maybe this problem is already solved? I'm on Katello 3.3.2 right now and currently I can't upgrade to a later release since we still have Windows 2008 R2 DHCP servers and they are no longer supported in a higher Katello release.

[root@katello ~]# rpm -qa katello
katello-3.3.2-1.el7.noarch

To your questions:

1) OS Family of the OS you were trying to provision
- Red Hat
2) The template you tweaked the media path.
- https://github.com/theforeman/community-templates/blob/develop/provisioning_templates/provision/kickstart_default.erb.
3) provide the version and arch.
- CentOS 7.3
4) make sure you have synced/published the KS trees in the right cv/env.
- Yep
5) make sure the repositories have bootable distributions created out of them by going to repo details UI page and getting the distribution info. (please paste that info too)
- see screenshot repodetails

I just checked and my problem might be that when creating a new host (CentOS 7.4) under the operating system tab, synced content is greyed out and so all media is selected instead. I figured that "synced content" is dynamic and "all media" is static. Recently I decided to just sync the CentOS 7 repo which is a symlink that always points to the latest release instead of creating a hostgroup,cv and so on for every new Centos 7.x release. On the newly synced CentOS 7 product synced content is no longer greyed out and deploying a host now works without tweaking the prov template. So the problem was truly that I could not select synced content. But since I use hostgroups e.g. like:

Server/Library/Linux/CentOS 7 <- There I can select synced content
Server/Library/Linux/CentOS 7/ad <- Synced content is greyed out (This hostgroup has a few more puppet modules to handle winbind configuration)

So any hostgroup that inherits operating system from a parent hostgroup has installation media greyed out. See screenshot hostgroup_1 and hostgroup_2. Sometimes by changing the settings in the sub hostgroup back and forth synced media becomes available but it's really unpredictable. Is this a known bug?

Best Regards,
Oliver

#6 Updated by Brad Buckingham 12 months ago

  • Target version changed from 217 to 225

#7 Updated by Partha Aji 11 months ago

Re:
"""
So any hostgroup that inherits operating system from a parent hostgroup has installation media greyed out. See screenshot hostgroup_1 and hostgroup_2. Sometimes by changing the settings in the sub hostgroup back and forth synced media becomes available but it's really unpredictable. Is this a known bug?
"""

I believe your issue was resolved by http://projects.theforeman.org/issues/20249 and fixed as part of Katello 3.4.4

#8 Updated by Brad Buckingham 11 months ago

  • Target version changed from 225 to 160

#9 Updated by Andrew Kofink about 1 month ago

  • Status changed from New to Resolved

Seems resolved, as Partha mentioned.

Also available in: Atom PDF