I have a clean CentOS 6.6 install with Staypuft Foreman running. When
trying to provision a CentOS 7 host from bare metal I get the following
error on the machine being provisioned "Warning: failed to fetch kickstart
from http://foremanurl:80/unattended/provision?token=tokenidhere"
From the web interface of foreman I tried to take a look at the kickstart
script (provision template of the host) and get this error. "There was an
error rendering the Kickstart default template: The snippet
'kickstart_networking_setup' threw an error: private method `layout' called
for nil:NilClass"
From inside the production log of foreman I can see the internal 500 error.
"Started GET
"/unattended/provision?hostname=controller1.rnd.labs.boshgs.com" for
172.16.2.162 at 2014-11-14 12:45:17 -0500 Processing by
UnattendedController#provision as HTML Parameters:
{"hostname"=>"controller1.rnd.labs.boshgs.com"} Found
controller1.rnd.labs.boshgs.com Rendered inline template (1344.8ms)
Rendered text template (0.0ms) Completed 500 Internal Server Error in
1739ms (Views: 0.6ms | ActiveRecord: 44.8ms)"
This is all default code with no edits. Any ideas what could be causing
this? Thanks in advance!
> I have a clean CentOS 6.6 install with Staypuft Foreman running. When
> trying to provision a CentOS 7 host from bare metal I get the following
> error on the machine being provisioned "Warning: failed to fetch kickstart
> from http://foremanurl:80/unattended/provision?token=tokenidhere"
>
> From the web interface of foreman I tried to take a look at the kickstart
> script (provision template of the host) and get this error. "There was an
> error rendering the Kickstart default template: The snippet
> 'kickstart_networking_setup' threw an error: private method `layout' called
> for nil:NilClass"
>
> From inside the production log of foreman I can see the internal 500
> error. "Started GET "/unattended/provision?hostname=
> controller1.rnd.labs.boshgs.com" for 172.16.2.162 at 2014-11-14 12:45:17
> -0500 Processing by UnattendedController#provision as HTML Parameters:
> {"hostname"=>"controller1.rnd.labs.boshgs.com"} Found
> controller1.rnd.labs.boshgs.com Rendered inline template (1344.8ms)
> Rendered text template (0.0ms) Completed 500 Internal Server Error in
> 1739ms (Views: 0.6ms | ActiveRecord: 44.8ms)"
>
> This is all default code with no edits. Any ideas what could be causing
> this? Thanks in advance!
>
I'm guessing you are using Foreman 1.6, however staypuft needs 1.7, try
1.7RC1
Ohad
···
On Fri, Nov 14, 2014 at 8:01 PM, Tyson Hammen wrote:
–
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/d/optout.
For anyone else looking a bug has been opened for this. Comment or open a
similar bug if this affects you as
well. https://bugzilla.redhat.com/show_bug.cgi?id=1174381
Actually using 1.8 dev, should I revert to 1.7?
I'm facing this issue as well. Tyson, did you have any luck getting the
kickstart script to work?
···
On Friday, November 14, 2014 5:43:00 PM UTC-5, Tyson Hammen wrote:
>
> Actually using 1.8 dev, should I revert to 1.7?
>
I did not. This forum was my last hope. Ubuntu is starting to look really
good…
···
On Monday, November 17, 2014 1:20:00 AM UTC-5, Ryan Hefner wrote:
>
> I'm facing this issue as well. Tyson, did you have any luck getting the
> kickstart script to work?
>
> On Friday, November 14, 2014 5:43:00 PM UTC-5, Tyson Hammen wrote:
>>
>> Actually using 1.8 dev, should I revert to 1.7?
>>
>
I think you should stick with Foreman 1.7, I don't think staypuft devs are
testing with Foreman nightly. On the other hand you may want to use staypuft
and staypuft installer from nightly repos.
Hope this helps
···
On Monday 17 of November 2014 15:15:21 Tyson Hammen wrote:
> I did not. This forum was my last hope. Ubuntu is starting to look really
> good.....
>
> On Monday, November 17, 2014 1:20:00 AM UTC-5, Ryan Hefner wrote:
> > I'm facing this issue as well. Tyson, did you have any luck getting the
> > kickstart script to work?
> >
> > On Friday, November 14, 2014 5:43:00 PM UTC-5, Tyson Hammen wrote:
> >> Actually using 1.8 dev, should I revert to 1.7?
–
Marek
I got the same issue,
I'm using Centos6 with foreman 1.7 and latest staypuft nightly:
Does anyone know how to fix the "There was an error rendering the Kickstart
default template: The snippet 'kickstart_networking_setup' threw an error:
private method `layout' called for nil:NilClass" error ?
Thanks in advance,
···
On Tuesday, November 18, 2014 4:53:58 AM UTC-4, Marek Hulan wrote:
>
> On Monday 17 of November 2014 15:15:21 Tyson Hammen wrote:
> > I did not. This forum was my last hope. Ubuntu is starting to look
> really
> > good.....
> >
> > On Monday, November 17, 2014 1:20:00 AM UTC-5, Ryan Hefner wrote:
> > > I'm facing this issue as well. Tyson, did you have any luck getting
> the
> > > kickstart script to work?
> > >
> > > On Friday, November 14, 2014 5:43:00 PM UTC-5, Tyson Hammen wrote:
> > >> Actually using 1.8 dev, should I revert to 1.7?
>
> I think you should stick with Foreman 1.7, I don't think staypuft devs are
> testing with Foreman nightly. On the other hand you may want to use
> staypuft
> and staypuft installer from nightly repos.
>
> Hope this helps
>
> --
> Marek
>
Hi Carlos,
> I got the same issue,
>
> I'm using Centos6 with foreman 1.7 and latest staypuft nightly:
Me too. From http://yum.theforeman.org/plugins/nightly/el6/x86_64/ I
used foreman-installer-staypuft-0.5.1-1.el6.noarch.rpm with CentOS 6.6
and Foreman 1.7.
> Does anyone know how to fix the "There was an error rendering the
> Kickstart default template: The snippet 'kickstart_networking_setup'
> threw an error: private method `layout' called for nil:NilClass" error ?
I also see a nl:NilClass error during the creation of a new OpenStack
Deployment in the GUI when assigning the Tenants and External. But if I
go to the Dashboard in the GUI and select the Deployment again then I
can get to the next screen. Deploying to the discovered nodes results in
a kickstart file not found. If I try to open the link to the kickstart
file in a browser then I get an error message that something is wrong
with the kickstart file (sorry, don't recall exact message).
I sure would appreciate it if a Foreman/Staypuft developer would comment
how to fix these issues or which combination of Foreman & Staypuft can
actually deploy a couple of OpenStack nodes.
Best,
Patrick
···
On 08-12-14 05:14, Carlos Velez wrote:
> Hi Carlos,
>
> >I got the same issue,
> >
> >I'm using Centos6 with foreman 1.7 and latest staypuft nightly:
>
> Me too. From http://yum.theforeman.org/plugins/nightly/el6/x86_64/ I
> used foreman-installer-staypuft-0.5.1-1.el6.noarch.rpm with CentOS
> 6.6 and Foreman 1.7.
>
> >Does anyone know how to fix the "There was an error rendering the
> >Kickstart default template: The snippet 'kickstart_networking_setup'
> >threw an error: private method `layout' called for nil:NilClass" error ?
>
> I also see a nl:NilClass error during the creation of a new
> OpenStack Deployment in the GUI when assigning the Tenants and
> External. But if I go to the Dashboard in the GUI and select the
> Deployment again then I can get to the next screen. Deploying to the
> discovered nodes results in a kickstart file not found. If I try to
> open the link to the kickstart file in a browser then I get an error
> message that something is wrong with the kickstart file (sorry,
> don't recall exact message).
>
> I sure would appreciate it if a Foreman/Staypuft developer would
> comment how to fix these issues or which combination of Foreman &
> Staypuft can actually deploy a couple of OpenStack nodes.
>
Hello,
I'm seeing the same problem with the Foreman 1.7 / staypuft default kickstart scripts.
Any ideas how to fix it?
– Pasi
···
On Mon, Dec 08, 2014 at 02:59:32PM +0100, Patrick Foreman-ML wrote:
> On 08-12-14 05:14, Carlos Velez wrote:
Best,
Patrick
You need to use Foreman nightly/1.8 from
http://yum.theforeman.org/nightly/el6/x86_64/
And afaik the latest Staypuft stuff from
http://yum.theforeman.org/plugins/nightly/el6/x86_64/
HTH,
Patrick
···
On 11-12-14 13:42, Pasi Kärkkäinen wrote:
> On Mon, Dec 08, 2014 at 02:59:32PM +0100, Patrick Foreman-ML wrote:
>> Hi Carlos,
>>
>> On 08-12-14 05:14, Carlos Velez wrote:
>>> I got the same issue,
>>>
>>> I'm using Centos6 with foreman 1.7 and latest staypuft nightly:
>>
>> Me too. From http://yum.theforeman.org/plugins/nightly/el6/x86_64/ I
>> used foreman-installer-staypuft-0.5.1-1.el6.noarch.rpm with CentOS
>> 6.6 and Foreman 1.7.
>>
>>> Does anyone know how to fix the "There was an error rendering the
>>> Kickstart default template: The snippet 'kickstart_networking_setup'
>>> threw an error: private method `layout' called for nil:NilClass" error ?
>>
>> I also see a nl:NilClass error during the creation of a new
>> OpenStack Deployment in the GUI when assigning the Tenants and
>> External. But if I go to the Dashboard in the GUI and select the
>> Deployment again then I can get to the next screen. Deploying to the
>> discovered nodes results in a kickstart file not found. If I try to
>> open the link to the kickstart file in a browser then I get an error
>> message that something is wrong with the kickstart file (sorry,
>> don't recall exact message).
>>
>> I sure would appreciate it if a Foreman/Staypuft developer would
>> comment how to fix these issues or which combination of Foreman &
>> Staypuft can actually deploy a couple of OpenStack nodes.
>>
>
> Hello,
>
> I'm seeing the same problem with the Foreman 1.7 / staypuft default kickstart scripts.
>
> Any ideas how to fix it?
Just gave this a try and I still get the same error. Using 1.8 dev and
staypuft 0.5.3-1
Should mention I also tried 1.7 with the latest staypuft as well
···
On Saturday, December 13, 2014 2:02:12 PM UTC-5, Tyson Hammen wrote:
>
> Just gave this a try and I still get the same error. Using 1.8 dev and
> staypuft 0.5.3-1
>
Hi Tyson,
> Should mention I also tried 1.7 with the latest staypuft as well
>
>
> Just gave this a try and I still get the same error. Using 1.8 dev
> and staypuft 0.5.3-1
The only combination that is supposed to work/do something is Foreman
nightly (so 1.8) and Staypuft from plugins nightly. There's a fix for
the kickstart template issue which I tested and which solves it:
https://github.com/bcrochet/foreman-installer-staypuft/commit/0d73c29ea3dbc3e7655db8eeb470921110f4e719
Probably the best way to go about using Foreman+Staypuft is to always
use whatever is the latest in the nightly and plugins nightly repos
below and even then you might need to check for patches from upstream
git like a pasted before.
I'm not sure where to report bugs. Assuming one of the developers is
available I discuss them in #staypuft on irc.freenode.net.
Since that's different from the installer in RHEL-OSP: in current
Staypuft there's no longer a separate HA option because HA is always
enabled.
HTH,
Patrick
···
On 13-12-14 20:03, Tyson Hammen wrote:
> On Saturday, December 13, 2014 2:02:12 PM UTC-5, Tyson Hammen wrote:
>
> Hey Patrick,
I appreciate the help but I am a little confused on this. Going through the
kickstart script and through the ruby file I see the following code:
<% if @host.operatingsystem.name == 'Fedora' and os_major <= 16 -%>
Bootloader exception for Fedora 16:
bootloader --append="nofb quiet splash=quiet <%=ks_console%>" <%= grub_pass
%>
part biosboot --fstype=biosboot --size=1
<% else -%>
bootloader --location=mbr --append="nofb quiet splash=quiet" <%= grub_pass
%>
<% end -%>
%include /tmp/diskpart.cfg
text
reboot
%packages --ignoremissing
yum
dhclient
ntp
wget
@Core
epel-release
<% if puppet_enabled %>
puppet
<% if @host.params['enable-puppetlabs-repo'] &&
@host.params['enable-puppetlabs-repo'] == 'true' -%>
puppetlabs-release
<% end -%>
<% end -%>
%end
%pre
cat > /tmp/diskpart.cfg << EOF
<%= @host.diskLayout %>
EOF
ensures a valid disk is addressed in the partition table layout
sda is assumed and replaced if it is not correct
sed -i "s/sda/$(cat /proc/partitions | awk '{ print $4 }' | grep -e "^.d.$"
> sort | head -1)/" /tmp/diskpart.cfg
%end
%post --nochroot
exec < /dev/tty3 > /dev/tty3
So it has the relevant section from the fix but it also has a bit of extra
in there for puppet. Did you rebuild to fix or did you simply edit the
template? I am working off the latest nightly at the time from both foreman
and staypuft. I will look at the upstream for any other changes.
> Hey Patrick,
>
>
> I appreciate the help but I am a little confused on this. Going through
> the kickstart script and through the ruby file I see the following code:
Just to make sure, you are looking at the template with Name "Kickstart
default" and of Kind "Provision", right? On my VM it's this one:
https://foreman/config_templates/18-Kickstart%20default/edit
> <% if @host.operatingsystem.name == 'Fedora' and os_major <= 16 -%>
> # Bootloader exception for Fedora 16:
> bootloader --append="nofb quiet splash=quiet <%=ks_console%>" <%=
[snip]
> %post --nochroot
> exec < /dev/tty3 > /dev/tty3
>
> So it has the relevant section from the fix but it also has a bit of
> extra in there for puppet. Did you rebuild to fix or did you simply edit
> the template? I am working off the latest nightly at the time from both
> foreman and staypuft. I will look at the upstream for any other changes.
I simply edited the "Kickstart default" template. The fix (plus
potentially more stuff) may have already been rolled into the RPMs that
you are using. That would explain the presence of the fix.
HTH,
Patrick
···
On 15-12-14 17:30, Tyson Hammen wrote:
I am editing the default kickstart template which is set to a type of
provision when browsing through the templates and when looking at the node.
Problem is that even with this code I still see the same error when trying
to review the template and when trying to deploy a node.
···
On Monday, December 15, 2014 12:20:22 PM UTC-5, Patrick Foreman-ML wrote:
>
> On 15-12-14 17:30, Tyson Hammen wrote:
> > Hey Patrick,
> >
> >
> > I appreciate the help but I am a little confused on this. Going through
> > the kickstart script and through the ruby file I see the following code:
>
> Just to make sure, you are looking at the template with Name "Kickstart
> default" and of Kind "Provision", right? On my VM it's this one:
>
> https://foreman/config_templates/18-Kickstart%20default/edit
>
> > <% if @host.operatingsystem.name == 'Fedora' and os_major <= 16 -%>
> > # Bootloader exception for Fedora 16:
> > bootloader --append="nofb quiet splash=quiet <%=ks_console%>" <%=
>
> [snip]
>
> > %post --nochroot
> > exec < /dev/tty3 > /dev/tty3
> >
> > So it has the relevant section from the fix but it also has a bit of
> > extra in there for puppet. Did you rebuild to fix or did you simply edit
> > the template? I am working off the latest nightly at the time from both
> > foreman and staypuft. I will look at the upstream for any other changes.
>
> I simply edited the "Kickstart default" template. The fix (plus
> potentially more stuff) may have already been rolled into the RPMs that
> you are using. That would explain the presence of the fix.
>
> HTH,
> Patrick
>
Ok. When you see the error did you try to open the url to the generated
kickstart file and see what the error is? That might give a clue what's
going on. If not then you may want to ask on the #staypuft channel at
irc.freenode.net.
Did you fix the url to the CentOS 7 mirror? It says something like
$major.$minor but a CentOS 7 repo (mirror) has version 7 or 7.0.1406. I
removed ".$minor" so Foreman just looks for centos/7/… which is a
valid link in my C7 mirror.
HTH,
Patrick
···
On 15-12-14 18:24, Tyson Hammen wrote:
> I am editing the default kickstart template which is set to a type of
> provision when browsing through the templates and when looking at the
> node. Problem is that even with this code I still see the same error
> when trying to review the template and when trying to deploy a node.
Yes, I am using the "review" link on the node I am trying to provision and
I get this error: There was an error rendering the Kickstart default
template: The snippet 'kickstart_networking_setup' threw an error: private
method `layout' called for nil:NilClass
I also get the same error using the url generated during node deployment.
I am on irc but unfortunately nobody there seems to be available…
I did fix the mirror issue and the files downloaded correctly.
···
On Monday, December 15, 2014 1:00:51 PM UTC-5, Patrick Foreman-ML wrote:
>
> On 15-12-14 18:24, Tyson Hammen wrote:
> > I am editing the default kickstart template which is set to a type of
> > provision when browsing through the templates and when looking at the
> > node. Problem is that even with this code I still see the same error
> > when trying to review the template and when trying to deploy a node.
>
> Ok. When you see the error did you try to open the url to the generated
> kickstart file and see what the error is? That might give a clue what's
> going on. If not then you may want to ask on the #staypuft channel at
> irc.freenode.net.
>
> Did you fix the url to the CentOS 7 mirror? It says something like
> $major.$minor but a CentOS 7 repo (mirror) has version 7 or 7.0.1406. I
> removed ".$minor" so Foreman just looks for centos/7/... which is a
> valid link in my C7 mirror.
>
> HTH,
> Patrick
>
I couldn't find anything related to that. If you don't get a response in
#staypuft then I guess filing an issue makes sense:
http://projects.theforeman.org/projects/foreman/issues
Best,
Patrick
···
On 15-12-14 19:07, Tyson Hammen wrote:
> Yes, I am using the "review" link on the node I am trying to provision
> and I get this error: There was an error rendering the Kickstart default
> template: The snippet 'kickstart_networking_setup' threw an error:
> private method `layout' called for nil:NilClass