Rebuilding machines from foreman

425 views
Skip to first unread message

LOhit

unread,
Feb 18, 2010, 2:21:07 AM2/18/10
to puppet...@googlegroups.com
Hello,

I ran into this problem today, I am trying to implement "One click installation", I followed foreman howtos and set up the pre-requisites accordingly.

However, when I click on "Build" button, I get the following errors in the foreman's console and another error in the web interface indicating that the installation failed. Any ideas?

"PuppetCA: SSL/CA or puppetca unavailable on this machine"

"Failed to enable hostname_here for installation"

Thanks in advance.

--
LOhit

Ohad Levy

unread,
Feb 18, 2010, 9:21:13 AM2/18/10
to puppet...@googlegroups.com
Hi,


cheers,
Ohad

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Ohad Levy

unread,
Feb 18, 2010, 1:07:31 PM2/18/10
to puppet...@googlegroups.com
hmm.. another option, do you use a non-standard directory for puppet binaries ?

Ohad

LOhit

unread,
Feb 18, 2010, 11:14:47 PM2/18/10
to puppet...@googlegroups.com
Hi,

Actually, I have built custom RPMs of  Puppet & Facter tailored to meet the requirements of my environment. So, when I install these RPMs, the binaries go into "/usr/sbin" including "puppetca"
And Pupept & Foreman are started by root. Initially, I too thought that foreman was not able to find the "puppetca" binary, but then I wasn't sure.

I couldn't find much info anywhere, so thought of taking look at the code.

 def setBuild
    host = Host.find params[:id]
    if host.setBuild != false (if I set this to true, I get the right message in the web UI but, obviously that doesn't solve the problem)
      flash[:foreman_notice] = "Enabled #{host.name} for installation boot away"
    else
      flash[:foreman_error] = "Failed to enable #{host.name} for installation"
    end
    redirect_to :back
  end



So, the conditions are not being met to enable the host for installation.


PS: THIS IS A TEST SETUP, SO, I CAN TRY OUT DIFFERENT THINGS, PLEASE FEEL FREE TO SUGGEST FIXES. :)

Thanks,
--
LOhit

Ohad Levy

unread,
Feb 19, 2010, 5:33:25 AM2/19/10
to puppet...@googlegroups.com
the real error message is generated here: http://theforeman.org/repositories/entry/foreman/vendor/plugins/proxy/lib/proxy.rb#L80

which basically tests if the ca directory is available and puppetca can be found.
I'm guessing one of these two are missing (or in a non standard location).

cheers,
Ohad

LOhit

unread,
Feb 19, 2010, 6:56:58 AM2/19/10
to puppet...@googlegroups.com
Hi Ohad, You are a genius..!!! I owe you a beer. :)

My SSL directory is "/etc/puppet/ssl". I wasted one whole day trying to figure it out.

Thanks a bunch.

LOhit

unread,
Feb 22, 2010, 4:02:52 AM2/22/10
to puppet...@googlegroups.com
Hi,

I have hit one more dead end :(. After I click on the "Build" button, I get the message "Host xxx enabled for installation boot away". And I can see a link created in "/tftpboot/linux-install/pxelinux.cfg" with the MAC address of the machine being rebuilt.

However, the symlink points to a non-existent destination in the same directory. Example.

lrwxrwxrwx 1 puppet puppet 15 Feb 22 11:15 01-00-1b-78-32-44-90 -> RedHat-4-x86_64

Any help?

Regards,
-LOhit
--
LOhit

Ohad Levy

unread,
Feb 22, 2010, 4:24:15 AM2/22/10
to puppet...@googlegroups.com

LOhit

unread,
Feb 22, 2010, 5:30:58 AM2/22/10
to puppet...@googlegroups.com
Hi,

Yes, I did. And this is what I understand,

1) Clicking the "Build" button creates a pxe config file in the directory specified in "settings.yaml"

2) After the machine is rebuilt, this file/link is removed.

Please correct me if I am wrong.

Best regards,
-LOhit

Ohad Levy

unread,
Feb 22, 2010, 5:53:09 AM2/22/10
to puppet...@googlegroups.com
Hi,

Thats correct, but you still need to generate the config file (e.g. as in the examples) per OS.

I guess that in the near future (some code already exist on some github branch) that will auto copy the kernel / ramdisks and create the pxefiles directly.

cheers,
Ohad

LOhit

unread,
Feb 22, 2010, 6:09:08 AM2/22/10
to puppet...@googlegroups.com
Ahhh....!!! I thought those files would be generated automatically. One more item added to my foreman wishlist. :)

Please let me know if I can contribute in any way.


-LOhit

Ohad Levy

unread,
Feb 22, 2010, 6:47:12 AM2/22/10
to puppet...@googlegroups.com
:)

Lets start with feature requests for anything in your wishlist
Ohad

LOhit

unread,
Mar 15, 2010, 4:51:53 AM3/15/10
to puppet...@googlegroups.com
After upgrading to 0.1-4, I ran into the same problem.  "Failed to enable hostname_here for installation"

But, this time around, I don't see any messages/logs regarding the error. Link gets created in the TFTP directory, but nothing else. I have gone through the change log, I even tried changing the lines back to pre 0.1-4  version, but to no avail.

Best regards,
-LOhit

Ohad Levy

unread,
Mar 15, 2010, 5:41:06 AM3/15/10
to puppet...@googlegroups.com, forema...@googlegroups.com
Hi,

I would assume that you cant execute puppetca (e.g. sudo permissions etc), can you double check if there is nothing in the log files?

probably its best to continue this discussion at foreman users or #theforeman on irc.

cheers,
Ohad

LOhit

unread,
Mar 15, 2010, 6:27:53 AM3/15/10
to puppet...@googlegroups.com, forema...@googlegroups.com
Hi,

Sure, we can take it up on the irc channel. However, just for the record, sudo permission is fine, it was a   working setup prior to upgrade. And the user the foreman runs as, can execute "puppetca", I tested it from the command line to make sure.

Best regards,
-LOhit
Reply all
Reply to author
Forward
0 new messages