<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On 8 May 2014, at 02:25, Gilles Dubreuil <<a href="mailto:gilles@redhat.com">gilles@redhat.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br><br>----- Original Message -----<br><blockquote type="cite">From: "Ramon Acedo" <<a href="mailto:ramon@linux-labs.net">ramon@linux-labs.net</a>><br>To:<span class="Apple-converted-space"> </span><a href="mailto:rdo-list@redhat.com">rdo-list@redhat.com</a><br>Sent: Wednesday, 30 April, 2014 2:14:59 AM<br>Subject: [Rdo-list] Can't Deploy Foreman with openstack-foreman-installer<span class="Apple-tab-span" style="white-space: pre;"> </span>for Bare Metal Provisioning (undefined<br>method `[]' for nil:NilClass)<br><br>Hi all,<br><br>I have been trying to test the OpenStack Foreman Installer with different<br>combinations of Foreman versions and of the installer itself (and even<br>different versions of Puppet) with no success so far.<br><br>I know that Packstack alone works but I want to go all the way with multiple<br>hosts and bare metal provisioning to eventually use it for large deployments<br>and scale out Nova Compute and other services seamlessly.<br><br>The error I get when running the foreman_server.sh script is always:<br>--------------<br>rake aborted!<br>undefined method `[]' for nil:NilClass<br><br>Tasks: TOP => db:seed<br>(See full trace by running task with --trace)<br>--------------<br></blockquote><br>The above usually indicates there is something wrong with at least one puppet class.<br>Do you have openstack-puppet-modules installed?<br><br>Some of the devil's details:<br>foreman_server.sh triggers foreman's rake to seed its database.<br>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).<br>The above is happening because seeding script also parses puppet classes' parameters in order to inject them into Foreman.<br></div></blockquote><div><br></div><div>After modifying the script to use "rake —trace” this is what I got:</div><div><br></div><div>+ sudo -u foreman scl enable ruby193 'cd /usr/share/foreman; rake --trace db:seed RAILS_ENV=production FOREMAN_PROVISIONING=true'</div><div>** Invoke db:seed (first_time)</div><div>** Execute db:seed</div><div>** Invoke db:abort_if_pending_migrations (first_time)</div><div>** Invoke environment (first_time)</div><div>** Execute environment</div><div>** Invoke db:load_config (first_time)</div><div>** Execute db:load_config</div><div>** Execute db:abort_if_pending_migrations</div><div>Seeding /usr/share/foreman/db/seeds.d/05-architectures.rb</div><div>Seeding /usr/share/foreman/db/seeds.d/07-config_templates.rb</div><div>Seeding /usr/share/foreman/db/seeds.d/08-partition_tables.rb</div><div>Seeding /usr/share/foreman/db/seeds.d/10-installation_media.rb</div><div>Seeding /usr/share/foreman/db/seeds.d/11-permissions.rb</div><div>Seeding /usr/share/foreman/db/seeds.d/11-roles.rb</div><div>Seeding /usr/share/foreman/db/seeds.d/11-smart_proxy_features.rb</div><div>Seeding /usr/share/foreman/db/seeds.d/12-auth_sources.rb</div><div>Seeding /usr/share/foreman/db/seeds.d/13-compute_profiles.rb</div><div>Seeding /usr/share/foreman/db/seeds.d/15-bookmarks.rb</div><div>Seeding /usr/share/foreman/db/seeds.d/99-quickstack.rb</div><div>rake aborted!</div><div>undefined method `[]' for nil:NilClass</div><div><br></div><div>I’m still trying to further debug it.</div><div><br></div><br><blockquote type="cite"><div style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Cheers,<br>Gilles<br><br><blockquote type="cite"><br>After that, if Foreman starts, there’s nothing in the "Host groups" section<br>which is supposed to be prepopulated by the foreman_server.sh script (as<br>described in <a href="http://red.ht/1jdJ03q">http://red.ht/1jdJ03q</a>).<br><br>The process I follow is very simple:<br><br>1. Install a clean RHEL 6.5 or CentOS 6.5<br><br>2. Enable EPEL<br><br>3. Enable the rdo-release repo:<br><br> a. rdo-release-havana-7: Foreman 1.3 and openstack-foreman-installer 1.0.6<br> b. rdo-release-havana-8: Foreman 1.5 and openstack-foreman-installer 1.0.6<br> c. rdo-release-icehouse-3: Foreman 1.5 and openstack-foreman-installer 2.0<br> (as a note here, the SCL repo needs to be enabled before the next step<br> too).<br><br>4. Install openstack-foreman-installer<br><br>5. Create and export the needed variables:<br><br> export PROVISIONING_INTERFACE=eth0<br> export FOREMAN_GATEWAY=192.168.5.100<br> export FOREMAN_PROVISIONING=true<br><br>6. Run the script foreman_server.sh from<br>/usr/share/openstack-foreman-installer/bin<br><br>For 3a and 3b I also tried with an older version of Puppet (3.2) with the<br>same result.<br><br>These are the full outputs:<br><br>3a: <a href="http://fpaste.org/97739/">http://fpaste.org/97739/</a> (Havana and Foreman 1.3)<br>3b: <a href="http://fpaste.org/97760/">http://fpaste.org/97760/</a> (Havana and Foreman 1.3 with Puppet 3.2)<br>3c: <a href="http://fpaste.org/97838/">http://fpaste.org/97838/</a> (Icehouse and Foreman 1.5)<br><br>I’m sure somebody in the list has tried to deploy and configure Foreman for<br>bare metal installations (DHCP+PXE) and the documentation and the<br>foreman_server.sh script suggest it should be possible in a fairly easy way.<br><br>I filled a bug as it might well be one, pending confirmation:<br><a href="https://bugzilla.redhat.com/show_bug.cgi?id=1092443">https://bugzilla.redhat.com/show_bug.cgi?id=1092443</a><br><br>Any help is really appreciated!<br><br>Many thanks.<br><br>Ramon<br><br><br><br>_______________________________________________<br>Rdo-list mailing list<br><a href="mailto:Rdo-list@redhat.com">Rdo-list@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/rdo-list">https://www.redhat.com/mailman/listinfo/rdo-list</a></blockquote></div></blockquote></div><br></body></html>