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

Bug #13204

Augeas save under /boot causes no such file or directory errror

Added by Dominic Cleal over 2 years ago. Updated almost 2 years ago.

Status:ClosedStart date:03/18/2012
Priority:NormalDue date:
Assignee:Dominic Cleal% Done:

0%

Category:augeas
Target version:2.7.14
Affected Puppet version:2.7.12 Branch:https://github.com/puppetlabs/puppet/pull/587
Keywords:augeas enoent grub

We've Moved!

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

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

The following snippet generates an error:

augeas { "grub":
  context => "/files/boot/grub/menu.lst",
  changes => "set timeout 3",
}

err: /Stage[main]//Augeas[grub]: Could not evaluate: No such file or directory - /home/dcleal/code/puppet/augeas-examples/fakeroot/boot/grub/menu.lst.augnew

/boot/grub/menu.lst is a symlink to /boot/grub/grub.conf.

Root cause was due to bug #264 in Augeas, which caused it to return the saved path twice from /augeas/events/saved.

Because Puppet loops around this in 2.7.x, diffing and unlinking the new files, it errors on the second iteration. Since this happens in need_to_run?, no changes are made.

As a workaround, edit via /files/etc/grub.conf or /files/boot/grub/grub.conf (with lens/incl) instead of /files/boot/grub/menu.lst.


Related issues

Related to Puppet - Bug #11988: Augeas provider can clobber symlinks Closed 01/17/2012
Related to Puppet - Bug #13259: Augeas error: Could not evaluate: No such file or directory Duplicate 03/20/2012

History

#1 Updated by Dominic Cleal over 2 years ago

  • Status changed from Unreviewed to In Topic Branch Pending Review
  • Branch set to https://github.com/puppetlabs/puppet/pull/587

Opened pull request 587 with a workaround to check that the file exists first.

#2 Updated by Kelsey Hightower over 2 years ago

Dominic,

Thanks for the patch! Currently reviewing it now.

#3 Updated by Kelsey Hightower over 2 years ago

Looks like this patch causes some test failures:

Finished in 102.13 seconds
14558 examples, 4 failures, 87 pending
rspec ./spec/unit/provider/augeas/augeas_spec.rb:329
rspec ./spec/unit/provider/augeas/augeas_spec.rb:345
rspec ./spec/unit/provider/augeas/augeas_spec.rb:399
rspec ./spec/unit/provider/augeas/augeas_spec.rb:365

I have also upated the pull request as well.

#4 Updated by Dominic Cleal over 2 years ago

  • Affected Puppet version deleted (2.7.12rc2)

Sorry for that Kelsey, I’ve continued discussion on the pull request.

#5 Updated by Dominic Cleal over 2 years ago

  • Affected Puppet version set to 2.7.12

#6 Updated by Dominic Cleal over 2 years ago

  • Priority changed from Low to Normal
  • Keywords set to augeas enoent grub

#7 Updated by Jeff Weiss over 2 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version changed from 2.7.x to 2.7.14

#8 Updated by Matthaus Owens over 2 years ago

  • Status changed from Merged - Pending Release to Closed

Released in Puppet 2.7.14rc1

Also available in: Atom PDF