The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #14105

aug object is closed on need_to_run but is neede after that in execute_changes.

Added by Jorge Eduardo Cardona about 4 years ago. Updated about 3 years ago.

Status:AcceptedStart date:04/19/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:3.x
Affected Puppet version: Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


First I’m using Debian with puppet 2.7.13-1 and libaugeas0 0.9.0-1, and ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

I’m just trying to set some sudoers settings but fails with this behavior:

1) need_to_run is called and it calls the method close at the end because returns a nil, and everyone knows that not nil is true ;) 2) after that the execute_changes method needs the @aug object but is not there then fails with a “change from need_to_run to 0 failed: undefined method `match' for nil:NilClass”

I commented the all the code in the conditional in provider/augeas/augeas.rb with the “if not return_value or resource.noop? or not save_result”, then close is not called and works perfectly, I don’t really know what is going on since says that save must return 0 or 1.

Maybe I’m skipping something obvious here, but the augeas code runs perfectly using augtool, so. I have no idea what it is, and this seems as a bug for me.

Hope this can help.


Related issues

Related to Puppet - Refactor #18569: Implement "whiny nil" for Puppet, solve `Undefined method... Rejected


#1 Updated by Jorge Eduardo Cardona about 4 years ago

Oo, I’m using force, then save_result is never defined since that is inside the “unless force” block. Setting save_result = true at the beginning of need_to_run will solve this.

#2 Updated by Anonymous about 4 years ago

  • Category set to Doh!
  • Status changed from Unreviewed to Accepted

#3 Updated by Anonymous about 4 years ago

  • Target version set to 3.x

#4 Updated by Jorge Eduardo Cardona about 4 years ago

First time on ruby so, but here is it: with rspec (I like it but didn’t like the global variables everywhere.)

#5 Updated by Anonymous over 3 years ago

Looking at the code in master, it looks like this problem is solved. Can you confirm that?

#6 Updated by Adrien Thebo about 3 years ago

I’ve looked at this code and while it isn’t clear if the issue is resolved in master, the tests don’t seem to cover the behavior change. Since there hasn’t been an update on the pull request or this ticket i’m going to close the pull request.

Also available in: Atom PDF