All hosts appear as 'Out of Sync'

I recently updated our foreman instance to 1.3.2 via the yum repo
packages. Afterwards, all of my hosts now appear with the orange "S" next
to them, specifying that they are "Out of sync". Tailing
/var/log/messages, I can see that the puppet agents are checking in with
the puppetmaster, but just not registering in foreman. What did I break?

Thanks,
Josh

Hmm, so I need to manually update these two scripts, and this is not
performed by the yum package? I see that I have the two referenced
scripts here:

[root@puppet tmp]# find / -name "external_node_v2*"
/usr/share/foreman-installer/modules/foreman/templates/external_node_v2.rb.erb

[root@puppet tmp]# find / -name "foreman-report_v2*"
/usr/share/foreman-installer/modules/foreman/templates/foreman-report_v2.rb.erb

To be honest, I am not entirely sure where to place these two scripts.
I see that there is a node.rb under /etc/puppet, and a few locations
for foreman.rb.

Josh

··· On 01/15/14 13:31, Michael Moll wrote: > Hi, > > On Wed, Jan 15, 2014 at 01:05:08PM -0800, Josh Preston wrote: >> I recently updated our foreman instance to 1.3.2 via the yum repo >> packages. Afterwards, all of my hosts now appear with the orange "S" next >> to them, specifying that they are "Out of sync". Tailing >> */var/log/messages*, I can see that the puppet agents are checking in with >> the puppetmaster, but just not registering in foreman. What did I break? > You probably need to update the report and ENC scripts: > http://theforeman.org/manuals/1.3/index.html#Upgradenotes

Sounds like reports are not being uploaded. Was this an upgrade from 1.2 or
older? If so, did you upgrade the report processor?

Greg

··· On 15 January 2014 21:05, Josh Preston wrote:

I recently updated our foreman instance to 1.3.2 via the yum repo
packages. Afterwards, all of my hosts now appear with the orange “S” next
to them, specifying that they are “Out of sync”. Tailing
/var/log/messages, I can see that the puppet agents are checking in
with the puppetmaster, but just not registering in foreman. What did I
break?

Greg,

Looking back at my previous yum.log, I had foreman 1.2.3 installed. How do
I go about confirming if the report processor was upgraded? Initially I
simply (and blindly) executed a yum update to get the new foreman
packages. After noticing the "Out of Sync" issue, I began reading through
the "Upgrade to Foreman 1.3" notes, and confirmed that:

  • The new foreman repo config was in place under /etc/yum.conf.d
  • Foreman and ruby packages were all updated.
  • The foreman-rake db:migrate command was applied.

I followed this up with a restart of foreman and httpd.

Thanks,
Josh

··· On Wednesday, January 15, 2014 1:47:44 PM UTC-8, Greg Sutcliffe wrote: > > On 15 January 2014 21:05, Josh Preston <jo...@joshpreston.net > > wrote: > >> I recently updated our foreman instance to 1.3.2 via the yum repo >> packages. Afterwards, all of my hosts now appear with the orange "S" next >> to them, specifying that they are "Out of sync". Tailing >> */var/log/messages*, I can see that the puppet agents are checking in >> with the puppetmaster, but just not registering in foreman. What did I >> break? >> > > Sounds like reports are not being uploaded. Was this an upgrade from 1.2 > or older? If so, did you upgrade the report processor? > > Greg >

> Hmm, so I need to manually update these two scripts, and this is not
> performed by the yum package?

Yes, if you look into those scripts, you will see that some parameters
in the headers have to be filled, foreman-installer would take care of
this automatically, otherwise some hand work is required.

> I see that there is a node.rb under /etc/puppet

/etc/puppet/node.rb should be fine, in your puppet.conf in the
master-section you will see a line like:
external_nodes = /etc/puppet/node.rb

> and a few locations for foreman.rb.

On Debian this is going into
/usr/lib/ruby/vendor_ruby/puppet/reports/
and generally into ${puppet_basedir}/reports/foreman.rb

··· On Wed, Jan 15, 2014 at 02:28:04PM -0800, Josh Preston wrote:


Michael Moll

Michael,

Thank you for the help! I manually copied both scripts over, transferring
the parameters. I restarted foreman-proxy, followed by executing a puppet
agent --test
from one of my nodes, and now that host shows up green and
happy.

Just for reference, these were the complete steps I took. I am on a CentOS
host:

  1. backed up /etc/puppet/node.rb
  2. copied
    /usr/share/foreman-installer/modules/foreman/templates/external_node_v2.rb.erbto
    /etc/puppet/node.rb
  3. Set the ownership and mode

chown puppet:puppet /etc/puppet/node.rb && chmod 0550

/etc/puppet/node.rb
4. Took the values found in SETTINGS inside of the original node.rb,
and applied them in the new copy of node.rb
5. backed up /usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb
6. copied
/usr/share/foreman-installer/modules/foreman/templates/foreman-report_v2.rb.erbto
/usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb
7. Set the ownership and mode

chown puppet:puppet foreman.rb && chmod 444 foreman.rb

  1. Took the values $foreman_url, $foreman_ssl_ca, $foreman_ssl_cert, and
    $foreman_ssl_key, and applied them in the new foreman.rb file.
  2. Restarted foreman-proxy, foreman, and httpd using their init.d
    scripts.

Thanks again.

Josh

··· On Wednesday, January 15, 2014 2:41:52 PM UTC-8, Michael Moll wrote: > > On Wed, Jan 15, 2014 at 02:28:04PM -0800, Josh Preston wrote: > > Hmm, so I need to manually update these two scripts, and this is not > > performed by the yum package? > > Yes, if you look into those scripts, you will see that some parameters > in the headers have to be filled, foreman-installer would take care of > this automatically, otherwise some hand work is required. > > > I see that there is a *node.rb* under */etc/puppet* > > /etc/puppet/node.rb should be fine, in your puppet.conf in the > master-section you will see a line like: > external_nodes = /etc/puppet/node.rb > > > and a few locations for *foreman.rb*. > > On Debian this is going into > /usr/lib/ruby/vendor_ruby/puppet/reports/ > and generally into ${puppet_basedir}/reports/foreman.rb > > -- > Michael Moll >

Glad you got it working Josh. For the record, (in case others find this
thread) both upgrades are mentioned in the Upgrade Notes section of the 1.3
manual - Foreman :: Manual

Obviously the notes aren't that detailed, so thanks for the extra steps :slight_smile:

Greg

··· On 15 January 2014 23:31, Josh Preston wrote:

Michael,

Thank you for the help! I manually copied both scripts over, transferring
the parameters. I restarted foreman-proxy, followed by executing a puppet
agent --test
from one of my nodes, and now that host shows up green and
happy.