The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #7893

Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

Added by Tim Hughes almost 5 years ago. Updated about 1 year ago.

Status:AcceptedStart date:06/12/2011
Priority:NormalDue date:
Assignee:-% Done:


Target version:3.x
Affected Puppet version:2.6.8 Branch:
Keywords:recurse, owner, group, socket

We've Moved!

Ticket tracking is now hosted in JIRA:

This ticket is now tracked at:


Using a slightly modified version of the code from “Pro Puppet” I am getting the following error:

Jun 13 01:36:33 media puppet-agent[18196]: (/Stage[main]/Mysql::Config/File[mysql_data_dir]) Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

The file resource in mysql/manifests/config.pp is as follows:

file { "mysql_data_dir" :
    path => $mysql::params::data_directory,
    group => "mysql",
    owner => "mysql",
    recurse => true,
    require => File["my.cnf"],

And for this particular $operatingsystem (Fedora) the value for $data_directory in mysql/manifests/params.pp is :

$data_directory = "/var/lib/mysql"

By default mysql on a Fedora system places its mysql.sock file in the data directory but it appears when a you try and change the permissions recursively, puppet doesn’t know what to do with the socket file.

I can place the socket file elsewhere as a work around but I believe that puppet needs to ignore socket files when changing permissions.

[root@media modules]# puppet --version
[root@media modules]# puppet master --version

Related issues

Duplicated by Puppet - Feature #15976: Allow management of named pipes (in a File resource type) Duplicate 08/15/2012


#1 Updated by Adrien Thebo almost 5 years ago

  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Matt Robinson

#2 Updated by Matt Robinson almost 5 years ago

  • Assignee changed from Matt Robinson to Nigel Kersten

I don’t think I’m the one to authoritatively make this decision, but I’ll throw in my 2 cents and reassign to Nigel.

I don’t think you should recursively manage directories that contain socket files. I realize the MySQL default directory structure and configuration makes this inconvenient when using puppet, but the configuration should be easy enough to change if you’re already going to the trouble to manage ownership differently from what the package installation does.

#3 Updated by Gabriel Schuyler over 4 years ago

Meanwhile, a workaround is to ignore the socket. Something like this:

file { '/var/lib/mysql':
  owner => 'mysql',
  group => 'mysql',
  recurse => true,
  require => File['/etc/my.cnf'],
  ignore => 'mysql.sock',

#4 Updated by Nigel Kersten almost 4 years ago

  • Assignee changed from Nigel Kersten to eric sorenson

#5 Updated by eric sorenson almost 4 years ago

This error message is quite annoying and a simple File test should avoid it — we should simply skip sockets and named pipes since they (by definition) aren’t going to work off the source system.

#6 Updated by eric sorenson over 3 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee deleted (eric sorenson)
  • Target version set to 3.x

I take that back, #15976 has a valid use-case for actually managing non-regular files. It’d be worth making this work.

#7 Updated by cristian falcas about 1 year ago

Redmine Issue #7893 has been migrated to JIRA:

Also available in: Atom PDF