Issue with 'node.rb' following upgrade to Foreman 1.7

Hello –

Following an upgrade to Foreman 1.7, I am now no longer able to retrieve
values from the ENC via the node.rb file. Please see below:

sudo -u puppet /etc/puppet/node.rb <fqdn>

Error retrieving node <fqdn>: Net::HTTPInternalServerError
Check Foreman's /var/log/foreman/production.log for more information.

From '/var/log/foreman/production.log':

Started GET "/node/<fqdn>?format=yml" for <ip> at 2014-12-03 15:19:47 -0500
Processing by HostsController#externalNodes as YML
Parameters: {"name"=>"<fqdn>"}
Operation FAILED: undefined method `find_by_lower_login' for
#<Class:0x000000060705e8>
Rendered common/500.html.erb within layouts/application (6.0ms)
Rendered layouts/base.html.erb (2.2ms)
Completed 500 Internal Server Error in 17ms (Views: 10.5ms | ActiveRecord:
0.1ms)

I have updated '/etc/puppet/node.rb' as per these instructions
<Foreman :: Manual>, and
created the '/etc/puppet/foreman.yaml' file, which did not previously
exist, replacing variables with their correct values as appropriate.

Please advise. What am I missing? This is a RHEL 6.x system.

Thanks,
– Adam

··· ______________________ *J. Adam Craig* Linux & Windows Operating Systems Engineer VCU Computer Center 804.828.4886

“Don’t be a phishing victim – VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details,
visit http://infosecurity.vcu.edu/phishing.html

Please disregard. The issue was that I neglected to run the following, as
per these instructions
<Foreman :: Manual>:

Step 3 - Post-upgrade steps
Step 3 (A) - Database migration and cleanup

The database should be migrated already, but you can make sure by executing
the migration script again, it should produce no errors or output:

foreman-rake db:migrate

foreman-rake db:seed

You should clear the cache and the existing sessions:

foreman-rake tmp:cache:clear

foreman-rake tmp:sessions:clear

Thanks,
– Adam

··· ______________________ *J. Adam Craig* Linux & Windows Operating Systems Engineer VCU Computer Center 804.828.4886

“Don’t be a phishing victim – VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details,
visit http://infosecurity.vcu.edu/phishing.html

On Wed, Dec 3, 2014 at 3:25 PM, J. Adam Craig jacraig@vcu.edu wrote:

Hello –

Following an upgrade to Foreman 1.7, I am now no longer able to retrieve
values from the ENC via the node.rb file. Please see below:

sudo -u puppet /etc/puppet/node.rb

Error retrieving node : Net::HTTPInternalServerError
Check Foreman’s /var/log/foreman/production.log for more information.

From ‘/var/log/foreman/production.log’:

Started GET “/node/?format=yml” for at 2014-12-03 15:19:47 -0500
Processing by HostsController#externalNodes as YML
Parameters: {“name”=>""}
Operation FAILED: undefined method `find_by_lower_login’ for
#Class:0x000000060705e8
Rendered common/500.html.erb within layouts/application (6.0ms)
Rendered layouts/base.html.erb (2.2ms)
Completed 500 Internal Server Error in 17ms (Views: 10.5ms | ActiveRecord:
0.1ms)

I have updated ‘/etc/puppet/node.rb’ as per these instructions
http://theforeman.org/manuals/1.7/index.html#3.5.5FactsandtheENC, and
created the ‘/etc/puppet/foreman.yaml’ file, which did not previously
exist, replacing variables with their correct values as appropriate.

Please advise. What am I missing? This is a RHEL 6.x system.

Thanks,
– Adam


J. Adam Craig
Linux & Windows Operating Systems Engineer
VCU Computer Center
804.828.4886

“Don’t be a phishing victim – VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details,
visit http://infosecurity.vcu.edu/phishing.html

I have a same problem while migrating off 1.5.3 to 1.7.1.

If I try to run db:migrate I get the following error (foreman-installer
gives me the same):

foreman-rake --trace db:migrate

rake aborted!
cannot load such file – apipie/middleware/checksum_in_headers
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in
require&#39; /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire'
/usr/share/foreman/config/application.rb:2:in &lt;top (required)&gt;&#39; /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in
require&#39; /usr/share/foreman/Rakefile:1:in<top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/rake_module.rb:25:in load&#39; /opt/rh/ruby193/root/usr/share/ruby/rake/rake_module.rb:25:inload_rakefile'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:501:in
raw_load_rakefile&#39; /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:82:inblock in
load_rakefile'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling&#39; /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:81:inload_rakefile'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:65:in block in run&#39; /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:instandard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in run&#39; /opt/rh/ruby193/root/usr/bin/rake:32:in<main>'

foreman-rake db:seed

rake aborted!
cannot load such file – apipie/middleware/checksum_in_headers

(See full trace by running task with --trace)

foreman-rake tmp:cache:clear

rake aborted!
cannot load such file – apipie/middleware/checksum_in_headers

(See full trace by running task with --trace)

··· #

I must be missing some package that installer does not bring in either.
Maybe some GEM?

Anyone had and solved this problem?
Thanks!