Katello "Could not create the hostgroup: Error: Content Source not found."

Hi everyone,

I am unable to create a hostgroup using an OS populated by a Katello product repository. Does anybody know how to a workaround for this?

Many thanks for your help!

Problem:

# hammer hostgroup create \
  --name "Hydra 2.0 Beta 2 hyd1000 VMM" \
  --lifecycle-environment "Stable" \
  --content-view "CentOS 7" \
  --content-source "hyd-foreman02.ldi.lan" \
  --puppet-environment "production" \
  --puppet-proxy "hyd-foreman02.ldi.lan" \
  --puppet-ca-proxy "hyd-foreman02.ldi.lan" \
  --subnet "Hydra Subnet" \
  --domain "ldi.lan" \
  --architecture "x86_64" \
  --operatingsystem "CentOS-7" \
  --kickstart-repository "base_x86_64" \
  --partition-table "Kickstart default" \
  --pxe-loader "PXELinux BIOS" \
  --root-password '$hydra_cluster_file$' \
  --location-id 1 \
  --organization-id 1
Could not create the hostgroup:
  Error: Content Source not found.

Strangely enough, I am able to get far enough to be able to check “Synced Content” properly in the UI (see below). However, hitting “Submit” simply reloads the “Create Host Group” page with everything set back to defaults. I suspect that it’s a silent crash that is related to the CLI error above.

Expected outcome:

I was expecting a host group to be created.

Foreman and Proxy versions:

Foreman v2.3
Katello v3.18

Foreman and Proxy plugin versions:

Distribution and version:

CentOS Linux release 7.9.2009 (Core)

Other relevant data:

It doesn’t seem like I’m able to edit the last post with additional details, so I’ll just do a quick update here.

I’m also reading that Katello ships with provisioning templates (in the official documentation for Katello 3.18), but I can’t find them:

# hammer template list | grep -i Kickstart
44  | Atomic Kickstart default             | provision
51  | Kickstart default                    | provision
32  | Kickstart default finish             | finish
40  | Kickstart default iPXE               | iPXE
3   | Kickstart default PXEGrub            | PXEGrub
6   | Kickstart default PXEGrub2           | PXEGrub2
14  | Kickstart default PXELinux           | PXELinux
106 | Kickstart default user data          | user_data
81  | kickstart_ifcfg_bonded_interface     | snippet
79  | kickstart_ifcfg_bond_interface       | snippet
82  | kickstart_ifcfg_generic_interface    | snippet
84  | kickstart_ifcfg_get_identifier_names | snippet
85  | kickstart_kernel_options             | snippet
86  | kickstart_networking_setup           | snippet
52  | Kickstart oVirt-RHVH                 | provision
15  | Kickstart oVirt-RHVH PXELinux        | PXELinux

Did I somehow fudge the installation process? Here is the command that I used to install Katello:

  # yum -y install https://yum.theforeman.org/releases/2.3/el7/x86_64/foreman-release.rpm
  # yum -y install https://yum.puppet.com/puppet6-release-el-7.noarch.rpm
  # yum -y install https://fedorapeople.org/groups/katello/releases/yum/3.18/katello/el7/x86_64/katello-repos-latest.rpm
  # yum -y install epel-release centos-release-scl-rh
  # yum -y update
  # yum -y install katello

  # foreman-installer \
    --scenario katello \
    --tuning default \
    --foreman-initial-organization "Hydra" \
    --foreman-initial-location "LDI" \
    --foreman-initial-admin-username admin \
    --foreman-initial-admin-password 'XXXXXX' \
    --foreman-proxy-puppet "true" \
    --foreman-proxy-puppetca "true" \
    --puppet-runinterval "3600" \
    --enable-foreman-proxy \
    --foreman-proxy-tftp=true \
    --foreman-proxy-tftp-servername=172.21.13.54 \
    --foreman-proxy-dhcp=true \
    --foreman-proxy-dhcp-interface=eth1 \
    --foreman-proxy-dhcp-gateway=172.21.13.1 \
    --foreman-proxy-dhcp-nameservers="172.21.13.54" \
    --foreman-proxy-dhcp-range="172.21.13.100 172.21.13.200" \
    --foreman-proxy-dns=true \
    --foreman-proxy-dns-interface=eth1 \
    --foreman-proxy-dns-zone=ldi.lan \
    --foreman-proxy-dns-server="172.21.13.54" \
    --foreman-proxy-dns-reverse=13.21.172.in-addr.arpa \
    --foreman-proxy-dns-forwarders="172.21.67.101" \
    --foreman-proxy-dns-forwarders="172.21.67.102" \
    --foreman-proxy-foreman-base-url=https://hyd-foreman01.ldi.lan

Your thoughts are greatly appreciated, as I’m still very new to this! Thank you

Are you seeing any traceback in foreman log when you save the record?

You seem to be hitting this issue on your system. Bug #31544: can't create a hostgroup with selected kickstart repository - Katello - Foreman