The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #11414

augeas provider version checks fails when version >0.9

Added by Theo Cabrerizo Diem over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:12/15/2011
Priority:HighDue date:
Assignee:Dominic Cleal% Done:

0%

Category:augeas
Target version:2.7.10
Affected Puppet version:0.24.8 Branch:https://github.com/puppetlabs/puppet/pull/283
Keywords:augeas

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

Just found that augeas resource isn’t saving my changes, although reporting successful in my environment (libaugeas 0.10.0).

Looking into lib/puppet/provider/augeas/augeas.rb , I’ve found some occurrences of like :

if get_augeas_version >= "0.3.6"

Using irb shell :

irb> "0.9.0" >= "0.3.6"
=> true
irb> "0.10.0" >= "0.3.6"
=> false
irb> require 'augeas'
=> true
irb> aug = Augeas::open('/').get('/augeas/version')
=> "0.10.0"

I’m not a ruby expert thus I cannot provide a patch, but I take that would be a better approach to compare versions using versioncmp from lib/puppet/util/package.rb ?

This bug makes augeas resource being unusable on environments that have upgraded augeas libraries to >= 0.10.0 . Also it doesn’t produce any errors but changes don’t get applied.

Sample output (when using 0.10.0, it does not apply changes) :

# puppet apply -d -v -e 'augeas { "abc": context => "/files/etc/puppet/puppet.conf", force => "true", changes => ["set agent/server changeme",], }'
<snip>
debug: Augeas[abc](provider=augeas): Opening augeas with root /, lens path , flags 0
debug: Augeas[abc](provider=augeas): Closed the augeas connection
debug: Augeas[abc](provider=augeas): Opening augeas with root /, lens path , flags 0
debug: Augeas[abc](provider=augeas): Closed the augeas connection
notice: /Stage[main]//Augeas[abc]/returns: executed successfully
<snip>

Related issues

Related to Puppet - Bug #12830: Behavior change of the augeas resource between 2.6.13 and... Rejected 02/25/2012

History

#1 Updated by Josh Cooper over 3 years ago

  • Description updated (diff)
  • Status changed from Unreviewed to Accepted
  • Target version set to 2.7.x

#2 Updated by Dominic Cleal over 3 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Keywords set to augeas
  • Branch set to https://github.com/puppetlabs/puppet/pull/283

#3 Updated by Josh Cooper over 3 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Assignee set to Dominic Cleal
  • Affected Puppet version set to 0.24.8

The original code for version checking was first released in 0.24.8 in commit:cf48ec0aba120e6e83e48b3499df9029b5302767 to support noop and overwrite modes. This fix has been merged into 2.7.x in https://github.com/puppetlabs/puppet/commit/ac81771a9cc70b5fb58f86439ebb0585ce92d4e8

#4 Updated by nathan hruby over 3 years ago

Hi,

EPEL just pushed augeas-0.10.0-2.el5 but is still on puppet-2.6.12-1.el5. It’s probable that this problem will pop up more. Would it be possible to push this fix into a 2.6 release as well?

Thanks,

-n

#5 Updated by Michael Stahnke over 3 years ago

2.6 will have no more releases. It’s not to difficult of a patch if tmz (Todd) wants to carry it.

#6 Updated by Michael Stahnke over 3 years ago

Wanted to note that this links to https://bugzilla.redhat.com/show_bug.cgi?id=771097

#7 Updated by Dominic Cleal over 3 years ago

The above RHBZ covers the update of Puppet 2.6 in EPEL and Fedora. For other users stuck on 2.6.x, this patch can be used: https://github.com/domcleal/puppet/commit/e3fc5c49.patch

#8 Updated by Michael Stahnke over 3 years ago

  • Status changed from Merged - Pending Release to Closed
  • Target version changed from 2.7.x to 2.7.10

released in 2.7.10rc1

Also available in: Atom PDF