Skip to content
This repository has been archived by the owner on Nov 26, 2018. It is now read-only.

ensure=absent seems broken #2

Open
docwhat opened this issue Jul 30, 2013 · 5 comments
Open

ensure=absent seems broken #2

docwhat opened this issue Jul 30, 2013 · 5 comments

Comments

@docwhat
Copy link

docwhat commented Jul 30, 2013

Using this code:

mounts { 'Old Collections':
  ensure => absent,
  source => 'nfsserver:/volume/data',
  dest   => '/old/mountpoint',
  type   => 'nfs',
  opts   => 'ro,auto,user,defaults,nofail',
}

I got this error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type notice at /etc/puppet/environments/testing/modules/mounts/manifests/init.pp:75 on node ourserver.example.com

So I commented out the notice("${dest} wasn't removed after... line 75 and tried again and got:

Error: /Stage[main]/OurServer::Testbeds/Mounts[Old Collections]/Fstab[fstab entry for nfsserver:/volume/data to /old/mountpoint as nfs]/Fstab::Augeas[fstab entry for nfsserver:/volume/data to /old/mountpoint as nfs]/Augeas[fstab entry for nfsserver:/volume/data to /old/mountpoint as nfs]: Could not evaluate: Error sending command 'match' with params nil/Unknown command

This second error may be in your fstab module, in which case I can file it against that if you want.

I tried using only the fstab module:

fstab { 'Old Collections':
  ensure => absent,
  source => 'nfsserver:/volume/data',
  dest   => '/old/mountpoint',
  type   => 'nfs',
}

And I got:

Error: /Stage[main]/OurServer::Testbeds/Fstab[Old Collections]/Fstab::Augeas[Old Collections]/Augeas[Old Collections]: Could not evaluate: Error sending command 'match' with params nil/Unknown command
@c33s
Copy link
Contributor

c33s commented Sep 27, 2013

see #4 the in the code notice is not called correct. notice has to be called notice("foo") not ```notice{"foo":}

@AlexCline
Copy link
Owner

@docwhat Can you provide verbose debugging output for this? You can email it to me if needed.

@byumark
Copy link

byumark commented Jan 7, 2014

Our issue seems similar to this one...

We use this module to mount 4 nfs exports. For the
first time today, we attempted "ensure => absent" and ran into some
issues. We were getting "invalid resource type" errors.

So I looked and saw that you had new versions, so I applied the new
versions as follows:

mounts 0.3.0 -> 0.3.1
fstab 0.5.3 -> 0.5.4
dirtree 0.2.0 -> 0.2.1

That original error went away, but now I've got other issues. Below
are the verbose logs from doing an agent run. I only included the
logs pertaining to 1 of those nfs exports, since the other 3 show the
exact same logs. Hopefully this will help

###BEGIN LOGS###

Debug: Exec/bin/umount '/Volumes/orange': Executing
check '/bin/mount -l | /bin/grep '/Volumes/orange''

Debug: Executing '/bin/mount -l | /bin/grep '/Volumes/orange''

Notice: /Volumes/orange wasn't removed after being unmounted. Please
remove it manually.

Notice: /Stage[main]/Mpsvfx::Nfs_mounts/Mounts[nfs_orange]/Notify[/Volumes/orange
wasn't removed after being unmounted. Please remove it
manually.]/message: defined 'message' as '/Volumes/orange wasn't
removed after being unmounted. Please remove it manually.'

Debug: /Stage[main]/Mpsvfx::Nfs_mounts/Mounts[nfs_orange]/Notify[/Volumes/orange
wasn't removed after being unmounted. Please remove it manually.]:
The container Mounts[nfs_orange] will propagate my refresh event

Debug: Augeasfstab entry for tps-na-01.mpsvfx.org:/vol/orange/orange
to /Volumes/orange as nfs
: Opening augeas with root
/, lens path , flags 32

Debug: Augeasfstab entry for tps-na-01.mpsvfx.org:/vol/orange/orange
to /Volumes/orange as nfs
: Augeas version 1.0.0 is
installed

Debug: Augeasfstab entry for tps-na-01.mpsvfx.org:/vol/orange/orange
to /Volumes/orange as nfs
: Loading failed for one or
more files, output from /augeas//error:

Debug: Augeasfstab entry for tps-na-01.mpsvfx.org:/vol/orange/orange
to /Volumes/orange as nfs
:
/augeas/files/etc/ld.so.conf.d/kernel-2.6.32-358.el6.x86_64.conf/error/pos
= 307

Debug: Augeasfstab entry for tps-na-01.mpsvfx.org:/vol/orange/orange
to /Volumes/orange as nfs
:
/augeas/files/etc/ld.so.conf.d/kernel-2.6.32-358.el6.x86_64.conf/error/line
= 6

Debug: Augeasfstab entry for tps-na-01.mpsvfx.org:/vol/orange/orange
to /Volumes/orange as nfs
:
/augeas/files/etc/ld.so.conf.d/kernel-2.6.32-358.el6.x86_64.conf/error/char
= 0

Debug: Augeasfstab entry for tps-na-01.mpsvfx.org:/vol/orange/orange
to /Volumes/orange as nfs
:
/augeas/files/etc/ld.so.conf.d/kernel-2.6.32-358.el6.x86_64.conf/error/lens
= /opt/puppet/share/augeas/lenses/dist/ldso.aug:31.10-.55:

Debug: Augeasfstab entry for tps-na-01.mpsvfx.org:/vol/orange/orange
to /Volumes/orange as nfs
:
/augeas/files/etc/ld.so.conf.d/kernel-2.6.32-358.el6.x86_64.conf/error/message
= Iterated lens matched less than it should

Debug: Augeasfstab entry for tps-na-01.mpsvfx.org:/vol/orange/orange
to /Volumes/orange as nfs
: Closed the augeas
connection

Error: /Stage[main]/Mpsvfx::Nfs_mounts/Mounts[nfs_orange]/Fstab[fstab
entry for tps-na-01.mpsvfx.org:/vol/orange/orange to /Volumes/orange
as nfs]/Fstab::Augeas[fstab entry for
tps-na-01.mpsvfx.org:/vol/orange/orange to /Volumes/orange as
nfs]/Augeas[fstab entry for tps-na-01.mpsvfx.org:/vol/orange/orange to
/Volumes/orange as nfs]: Could not evaluate: Error sending command
'match' with params nil/Unknown command

###END LOGS###

@sagar-khanna
Copy link

Same issue on:
CentOS 6.5
using AlexCline-fstab module

Receive a warning and an error when trying to remove a fstab entry

Warning: Scope(Fstab::Augeas[RemoveEphemeral]): Could not look up qualified variable 'fstab::variables::fstab_file'; class fstab::variables has not been evaluated
Error: /Stage[main]/Main/Fstab[RemoveEphemeral]/Fstab::Augeas[RemoveEphemeral]/Augeas[RemoveEphemeral]: Could not evaluate: Error sending command 'match' with params nil/Unknown command

@lth2h
Copy link

lth2h commented Oct 20, 2014

I get the same error about "sending command 'match' with params nil/Unknown command" I can provide more info if you need.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants