Ask Your Question

Augeas libnss-db error

asked 2014-11-24 07:08:37 -0500

PorkCharSui gravatar image

updated 2014-12-02 03:01:32 -0500


I'm having trouble with augeas. We're using auges to change '/etc/default/grub', which succeeds, so that's not the problem. But we get the following error message every time:

Debug: Augeas[etc-default-grub](provider=augeas): Opening augeas with root /, lens path , flags 32
Debug: Augeas[etc-default-grub](provider=augeas): Augeas version 1.2.0 is installed
Warning: Augeas[etc-default-grub](provider=augeas): Loading failed for one or more files, see debug for /augeas//error output
Debug: Augeas[etc-default-grub](provider=augeas): /augeas/files/etc/default/libnss-db/error = parse_failed
Debug: Augeas[etc-default-grub](provider=augeas): /augeas/files/etc/default/libnss-db/error/pos = 57
Debug: Augeas[etc-default-grub](provider=augeas): /augeas/files/etc/default/libnss-db/error/line = 4
Debug: Augeas[etc-default-grub](provider=augeas): /augeas/files/etc/default/libnss-db/error/char = 3
Debug: Augeas[etc-default-grub](provider=augeas): /augeas/files/etc/default/libnss-db/error/lens = /usr/share/augeas/lenses/dist/shellvars.aug:167.12-.99:
Debug: Augeas[etc-default-grub](provider=augeas): /augeas/files/etc/default/libnss-db/error/message = Syntax error
Debug: Augeas[etc-default-grub](provider=augeas): Will attempt to save and only run if files changed
Debug: Augeas[etc-default-grub](provider=augeas): sending command 'set' with params ["/files/etc/default/grub/GRUB_DISABLE_LINUX_UUID", "true"]
Debug: Augeas[etc-default-grub](provider=augeas): sending command 'set' with params ["/files/etc/default/grub/GRUB_SAVEDEFAULT", "true"]
Debug: Augeas[etc-default-grub](provider=augeas): sending command 'set' with params ["/files/etc/default/grub/GRUB_DEFAULT", "saved"]
Debug: Augeas[etc-default-grub](provider=augeas): Skipping because no files were changed
Debug: Augeas[etc-default-grub](provider=augeas): Closed the augeas connection

I've found some old threads(not in ask puppet) discussing this problem, but none with an answer. Can anyone tell me how to lose this error message?

Thanks in advance. Chris


Here is my manifest resource:

augeas {'etc-default-grub':
        context => '/files/etc/default/grub',
        changes => ["set GRUB_DISABLE_LINUX_UUID true",
                    "set GRUB_SAVEDEFAULT true",
                    "set GRUB_DEFAULT saved",

and the contents of /etc/default/grub:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

# Uncomment to disable graphical terminal (grub-pc only)

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
edit retag flag offensive close merge delete


Can you also provide your manifest (resource) and contents of /etc/default/grub?

domcleal gravatar imagedomcleal ( 2014-11-27 08:54:46 -0500 )edit

Thanks, which version of Puppet is it?

domcleal gravatar imagedomcleal ( 2014-12-02 03:25:33 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-12-02 03:29:55 -0500

domcleal gravatar image

This looks like PUP-1158 which affected Puppet 3.0 through to 3.4, fixed in 3.5.0.

The gist is that the provider is flagging up the warning on another file that's handled by the same Augeas lens/module incorrectly. The best thing to do is to upgrade Puppet to a more recent version to get the bug fix, or to work around it, you can add incl/lens parameters to your resource:

augeas {'etc-default-grub':
        context => '/files/etc/default/grub',
        incl    => '/etc/default/grub',
        lens    => 'Shellvars.lns',
        changes => ["set GRUB_DISABLE_LINUX_UUID true",
                    "set GRUB_SAVEDEFAULT true",
                    "set GRUB_DEFAULT saved",
edit flag offensive delete link more


Thanks domcleal... this was exactly the issue, which my colleague found out at the exact same time as your reply :P. I was confused because I could only find a "Shellvars.aug" file and not the "Shellvars.lns", when I tried including that it didn't work.

PorkCharSui gravatar imagePorkCharSui ( 2014-12-02 03:47:00 -0500 )edit

Yeah, that causes a bit of confusion. .aug is simply the file extension, but Shellvars.lns is referring to the "Shellvars" module, which is defined inside shellvars.aug and ".lns" refers to the "lns" definition inside that. "lns" is just a naming convention for a lens that works on the whole file.

domcleal gravatar imagedomcleal ( 2014-12-02 04:04:42 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-11-24 07:08:37 -0500

Seen: 393 times

Last updated: Dec 02 '14