Create Host results in host created, but "Pending Installation" must cancel for installation to complete

Problem:
Create a VM. Host is created with dns/dhcp hooks. no katello agent installed, not sure if that’s part of the issue. Looking in production.log I see a 201 status vs 409

Expected outcome:
Shouldn’t katello-agent be installed? Shouldn’t the installation finish normally?

Foreman and Proxy versions: Foreman 2.0
Version

2.0.1

Active features

  • Ansible

  • BMC

  • DHCP

  • DNS

  • Dynflow

  • HTTPBoot

  • Logs

  • Pulp

  • Pulpcore

  • Puppet

  • Puppet CA

  • SSH

  • Templates

  • TFTP

Foreman and Proxy plugin versions:

Distribution and version: 3.15

Other relevant data:

Cancel build results in a completed installation. But I do not see any graphs update on the host page showing it’s alive.

Hello, I don’t understand. Can you be more verbose?

I have a similar issue:

  • Deployed a new CentOS 8 VM via Foreman 2.1.1 on VMware 6.7.0.45000
  • After the installation has completed I examine the host details and I see the ‘Build’ status shows a green check mark with the text ‘Pending installation’ and ‘Configuration’ with an orange check mark ‘Out of sync’.

Why is that?

I believe I had this issue and someone recommended I yum update and install a later version of katello.

As to the graphs. I was told that those only apply to the server (I know my server does have graphs. Not sure if that’s the correct answer though). But katello-agent can be installed after the fact, but I think because it’s being removed from later releases it’s not installed by default.

here are some scripts I wrote to do the install

#this is after running

#joinAd.sh
#/repos/localrepofiles/centos7s.sh (disable any spacewalk stuff (rhn* osad spacewalk* yum-rhn-plugin) or simply run deRegisterSpacewalk.sh

#needs 8gb or ram
#need 8TB repo store

hostname=$1

if test -z "$1" 
then
	#for some reason, not expanding assigned variable as parameter
	echo "rerun and append desired hostname"
    exit 1
else
	echo "thanks"
fi

hostnamectl set-hostname $hostname

#https://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-install-katello-3-2-on-centos-7-rhel-7.html

#katello fw
firewall-cmd --permanent --add-port=80/tcp --add-port=443/tcp --add-port=5647/tcp --add-port=9090/tcp
#proxy fw
firewall-cmd --permanent --add-port=8140/tcp --add-port=8443/tcp --add-port=8000/tcp --add-port=67/udp --add-port=68/udp --add-port=69/udp

firewall-cmd --reload

yum install -y ntp
service ntpd restart

# Set timezone if required 
timedatectl set-timezone America/Chicago

ntpdate -u us.pool.ntp.org

rm -rf /var/cache/yum/*

#yum -y localinstall http://fedorapeople.org/groups/katello/releases/yum/3.10/katello/el7/x86_64/katello-repos-latest.rpm
#yum -y localinstall http://yum.theforeman.org/releases/1.20/el7/x86_64/foreman-release.rpm
#yum -y localinstall https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
#yum -y localinstall http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
#yum -y install foreman-release-scl python2-django

yum -y localinstall https://yum.theforeman.org/releases/2.0/el7/x86_64/foreman-release.rpm 
yum -y localinstall https://fedorapeople.org/groups/katello/releases/yum/3.15/katello/el7/x86_64/katello-repos-latest.rpm 
yum -y localinstall https://yum.puppet.com/puppet6-release-el-7.noarch.rpm 
yum -y localinstall https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
yum -y install foreman-release-scl

#reboot?

yum update -y

adduser apache
groupadd apache
usermod -a -G apache apache

yum -y install httpd

yum -y install katello

#https://bugzilla.redhat.com/show_bug.cgi?id=1507968
pulp-gen-key-pair
pulp-gen-ca-certificate

#prevents ‘pulp-manage-db && touch /var/lib/pulp/init.flag’ returned 64 instead of one of [0]
#related to apache user
systemctl enable httpd
service httpd start

#puppet-agent-oauth

foreman-installer --scenario katello

#./mountStore.sh

#admin pw
cat /etc/foreman-installer/scenarios.d/katello-answers.yaml | grep password


#setup plugin
yum install -y tfm-rubygem-foreman_setup

#redhat_access plugin
yum install -y tfm-rubygem-redhat_access

#remote_execution, dynflow smart proxy(part of remote_execution)
foreman-installer --scenario katello --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh --enable-foreman-cli-remote-execution

#ansible, bootdisk, default_hostgroup, discovery, hooks, memcache, snapshot_management, templates, VMWare
foreman-installer --scenario katello --enable-foreman-plugin-ansible --enable-foreman-proxy-plugin-ansible --enable-foreman-cli-ansible --enable-foreman-plugin-bootdisk --enable-foreman-plugin-default-hostgroup --enable-foreman-plugin-discovery --enable-foreman-cli-discovery --enable-foreman-plugin-hooks --enable-foreman-plugin-memcache --enable-foreman-plugin-snapshot-management --enable-foreman-plugin-templates --enable-foreman-cli-templates --enable-foreman-compute-vmware

#finishing touches for memcache
yum install memcached -y 
systemctl enable memcached
systemctl start memcached
				
#dhcp_browser plugin
yum install tfm-rubygem-foreman_dhcp_browser

I have this issue too. Foreman deployed the VM successfully. But once the VM is powered up, nothing happens - no configuration, no registration, nothing. No errors in the production.log, no events in the VM logs anywhere.

I’m deploying a CentOS 7 template on VMWare 6.7 using default templates.

Finish: Kickstart default finsh
Provisioning: kickstart default
Registration: Linux registration default
User data: Userdata open-vm-tools

Any ideas?

Hey, we need more details, these are all very generic sounding problems.

I think I have the same issue. Foreman 3.1.0 and Smart-Proxy 3.1.0.

I get hosts discovered via the discovery plugin via pxe boot, then I provision the host and the Status stays at “Pending installation” and on the top right “Cancel build” is available as a button. But it never processed and does not generate the host specific pxe boot files. The discovery image never restarts.

If I cancel the build, and then click again “Build” the pxe files are created and the discovery image reboots and the installation proceeds.

Edit: sry for digging out the thread from the grave - forgot we have 22 :blush:

1 Like

Hey and welcome.

You need to investigate why Foreman fails to send its reboot API command to FDI. Depending on the Subnet it detected, it can be either direct call (Foreman → Node) or via Discovery Proxy selected in your Subnet (Foreman → Proxy → Node).

You should see something in the logs (production.log) specifically if you enable debug messages, something like “Performing reboot via https://IP_ADDRES” or something like that. This smells like a network misconfiguration.