Theresa Arzadon-Labajo

undefined method `domain' for Facter:Module

Posted by Theresa Arzadon-Labajo (tarzadon) on Oct 21 2014
Tech Stuff >> Unix-Linux
After updating facter on our puppet server, /etc/cron.daily/foreman-reports now gives errors:
/etc/cron.daily/foreman-reports:

rake aborted!
undefined method `domain' for Facter:Module

(See full trace by running task with --trace)
(in /usr/share/foreman)
rake aborted!
undefined method `domain' for Facter:Module
Login to the puppet server:
# cd /usr/share/foreman/
# rake reports:summarize days=1 RAILS_ENV="production"  --trace
It gives the same error, along with a bunch of foreman errors. Searching Google led me to: https://groups.google.com/forum/#!topic/foreman-users/U6peC8ShvHE, which suggested:
Alternatively you can patch the source where these errors occur. It's a simple change moving from "Facter.domain" to "Facter.value(:domain)" (ditto for .fqdn etc).
Tried this,but the got the error:
rake aborted!
        undefined method `puppetversion' for Facter:Module
        /usr/share/foreman/config/initializers/puppet.rb:29
This led me to believe that it was an issue with facter, since foreman was working up until then. Saw that facter went from 1.6.18-1 to 2.2.0-1, which is a pretty big jump.
# yum remove facter
This wanted to remove foreman, puppet, puppet-server, puppet-server-selinux as depencies, so abort
rpm --nodeps -e facter
See which facter packages are available:
# yum list available facter*
Loaded plugins: downloadonly
Available Packages
facter.noarch                      1.6.18-1.sdl6             PUIAS_6_unsupported
facter.x86_64                      2.2.0-1.sdl6              PUIAS_6_unsupported
facter-debuginfo.x86_64            2.2.0-1.sdl6              PUIAS_6_unsupported
Install the older facter package
# yum install facter.noarch
Re-run foreman-reports
# rake reports:summarize days=1 RAILS_ENV="production"  --trace(in /usr/share/foreman)
** Invoke reports:summarize (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute reports:summarize
Got the email report.

Last changed: Feb 27 2020 at 4:01 PM

Back