ArgumentError (There was no default layout for UnattendedController)

Hi all,

I don't have any problems with provisioning, but if I want to review the
provision template from Foreman web-interface I get the following error.

Host -> Templates -> provision template -> Review

Web-interface shows: "We're sorry, but something went wrong. We've been
notified about this issue and we'll take a look at it shortly."

In the log file /var/log/foreman/production.log I see:

Operation FAILED: undefined method `layout' for nil:NilClass
Completed 500 Internal Server Error in 12ms

ArgumentError (There was no default layout for UnattendedController in
#<ActionView::PathSet:0x0000000ad60380
@paths=[/usr/share/foreman/app/views,
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-1.1.1/app/views,
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.4/app/views,
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/app/views]>):
app/controllers/application_controller.rb:307:in generic_exception&#39; lib/middleware/catch_json_parse_errors.rb:9:incall'

It's happening only with provision template and only with "Review". I can
edit all templates and review PXE, user data and finish template under host
page.

Does anybody see this?

Thanks!

Perhaps check the host has a partition table assigned under the
Operating System tab, and re-save the host to be sure. "layout" is
related to partition tables.

··· On 31/03/15 21:05, tyon wrote: > I don't have any problems with provisioning, but if I want to review the > provision template from Foreman web-interface I get the following error. > > Host -> Templates -> provision template -> Review > > Web-interface shows: "We're sorry, but something went wrong. We've been > notified about this issue and we'll take a look at it shortly." > > In the log file /var/log/foreman/production.log I see: > > > > OperationFAILED:undefinedmethod `layout' for nil:NilClass > >


Dominic Cleal
Red Hat Engineering

Hi Dominic,

Thank you for your answer.

The partition table under Operating system is Kickstart default. I
re-saved, but I have the same result.

Perhaps it's related with installation of foreman_salt and foreman_docker
plugin (both of the plugins are mentioned in the error message).

I updated my templates with templates
plugin https://github.com/theforeman/foreman_templates because I installed
salt plugin on the existing Foreman installation.

foreman-rake templates:sync

Foreman doesn't accept Salt keys automatically. I had to specify my domains
in autosign file.

Foreman_docker plugin causes me some troubles as well. I cannot create
Docker compute resource. The error in log file is:

CR_ID IS null
String does not start with the prefix 'encrypted-', so ForemanDocker::Docker
docker.com was not decrypted

I don't know if it can be related, but I don't think I had a problem before
with reviewing provision template.

Provisioning on Bare Metal and VMWare and integration with Puppet works
fine.

Thanks a lot in advance.

··· On Wednesday, April 1, 2015 at 8:07:29 AM UTC-7, Dominic Cleal wrote: > > On 31/03/15 21:05, tyon wrote: > > I don't have any problems with provisioning, but if I want to review the > > provision template from Foreman web-interface I get the following error. > > > > Host -> Templates -> provision template -> Review > > > > Web-interface shows: "We're sorry, but something went wrong. We've been > > notified about this issue and we'll take a look at it shortly." > > > > In the log file /var/log/foreman/production.log I see: > > > > > > > OperationFAILED:undefinedmethod `layout' for nil:NilClass > > > > > Perhaps check the host has a partition table assigned under the > Operating System tab, and re-save the host to be sure. "layout" is > related to partition tables. > > -- > Dominic Cleal > Red Hat Engineering >