[Puppet - Bug #7893] (Unreviewed) Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

308 views
Skip to first unread message

tic...@puppetlabs.com

unread,
Jun 12, 2011, 9:00:39 PM6/12/11
to ja...@lovedthanlost.net, je...@puppetlabs.com, puppe...@googlegroups.com, n...@puppetlabs.com, dom...@puppetlabs.com, thu...@thegoldfish.org
Issue #7893 has been reported by Tim Hughes.

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

  • Author: Tim Hughes
  • Status: Unreviewed
  • Priority: Normal
  • Assignee:
  • Category:
  • Target version:
  • Affected Puppet version: 2.6.8
  • Keywords: recurse, owner, group, socket
  • Branch:

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 2.6.8 [root@media modules]# puppet master —version 2.6.8


You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

tic...@puppetlabs.com

unread,
Jun 22, 2011, 6:13:21 PM6/22/11
to ja...@lovedthanlost.net, je...@puppetlabs.com, puppe...@googlegroups.com, n...@puppetlabs.com, dom...@puppetlabs.com, thu...@thegoldfish.org, Ma...@puppetlabs.com, peter...@immerda.ch, adr...@puppetlabs.com, ja...@puppetlabs.com
Issue #7893 has been updated by Adrien Thebo.
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Matt Robinson
  • Author: Tim Hughes
  • Status: Needs Decision
  • Priority: Normal
  • Assignee: Matt Robinson
  • Category:
  • Target version:
  • Affected Puppet version: 2.6.8
  • Keywords: recurse, owner, group, socket
  • Branch:

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
2.6.8
[root@media modules]# puppet master --version
2.6.8

tic...@puppetlabs.com

unread,
Jul 26, 2011, 2:25:57 PM7/26/11
to ja...@lovedthanlost.net, je...@puppetlabs.com, puppe...@googlegroups.com, r...@devco.net, n...@puppetlabs.com, dom...@puppetlabs.com, thu...@thegoldfish.org, ni...@puppetlabs.com, peter...@immerda.ch, adr...@puppetlabs.com, ja...@puppetlabs.com
Issue #7893 has been updated by Matt Robinson.
  • 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.

  • Author: Tim Hughes
  • Status: Needs Decision
  • Priority: Normal
  • Assignee: Nigel Kersten
  • Category:
  • Target version:
  • Affected Puppet version: 2.6.8
  • Keywords: recurse, owner, group, socket
  • Branch:

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
2.6.8
[root@media modules]# puppet master --version
2.6.8

tic...@puppetlabs.com

unread,
Nov 11, 2011, 5:27:51 PM11/11/11
to ja...@lovedthanlost.net, puppe...@googlegroups.com, r...@devco.net, krzysztof....@linux.com, tux...@gmail.com, sanjiv...@gmail.com, thu...@thegoldfish.org, ni...@puppetlabs.com, peter...@immerda.ch, adr...@puppetlabs.com, ja...@puppetlabs.com
Issue #7893 has been updated by Gabriel Schuyler.

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',
}
  • Author: Tim Hughes
  • Status: Needs Decision
  • Priority: Normal
  • Assignee: Nigel Kersten
  • Category:
  • Target version:
  • Affected Puppet version: 2.6.8
  • Keywords: recurse, owner, group, socket
  • Branch:

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
2.6.8
[root@media modules]# puppet master --version
2.6.8

tic...@puppetlabs.com

unread,
Jul 9, 2012, 12:10:36 PM7/9/12
to ja...@lovedthanlost.net, puppe...@googlegroups.com, r...@devco.net, k...@puppetlabs.com, tux...@gmail.com, ste...@zipkid.eu, thu...@thegoldfish.org, eric.s...@puppetlabs.com, peter...@immerda.ch, adr...@puppetlabs.com, ni...@puppetlabs.com
Issue #7893 has been updated by Nigel Kersten.
  • Assignee changed from Nigel Kersten to eric sorenson
  • Author: Tim Hughes
  • Status: Needs Decision
  • Priority: Normal
  • Assignee: eric sorenson
  • Category:
  • Target version:
  • Affected Puppet version: 2.6.8
  • Keywords: recurse, owner, group, socket
  • Branch:

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
2.6.8
[root@media modules]# puppet master --version
2.6.8

tic...@puppetlabs.com

unread,
Jul 16, 2012, 11:51:46 PM7/16/12
to ja...@lovedthanlost.net, puppe...@googlegroups.com, r...@devco.net, k...@puppetlabs.com, tux...@gmail.com, ste...@zipkid.eu, thu...@thegoldfish.org, eric.s...@puppetlabs.com, peter...@immerda.ch, adr...@puppetlabs.com, ni...@puppetlabs.com
Issue #7893 has been updated by eric sorenson.

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.

  • Author: Tim Hughes
  • Status: Needs Decision
  • Priority: Normal
  • Assignee: eric sorenson
  • Category:
  • Target version:
  • Affected Puppet version: 2.6.8
  • Keywords: recurse, owner, group, socket
  • Branch:

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
2.6.8
[root@media modules]# puppet master --version
2.6.8

tic...@puppetlabs.com

unread,
Aug 16, 2012, 9:37:46 PM8/16/12
to ja...@lovedthanlost.net, puppe...@googlegroups.com, r...@devco.net, k...@puppetlabs.com, tux...@gmail.com, ste...@zipkid.eu, thu...@thegoldfish.org, peter...@immerda.ch, adr...@puppetlabs.com, ni...@puppetlabs.com, eric.s...@puppetlabs.com
Issue #7893 has been updated by eric sorenson.
  • 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.

  • Author: Tim Hughes
  • Status: Accepted
  • Priority: Normal
  • Assignee:
  • Category:
  • Target version: 3.x
  • Affected Puppet version: 2.6.8
  • Keywords: recurse, owner, group, socket
  • Branch:

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
2.6.8
[root@media modules]# puppet master --version
2.6.8
Reply all
Reply to author
Forward
0 new messages