Bug #1529
closed
Cannot delete an host for which puppet does not have a certificate
Added by David Douard almost 13 years ago.
Updated about 12 years ago.
Description
Hi,
While playing with provisioning (libvirt) guest hosts, I've been hit by a bug that prevent me from deleting a host using the Foreman GUI.
The host is created using the Foreman web interface. It's a libvirt guest, using a custom PXELinux provisioning template.
When trying to delete it before it has registered to the puppet master, I have the following error message:
Failed to remove test3.vm.logilab.fr's puppet certificate: Failed to remove certificate(s) for
test3.vm.logilab.fr: SSL/CA unavailable on this machineFailed to generate PXELinux
template: Missing host to link to! Please provide :host parameter or set
default_url_options[:host]Failed to perform rollback on DHCP Settings for
test3.vm.logilab.fr - undefined method `create' for nil:NilClass
Just realized I did not tell that I am using the stable deb package you provide (aka 0.4.2).
The problem persist with latest nighty build deb package (0.5-~nightlybuild1322446320).
As a quick and dirty fix, I've just made the "failure" statement in the delCertificate (app/models/orchestration/puppetca.rb) a "logger.info". This allowed me to remove the host from the web UI.
This issue is still present in foreman-1.0.1-1.el6.noarch.
Failed to remove test.xxx's puppet certificate: 406 Not Acceptable
Failed to generate PXELinux template: Missing host to link to! Please provide :host parameter or set default_url_options[:host]
My crude workaround is to run `puppetca generate test.xxx` and then delete the host from the foreman UI.
This shouldn't happen unless you are using puppet 2.7.19 with the stable proxy - I certainly can delete hosts with no certificate in Foreman 1.0.1. Can you confirm if that's your setup? (2.7.19, stable proxy)
That is indeed my setup
[root@ctrl ~]# rpm -qa | egrep 'foreman|puppet'
puppet-2.7.19-1.el6.noarch
foreman-1.0.1-1.el6.noarch
foreman-release-1.0.1-1.el6.noarch
foreman-proxy-1.0.0-3.el6.noarch
foreman-libvirt-1.0.1-1.el6.noarch
foreman-cli-1.0.1-1.el6.noarch
foreman-ec2-1.0.1-1.el6.noarch
foreman-console-1.0.1-1.el6.noarch
puppetlabs-release-6-6.noarch
puppet-server-2.7.19-1.el6.noarch
rubygem-foremancli-1.0-1.el6.noarch
- Target version set to Bug scrub
- Status changed from New to Resolved
so all's required is to update the proxy
Also available in: Atom
PDF