Ask Your Question
0

Augeas libnss-db error

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

PorkCharSui gravatar image

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

Hello,

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

EDIT

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_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# 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 ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

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

# 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'
#GRUB_GFXMODE=640x480

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

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

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

Comments

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
1

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

Comments

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

2 followers

Stats

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

Seen: 415 times

Last updated: Dec 02 '14