Jira (PUP-4045) Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

7 vistas
Ir al primer mensaje no leído

redmine.exporter (JIRA)

no leída,
26 feb 2015, 4:59:36 a.m.26/2/2015
para puppe...@googlegroups.com
redmine.exporter created an issue
 
Puppet / Bug PUP-4045
Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2015/02/26 1:58 AM
Labels: redmine
Priority: Normal Normal
Reporter: redmine.exporter

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

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a)
Atlassian logo

Peter Souter (JIRA)

no leída,
6 may 2015, 6:45:21 a.m.6/5/2015
para puppe...@googlegroups.com
Peter Souter updated an issue
Change By: Peter Souter
Using a slightly modified version of the code from "Pro Puppet" I am getting the following error:

{code}
    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
{code}

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

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

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

{code}
    $data_directory = "/var/lib/mysql"
{code}

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. 

{code}
    [root@media modules]# puppet --version
    2.6.8
    [root@media modules]# puppet master --version
    2.6.8
{code}
This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d)
Atlassian logo

Peter Souter (JIRA)

no leída,
6 may 2015, 6:47:21 a.m.6/5/2015
para puppe...@googlegroups.com
Peter Souter commented on Bug PUP-4045
 
Re: Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

As someone who encountered this recently, and needed to use the workaround of adding the socket files to the `ignore` parameter, you can find out what files are sockets with `tree` easy enough:

$ tree --inodes -F | grep =
│       │   ├── [2458821]  S_TCP=

So I needed to add this to my code:

ignore    => ['S_TCP']

Stephen Gelman (JIRA)

no leída,
18 abr 2017, 1:47:02 a.m.18/4/2017
para puppe...@googlegroups.com

I couldn't use ignore because it only matches the filename, not the patch and the socket was a non-unique name. I worked around it locally by adding an empty "when socket" case here:

https://github.com/puppetlabs/puppet/blob/3daa532/lib/puppet/file_serving/metadata.rb#L121

I don't think this is an acceptable solution long term so I am not going to PR it but i wanted to throw it out there in case it helps someone. One solution might be to change ignore to allow it to match on a path instead of just a filename.

This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Adrien Thebo (JIRA)

no leída,
15 may 2017, 7:57:03 p.m.15/5/2017
para puppe...@googlegroups.com

Adrien Thebo (JIRA)

no leída,
15 may 2017, 7:57:06 p.m.15/5/2017
para puppe...@googlegroups.com
Adrien Thebo commented on Bug PUP-4045
 
Re: Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

Peter Souter you're a person that knows things, what's the correct behavior in this case? We can definitely solve this problem but we don't know what behavior is correct.

Adrien Thebo (JIRA)

no leída,
15 may 2017, 7:58:02 p.m.15/5/2017
para puppe...@googlegroups.com

Moses Mendoza (JIRA)

no leída,
18 may 2017, 2:04:40 p.m.18/5/2017
para puppe...@googlegroups.com

Robert Weaver (JIRA)

no leída,
5 feb 2018, 6:54:02 a.m.5/2/2018
para puppe...@googlegroups.com
Robert Weaver commented on Bug PUP-4045
 
Re: Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

Hello Im getting the same issue running a backup job of the etc and /boot folder : 

Error

Feb  5 11:37:56 EDRSPUATV06 puppet-agent[7848]: (/Stage[main]/Backup::Backupvar/File[/tmp/backup/var]) Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

puppet --version
5.3.2

puppet code 

 

  

class backup::backupboot inherits backup{

  1. execution of the script will create a backup of the /etc/var directory to /tmp/backup

file { '/tmp/backup/boot':
mode => '644',
ensure => directory, # so make this a directory
recurse => true, # enable recursive directory management
purge => true, # purge all unmanaged junk
force => true, # also purge subdirs and links etc.
owner => "root",
group => "root",

  1. puppet will automatically set +x for directories
    source => '/boot',
    }

}

This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)
Atlassian logo

Josh Cooper (JIRA)

no leída,
29 mar 2019, 6:13:04 p.m.29/3/2019
para puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Team: Coremunity
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (Jira)

no leída,
15 may 2020, 12:25:03 p.m.15/5/2020
para puppe...@googlegroups.com
Josh Cooper assigned an issue to Unassigned
Change By: Josh Cooper
Assignee: Peter Souter
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

no leída,
11 jun 2020, 2:38:03 a.m.11/6/2020
para puppe...@googlegroups.com

Bartosz Blizniak (Jira)

no leída,
1 jul 2021, 5:31:01 a.m.1/7/2021
para puppe...@googlegroups.com
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

no leída,
1 jul 2021, 11:09:02 a.m.1/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
6 jul 2021, 8:31:02 a.m.6/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
6 jul 2021, 8:31:02 a.m.6/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
6 jul 2021, 8:32:01 a.m.6/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
6 jul 2021, 8:32:02 a.m.6/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
6 jul 2021, 8:32:03 a.m.6/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
6 jul 2021, 8:32:03 a.m.6/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
6 jul 2021, 8:33:01 a.m.6/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
6 jul 2021, 8:33:01 a.m.6/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
6 jul 2021, 8:33:02 a.m.6/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
6 jul 2021, 8:34:02 a.m.6/7/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
13 jul 2021, 10:17:03 a.m.13/7/2021
para puppe...@googlegroups.com

Beth Glenfield (Jira)

no leída,
13 jul 2021, 11:18:02 a.m.13/7/2021
para puppe...@googlegroups.com
Beth Glenfield commented on Bug PUP-4045
 
Re: Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

Hi Bartosz Blizniak, looking at the linked ticket it seems like the customer wants to manage socket file types? Or can they use the `ignore` parameter solution?

Ciprian Badescu (Jira)

no leída,
3 ago 2021, 5:03:04 a.m.3/8/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
1 oct 2021, 8:44:02 a.m.1/10/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
7 oct 2021, 5:23:02 a.m.7/10/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
18 oct 2021, 9:45:02 a.m.18/10/2021
para puppe...@googlegroups.com

Ciprian Badescu (Jira)

no leída,
3 nov 2021, 5:23:02 a.m.3/11/2021
para puppe...@googlegroups.com
Ciprian Badescu commented on Bug PUP-4045
 
Re: Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

we can add a new parameter ignore_type that should be similar to the already existing ignore parameter but it will check file type instead file name pattern

Ciprian Badescu (Jira)

no leída,
3 nov 2021, 5:29:04 a.m.3/11/2021
para puppe...@googlegroups.com

Dorin Pleava (Jira)

no leída,
16 nov 2021, 5:01:03 a.m.16/11/2021
para puppe...@googlegroups.com

Dorin Pleava (Jira)

no leída,
16 nov 2021, 6:13:02 a.m.16/11/2021
para puppe...@googlegroups.com
Dorin Pleava assigned an issue to Unassigned

Ciprian Badescu (Jira)

no leída,
17 nov 2021, 4:14:02 a.m.17/11/2021
para puppe...@googlegroups.com

Luchian Nemes (Jira)

no leída,
17 nov 2021, 8:42:03 a.m.17/11/2021
para puppe...@googlegroups.com

Luchian Nemes (Jira)

no leída,
6 dic 2021, 3:30:02 a.m.6/12/2021
para puppe...@googlegroups.com
Luchian Nemes updated an issue
Change By: Luchian Nemes
Release Notes: Bug Fix
Release Notes Summary: This release allows Puppet to retrieve attributes for `fifo` and `socket` files and manage them when given manifest has a `file` resource which is recursing over a given path.

Michael Hashizume (Jira)

no leída,
6 dic 2021, 5:45:02 p.m.6/12/2021
para puppe...@googlegroups.com

Michael Hashizume (Jira)

no leída,
6 dic 2021, 5:45:02 p.m.6/12/2021
para puppe...@googlegroups.com

Parker Leach (Jira)

no leída,
11 ene 2022, 11:16:01 p.m.11/1/2022
para puppe...@googlegroups.com
Parker Leach updated an issue
Change By: Parker Leach
Labels: customer docs_reviewed jira_escalated redmine
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos