Incorrect operatingsystem reported in puppet run

Bug #876130 reported by Jacob Helwig
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
facter (Ubuntu)
Fix Released
High
Adam Gandelman
Lucid
Fix Released
High
Unassigned
Maverick
Fix Released
High
Unassigned
Natty
Fix Released
High
Unassigned
Oneiric
Fix Released
High
Unassigned
Precise
Fix Released
High
Adam Gandelman

Bug Description

Facter will report the wrong operatingsystem when queried from a puppet agent run.

To demonstrate this:
  $ irb
  irb(main):001:0> require 'facter'
  => true
  irb(main):002:0> Facter.version
  => "1.5.9"
  irb(main):003:0> Facter["operatingsystem"].value
  => "Ubuntu"
  irb(main):004:0> Facter.clear
  => nil
  irb(main):005:0> Facter["operatingsystem"].value
  => "Debian"
  irb(main):006:0>

This has been fixed upstream in Facter 1.6.0+.
  % RUBYLIB=`pwd`/lib irb
  >> require 'facter'
  > true
  >> Facter.version
  > "1.6.0"
  >> Facter["operatingsystem"].value
  > "Ubuntu"
  >> Facter.clear
  > nil
  >> Facter["operatingsystem"].value
  > "Ubuntu"

For the upstream bug see: http://projects.puppetlabs.com/issues/7670

======
IMPACT:
 * Puppet users who make use of a puppetmaster and pluginsync can be bitten by this bug. After the master has synced plugins down to clients, facter clears its fact database. Some facts are inconsistent after clearing (see example above). Later puppet runs of modules and configuration that make use of facter facts will produce unexpected outcomes and system configuration.

ADDRESSED:
 * This bug has been fixed upstream and merged into Ubuntu Precise. The fix has can be cherry picked and applied to oneiric series and backported to earlier series.

REPRODUCE:
 * The irb test above can be used to reliably test whether a version is affected or not.

REGRESSION POTENTIAL:
 * The chances of regression are minimal. The upstream patch cherry-picked into the oneiric branch contains a fix and modification to unit tests. Previous versions contain a minimal patch that only contains the fix and does not touch unit tests as they did not exist in those versions.
======

Related branches

Changed in facter (Ubuntu):
status: New → Confirmed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

setting importance to High as it breaks puppet deployments.

