Error Message: Could not set present on ensure: Function not implemented

596 views
Skip to first unread message

Jon Jaroker

unread,
Jan 29, 2014, 3:00:28 PM1/29/14
to puppet...@googlegroups.com
Hello, 

Would anyone know what the error message "Could not set present on ensure: Function not implemented" means.  It is appearing in Puppet 2.7.13 on a File resource type.  The --debug flag does not give any hints.  

The complete manifest triggering this error is located here:


The full error message is:

err: /Stage[main]//Node[bose]/Openvz::Bindmount[apps07]/File[Bind Mount Config for apps07 on bose]/ensure: change from absent to present failed: Could not set 'present on ensure: Function not implemented - /etc/vz/conf/1107.mount20140128-9690-11oic7u-0 at /etc/puppet/modules/common/openvz/manifests/bindmount.pp:47

The resource being managed (where the problem is occurring) is:

        file { "Bind Mount Config for ${container} on ${host}":
            ensure  => present,
            path    => $bind_conf,
            content => template('openvz/mount.conf.erb','common/header.sh.erb'),
            mode    => 740, #(Proxmox file system unable to chmod)
        }


Any suggestions on how to troubleshoot this?

Thank you,
Jon

jcbollinger

unread,
Jan 30, 2014, 9:13:36 AM1/30/14
to puppet...@googlegroups.com


On Wednesday, January 29, 2014 2:00:28 PM UTC-6, Jon Jaroker wrote:
Hello, 

Would anyone know what the error message "Could not set present on ensure: Function not implemented" means.  It is appearing in Puppet 2.7.13 on a File resource type.  The --debug flag does not give any hints.  
[...]

Any suggestions on how to troubleshoot this?



That's certainly an unhelpful message.  I suspect it really means "an unanticipated error occurred while trying to sync the target file's 'ensure' property".  Since you are ensuring "present", Puppet would only be trying to do something with the ensure property if [it thought that] the file does not yet exist.

Some things to look at:
  1. Unless you want to accommodate the possibility that the target file is a symlink, I would ensure 'file' rather than 'present'.  That is unlikely to resolve the problem, however.
  2. Check whether the File's target directory exists.
  3. Check whether the File's target directory is readable and writable to the Puppet agent.  Check that every directory in the path to it is readable.  Even with the agent running as a privileged user such as root, there are still ways that it might be denied access (e.g. SELinux, root squashing [for network filesystems]).

John

Jon Jaroker

unread,
Feb 7, 2014, 9:19:20 AM2/7/14
to puppet...@googlegroups.com
Hello John,

Thank you for the suggestions.  You were correct it was related to the 'ensure' property.

I discovered the actual cause of the problem to be fuse and symlink weirdness present in the latest version of Proxmox cluster.  It appears that Puppet first creates a temp file and then moves it to this Proxmox-managed, fuse location.  This move failed because of permission problems.  This problem did not exist in the previous version of Proxmox when configured as a cluster.

My debug approach was to manually reproduce Puppet's behavior, but first I had to realize that Puppet creates a file in /tmp and then moves it to the desired location. Creating the file inside the fuse-symlinked directory worked normally.

The workaround was to puppet-manage the files in a regular directory and then use an 'exec' resource to copy (not move) the file to its final location.  The new define includes a 'proxmox_workaround' flag to handle this special case.  I updated the wiki page to show this workaround: 


Regards,
Jon

---------------
Jon Jaroker


--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/L_sLXfw3mJw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/882a1699-d99c-43b8-af80-e3c0da5616b5%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages