Provisioning problems, unattended not populated

I've been able to use the Foreman Users group up until now to resolve some
issues throughout the day, but it looks like my luck has finally run out.
Now that I've gotten past having my pxeboot file created for the build
process (didn't know you needed to define a subnet), I am stuck once
again. When the time comes for the ks file to be pulled from
unattended/provision I get the error "Unable to download the kickstart
file"…

If I try to navigate and use the spoof parameter to that path, I get a
"webpage cannot be found" error.

I'm fairly confident that the ks files aren't be generated. I have tried
to search on the filesystem to see where they would be located, but the
only instance of the "unattended" folder I find seems to contain default
data (/usr/share/foreman/app/views/unattended).

I have cleared out all previous httpd conf files so only the passenger,
puppet, and foreman ones exist from the foreman_installer. The messages
seen in the production log when I attempt to spoof are:

Started GET "/unattended/provision?spoof=10.20.20.10" for 10.20.24.77 at
2013-09-06 14:11:48 -0400
Processing by UnattendedController#provision as HTML
Parameters: {"spoof"=>"10.20.20.10"}
Redirected to https://foreman.domain.com/unattended/provision
Filter chain halted as :require_ssl rendered or redirected
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)

Started GET "/unattended/provision" for 10.20.24.77 at 2013-09-06 14:11:48
-0400
Processing by UnattendedController#provision as HTML
unattended: unable to find a host that matches the request from 10.20.24.77
Filter chain halted as :get_host_details rendered or redirected
Completed 404 Not Found in 4ms (ActiveRecord: 0.6ms)

When the kickstart process tries to download the file, I get nothing…

Any help is most appreciated! Thanks!

Some additional information… DHCP and DNS are managed seperately by a
windows server (not by my own choosing), and Foreman is managing CA, TFTP
and PuppetMaster only. I also turned off iptables for troubleshooting
purposes, which didn't make a difference… Thanks again!

··· On Friday, September 6, 2013 2:33:19 PM UTC-4, Adam Carlson wrote:

I’ve been able to use the Foreman Users group up until now to resolve some
issues throughout the day, but it looks like my luck has finally run out.
Now that I’ve gotten past having my pxeboot file created for the build
process (didn’t know you needed to define a subnet), I am stuck once
again. When the time comes for the ks file to be pulled from
unattended/provision I get the error “Unable to download the kickstart
file”…

If I try to navigate and use the spoof parameter to that path, I get a
"webpage cannot be found" error.

I’m fairly confident that the ks files aren’t be generated. I have tried
to search on the filesystem to see where they would be located, but the
only instance of the “unattended” folder I find seems to contain default
data (/usr/share/foreman/app/views/unattended).

I have cleared out all previous httpd conf files so only the passenger,
puppet, and foreman ones exist from the foreman_installer. The messages
seen in the production log when I attempt to spoof are:

Started GET “/unattended/provision?spoof=10.20.20.10” for 10.20.24.77 at
2013-09-06 14:11:48 -0400
Processing by UnattendedController#provision as HTML
Parameters: {“spoof”=>“10.20.20.10”}
Redirected to https://foreman.domain.com/unattended/provision
Filter chain halted as :require_ssl rendered or redirected
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)

Started GET “/unattended/provision” for 10.20.24.77 at 2013-09-06 14:11:48
-0400
Processing by UnattendedController#provision as HTML
unattended: unable to find a host that matches the request from 10.20.24.77
Filter chain halted as :get_host_details rendered or redirected
Completed 404 Not Found in 4ms (ActiveRecord: 0.6ms)

When the kickstart process tries to download the file, I get nothing…

Any help is most appreciated! Thanks!

