[Rdo-list] Can't Deploy Foreman with openstack-foreman-installer for Bare Metal Provisioning (undefined method `[]' for nil:NilClass)

Gilles Dubreuil gilles at redhat.com
Thu May 8 01:25:05 UTC 2014



----- Original Message -----
> From: "Ramon Acedo" <ramon at linux-labs.net>
> To: rdo-list at redhat.com
> Sent: Wednesday, 30 April, 2014 2:14:59 AM
> Subject: [Rdo-list] Can't Deploy Foreman with openstack-foreman-installer	for Bare Metal Provisioning (undefined
> method `[]' for nil:NilClass)
> 
> Hi all,
> 
> I have been trying to test the OpenStack Foreman Installer with different
> combinations of Foreman versions and of the installer itself (and even
> different versions of Puppet) with no success so far.
> 
> I know that Packstack alone works but I want to go all the way with multiple
> hosts and bare metal provisioning to eventually use it for large deployments
> and scale out Nova Compute and other services seamlessly.
> 
> The error I get when running the foreman_server.sh script is always:
> --------------
>  rake aborted!
>  undefined method `[]' for nil:NilClass
>   
>  Tasks: TOP => db:seed
>  (See full trace by running task with --trace)
> --------------

The above usually indicates there is something wrong with at least one puppet class.
Do you have openstack-puppet-modules installed?

Some of the devil's details:
foreman_server.sh triggers foreman's rake to seed its database.
The nil:NiClass means something is missing and usually when it happens, to be confirmed with rake's trace/logs it's because at least one puppet class is wrong (not validated).
The above is happening because seeding script also parses puppet classes' parameters in order to inject them into Foreman.

Cheers,
Gilles

> 
> After that, if Foreman starts, there’s nothing in the "Host groups" section
> which is supposed to be prepopulated by the foreman_server.sh script (as
> described in http://red.ht/1jdJ03q).
> 
> The process I follow is very simple:
> 
> 1. Install a clean RHEL 6.5 or CentOS 6.5
> 
> 2. Enable EPEL
> 
> 3. Enable the rdo-release repo:
> 
>   a. rdo-release-havana-7: Foreman 1.3 and openstack-foreman-installer 1.0.6
>   b. rdo-release-havana-8: Foreman 1.5 and openstack-foreman-installer 1.0.6
>   c. rdo-release-icehouse-3: Foreman 1.5 and openstack-foreman-installer 2.0
>   (as a note here, the SCL repo needs to be enabled before the next step
>   too).
> 
> 4. Install openstack-foreman-installer
> 
> 5. Create and export the needed variables:
> 
>    export PROVISIONING_INTERFACE=eth0
>    export FOREMAN_GATEWAY=192.168.5.100
>    export FOREMAN_PROVISIONING=true
> 
> 6. Run the script foreman_server.sh from
> /usr/share/openstack-foreman-installer/bin
> 
> For 3a and 3b I also tried with an older version of Puppet (3.2) with the
> same result.
> 
> These are the full outputs:
> 
> 3a: http://fpaste.org/97739/ (Havana and Foreman 1.3)
> 3b: http://fpaste.org/97760/ (Havana and Foreman 1.3 with Puppet 3.2)
> 3c: http://fpaste.org/97838/ (Icehouse and Foreman 1.5)
> 
> I’m sure somebody in the list has tried to deploy and configure Foreman for
> bare metal installations (DHCP+PXE) and the documentation and the
> foreman_server.sh script suggest it should be possible in a fairly easy way.
> 
> I filled a bug as it might well be one, pending confirmation:
> https://bugzilla.redhat.com/show_bug.cgi?id=1092443
> 
> Any help is really appreciated!
> 
> Many thanks.
> 
> Ramon
> 
> 
> 
> _______________________________________________
> Rdo-list mailing list
> Rdo-list at redhat.com
> https://www.redhat.com/mailman/listinfo/rdo-list
> 




More information about the dev mailing list