Changed in facter (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Jacob- Thanks for taking the time to report this. I've pushed a patch [1] to the linked branch which should cleanly apply to all versions back to lucid (facter 1.5.6). I've also just uploaded a test package for oneiric to ppa:gandelman-a/build-tests (facter_1.5.9-1ubuntu2). If someone can test and confirm this fix, we can move to SRU.

I'm curious to know how critical this bug is as it seems to exist back to lucid but this is the first report.

Thanks

[1] http://bazaar.launchpad.net/~gandelman-a/ubuntu/oneiric/facter/lp876130/view/head:/debian/patches/reload_all_facts.patch

Changed in facter (Ubuntu):
assignee: nobody → Adam Gandelman (gandelman-a)
status: Triaged → In Progress
Revision history for this message
Jacob Helwig (jhelwig) wrote :

Adam,

I'm having trouble getting your PPA to work with the AMI images I've been using for testing (specifically the "official" ami-5936fa30). After adding the PPA using "sudo apt-add-repository ppa:gandelman-a/build-tests", facter_1.5.9-1ubuntu1 is still reported as the latest available.

However, as one of the original authors of the patch you pulled over, I can confirm that it is the correct fix for this problem.

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

@Jacob, sorry. Should have noted it'll probably be a while for the packages to make it through the queue and be available for install

Revision history for this message
Jacob Helwig (jhelwig) wrote :

Scratch that. Got it working. Dunno what I was doing wrong, but it's working with a fresh instance.

Confirmed that facter_1.5.9-1ubuntu2 from Adam's PPA fixes the issue for me on 11.10 using ami-5936fa30.

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

As per offline conversation with Jacob, unit tests in facter should also be patched with the fix where applicable (oneiric only) so the fix can be cherrypicked directly from upstream. For earlier releases (which do not include the unit tests), a minimal patch be backported to fix the issue.

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

This has been fixed upstream and in Ubuntu as of the latest facter upload to precise: facter (1.6.1-1ubuntu1)

Dave Walker (davewalker)
Changed in facter (Ubuntu Precise):
status: In Progress → Fix Released
description: updated
Changed in facter (Ubuntu Oneiric):
importance: Undecided → High
status: New → Triaged
Changed in facter (Ubuntu Natty):
importance: Undecided → High
status: New → Triaged
Changed in facter (Ubuntu Maverick):
importance: Undecided → High
status: New → Triaged
Changed in facter (Ubuntu Lucid):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

The branches linked for lucid, maverick, natty also resolve Bug #732953

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Jacob, or anyone else affected,

Accepted facter into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in facter (Ubuntu Oneiric):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Jacob, or anyone else affected,

Accepted facter into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in facter (Ubuntu Lucid):
status: Triaged → Fix Committed
Changed in facter (Ubuntu Natty):
status: Triaged → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Jacob, or anyone else affected,

Accepted facter into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Martin Pitt (pitti) wrote :

Hello Jacob, or anyone else affected,

Accepted facter into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in facter (Ubuntu Maverick):
status: Triaged → Fix Committed
Revision history for this message
Jacob Helwig (jhelwig) wrote :

I can confirm that the package in oneiric-proposed fixes this issue for me.

Revision history for this message
Jacob Helwig (jhelwig) wrote :

I can confirm that the packages in lucid-proposed fix this issue for me.

Revision history for this message
Jacob Helwig (jhelwig) wrote :

I can confirm that the package in natty-proposed fixes this issue for me.

Revision history for this message
Jacob Helwig (jhelwig) wrote :

I can confirm that the package in maverick-proposed fixes this issue for me.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks a lot for testing!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package facter - 1.5.6-2ubuntu2.2

---------------
facter (1.5.6-2ubuntu2.2) lucid-proposed; urgency=low

  * lib/facter/ec2.rb: Properly handle ip+port when testing connectivity
    of ec2 metadata service.(LP: #732953)
  * lib/facter/util/collection.rb: Backported fix from upstream commit
    2255abee7bdb9b6478ca228546e3d275dbac0ec3. Reload all facts if the
    requested fact is not found. Ensures consistency after facts
    have been cleared. (LP: #876130)
 -- Adam Gandelman <email address hidden> Tue, 25 Oct 2011 10:28:17 -0700

Changed in facter (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package facter - 1.5.7-1ubuntu1.2

---------------
facter (1.5.7-1ubuntu1.2) maverick-proposed; urgency=low

  * lib/facter/ec2.rb: Properly handle ip+port when testing connectivity
    of ec2 metadata service.(LP: #732953)
  * lib/facter/util/collection.rb: Backported fix from upstream commit
    2255abee7bdb9b6478ca228546e3d275dbac0ec3. Reload all facts if the
    requested fact is not found. Ensures consistency after facts
    have been cleared. (LP: #876130)
 -- Adam Gandelman <email address hidden> Tue, 25 Oct 2011 10:43:54 -0700

Changed in facter (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package facter - 1.5.8-2ubuntu2.1

---------------
facter (1.5.8-2ubuntu2.1) natty-proposed; urgency=low

  * debian/patches/reload_all_facts.patch: Reload all facts if the
    requested fact is not found. Ensures consistency after facts
    have been cleared. (LP: #876130)
  * debian/patches/fix_ec2_metadata_facts.patch: Properly handle ip+port
    when testing connectivity of ec2 metadata service.(LP: #732953)
 -- Adam Gandelman <email address hidden> Thu, 20 Oct 2011 10:40:35 -0700

Changed in facter (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package facter - 1.5.9-1ubuntu1.1

---------------
facter (1.5.9-1ubuntu1.1) oneiric-proposed; urgency=low

  * debian/patches/reload_all_facts.patch: Reload all facts if the
    requested fact is not found. Ensures consistency after facts
    have been cleared. (LP: #876130)
 -- Adam Gandelman <email address hidden> Tue, 18 Oct 2011 16:23:06 -0700

Changed in facter (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.