> I've been able to use the Foreman Users group up until now to resolve some
> issues throughout the day, but it looks like my luck has finally run out.
> Now that I've gotten past having my pxeboot file created for the build
> process (didn't know you needed to define a subnet), I am stuck once
> again. When the time comes for the ks file to be pulled from
> unattended/provision I get the error "Unable to download the kickstart
> file"…
>
> If I try to navigate and use the spoof parameter to that path, I get a
> "webpage cannot be found" error.
>
> I'm fairly confident that the ks files aren't be generated. I have tried
> to search on the filesystem to see where they would be located, but the
> only instance of the "unattended" folder I find seems to contain default
> data (/usr/share/foreman/app/views/unattended).
>
> I have cleared out all previous httpd conf files so only the passenger,
> puppet, and foreman ones exist from the foreman_installer. The messages
> seen in the production log when I attempt to spoof are:
>
>
> Started GET "/unattended/provision?spoof=10.20.20.10" for 10.20.24.77 at
> 2013-09-06 14:11:48 -0400
> Processing by UnattendedController#provision as HTML
> Parameters: {"spoof"=>"10.20.20.10"}
> Redirected to https://foreman.domain.com/unattended/provision
> Filter chain halted as :require_ssl rendered or redirected
> Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
>
> Started GET "/unattended/provision" for 10.20.24.77 at 2013-09-06 14:11:48
> -0400
> Processing by UnattendedController#provision as HTML
> unattended: unable to find a host that matches the request from 10.20.24.77
>
see ^^ ?

Ohad

··· On Fri, Sep 6, 2013 at 9:33 PM, Adam Carlson wrote:

Filter chain halted as :get_host_details rendered or redirected
Completed 404 Not Found in 4ms (ActiveRecord: 0.6ms)

When the kickstart process tries to download the file, I get nothing…

Any help is most appreciated! Thanks!


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.

Ohad,

I was out last week, hence my lack of replies to your post, but thanks for
looking at it! In reply to what you put, the error is referencing the IP
address for the PC I am running vSphere client from, I never actually got a
spoofed template to return… so my spoofing still doesn't work, but to
show you the error I get when attempting to kickstart… is:

Started GET "/unattended/provision" for 10.20.20.12 at 2013-09-16 12:16:08
-0400
Processing by UnattendedController#provision as /
Found servera.work.com
Remove puppet certificate for servera.work.com
Adding autosign entry for servera.work.com
Rendered inline template (28.6ms)
Rendered text template (0.0ms)
Completed 500 Internal Server Error in 1334ms (Views: 0.9ms | ActiveRecord:
5.1ms)
The kickstart prompt them comes back and says its not able to download the
kicstart file.

The forman-proxy, proxy.log says the following:

D, [2013-09-16T12:21:40.755919 #25308] DEBUG – : Found puppetca at
/usr/bin/puppet
D, [2013-09-16T12:21:40.756149 #25308] DEBUG – : Found sudo at
/usr/bin/sudo
D, [2013-09-16T12:21:40.756216 #25308] DEBUG – : Executing /usr/bin/sudo
-S /usr/bin/puppet cert --clean servera.work.com
I, [2013-09-16T12:21:41.816079 #25308] INFO – : Attempt to remove
nonexistant client certificate for servera.work.com
E, [2013-09-16T12:21:41.816561 #25308] ERROR – : Attempt to remove
nonexistant client certificate for servera.work.com
I, [2013-09-16T12:21:41.922537 #25308] INFO – : Added servera.work.com to
autosign

FYI, there is a generic *.work.com entry in my auths.conf file,

Any assistance would be greatly appreciated! Thanks,
Adam

··· On Saturday, September 7, 2013 2:22:22 PM UTC-4, ohad wrote:

On Fri, Sep 6, 2013 at 9:33 PM, Adam Carlson <carlson....@gmail.com<javascript:> > > wrote:

I’ve been able to use the Foreman Users group up until now to resolve
some issues throughout the day, but it looks like my luck has finally run
out. Now that I’ve gotten past having my pxeboot file created for the
build process (didn’t know you needed to define a subnet), I am stuck once
again. When the time comes for the ks file to be pulled from
unattended/provision I get the error “Unable to download the kickstart
file”…

If I try to navigate and use the spoof parameter to that path, I get a
"webpage cannot be found" error.

I’m fairly confident that the ks files aren’t be generated. I have tried
to search on the filesystem to see where they would be located, but the
only instance of the “unattended” folder I find seems to contain default
data (/usr/share/foreman/app/views/unattended).

I have cleared out all previous httpd conf files so only the passenger,
puppet, and foreman ones exist from the foreman_installer. The messages
seen in the production log when I attempt to spoof are:

Started GET “/unattended/provision?spoof=10.20.20.10” for 10.20.24.77 at
2013-09-06 14:11:48 -0400
Processing by UnattendedController#provision as HTML
Parameters: {“spoof”=>“10.20.20.10”}
Redirected to https://foreman.domain.com/unattended/provision
Filter chain halted as :require_ssl rendered or redirected
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)

Started GET “/unattended/provision” for 10.20.24.77 at 2013-09-06
14:11:48 -0400
Processing by UnattendedController#provision as HTML
unattended: unable to find a host that matches the request from
10.20.24.77

see ^^ ?

Ohad

Filter chain halted as :get_host_details rendered or redirected
Completed 404 Not Found in 4ms (ActiveRecord: 0.6ms)

When the kickstart process tries to download the file, I get nothing…

Any help is most appreciated! Thanks!


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-user...@googlegroups.com <javascript:>.
To post to this group, send email to forema...@googlegroups.com<javascript:>
.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.

The poof URL should contain the IP for the host you are building, not for
the host you are running on. The IP is the default way for Foreman to
identify what to render, so you have to give it the IP of the Host you want
to render for. Ohad was saying that your previous error was that you were
trying to spoof a template for an IP that Foreman didn't recognise.

The best way to spoof a template is to go to the Host page for the
newly-provision host, and click the templates tab, followed by the "eye"
next to the Provision template. That should automatically generate the
correct spoof URL without worrying about what the IP needs to be.

I highly doubt provisioning will work if spoofing does not, as they use the
same basic code path - spoofing simple disables external actions like DNS
entries or Puppet autosign lines, so that you can check the content of the
template renders correctly. It sounds to my like the content isn't
rendering, so we should to fixing your spoofing first so we can discover
the real cause of your issues.

HTH,
Greg

··· On 16 September 2013 17:23, Adam Carlson wrote:

Ohad,

I was out last week, hence my lack of replies to your post, but thanks for
looking at it! In reply to what you put, the error is referencing the IP
address for the PC I am running vSphere client from, I never actually got a
spoofed template to return… so my spoofing still doesn’t work

Greg, thanks for the reply!

I had never noticed, let alone used the templates tab on a host before, so
thanks for that bit of information! The PXELinux Template renders just
fine, but the provision template does not. Does this mean that there is an
error within my template that could be preventing it from compiling??

Thanks again,

Adam

··· On Monday, September 16, 2013 12:32:33 PM UTC-4, Greg Sutcliffe wrote:

On 16 September 2013 17:23, Adam Carlson <carlson....@gmail.com<javascript:> > > wrote:

Ohad,

I was out last week, hence my lack of replies to your post, but thanks
for looking at it! In reply to what you put, the error is referencing the
IP address for the PC I am running vSphere client from, I never actually
got a spoofed template to return… so my spoofing still doesn’t work

The poof URL should contain the IP for the host you are building, not for
the host you are running on. The IP is the default way for Foreman to
identify what to render, so you have to give it the IP of the Host you want
to render for. Ohad was saying that your previous error was that you were
trying to spoof a template for an IP that Foreman didn’t recognise.

The best way to spoof a template is to go to the Host page for the
newly-provision host, and click the templates tab, followed by the "eye"
next to the Provision template. That should automatically generate the
correct spoof URL without worrying about what the IP needs to be.

I highly doubt provisioning will work if spoofing does not, as they use
the same basic code path - spoofing simple disables external actions like
DNS entries or Puppet autosign lines, so that you can check the content of
the template renders correctly. It sounds to my like the content isn’t
rendering, so we should to fixing your spoofing first so we can discover
the real cause of your issues.

HTH,
Greg

I'd give that a 99% likelihood. Up the logs to debug if you haven't already
and take a look at what gets written when you spoof the provision template.

Greg

··· On 16 September 2013 18:10, Adam Carlson wrote:

Greg, thanks for the reply!

I had never noticed, let alone used the templates tab on a host before, so
thanks for that bit of information! The PXELinux Template renders just
fine, but the provision template does not. Does this mean that there is an
error within my template that could be preventing it from compiling??

Greg,

So I replaced my kickstart template with another one that doesn't include
calling out variables, and snippets, and sure enough the spoofing works
now. Now I just need to track down the typo in my kickstart config… Let
me know if you know an easy way to do that…

Thanks again for your help! Looks like I'm finally on the road to success.
Adam

··· On Monday, September 16, 2013 1:31:41 PM UTC-4, Greg Sutcliffe wrote:

On 16 September 2013 18:10, Adam Carlson <carlson....@gmail.com<javascript:> > > wrote:

Greg, thanks for the reply!

I had never noticed, let alone used the templates tab on a host before,
so thanks for that bit of information! The PXELinux Template renders just
fine, but the provision template does not. Does this mean that there is an
error within my template that could be preventing it from compiling??

I’d give that a 99% likelihood. Up the logs to debug if you haven’t
already and take a look at what gets written when you spoof the provision
template.

Greg