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

0 views
Skip to first unread message

Bartosz Blizniak (Jira)

unread,
Jun 30, 2021, 4:41:03 AM6/30/21
to puppe...@googlegroups.com
Bartosz Blizniak created an issue
 
Puppet / Bug PUP-11135
Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket
Issue Type: Bug Bug
Affects Versions: PUP 7.6.0
Assignee: Unassigned
Components: Type System
Created: 2021/06/30 1:40 AM
Labels: customer
Priority: Normal Normal
Reporter: Bartosz Blizniak

Puppet Version: 7.6.0
Puppet Server Version: 2019.8.5
OS Name/Version: Rhel 8 on Agent

The customer is facing an issue with managing socket files on his system using the `FILE` resource in his custom module.

I have managed to replicate the issue by installing netcat on my VM and creating a .socket file by running: 

nc -lkU aSocket.sock

Not all socket files have this extension but they share the same file type which starts with "S" e.g: 

srwxrwxrwx 1 root root 0 Jun 29 11:15 aSocket.sock

Puppet doesn't seem to know how to handle this type of file and throws an error: 

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

**Customer code:
 

file { '/root': 
   ensure => directory, 
   owner => 'root', 
   recurse => true, 
   recurselimit => '2', 
   require => User['root'], 
}

 
 

Steps to replicate:

1. Install netcat 

2. Run: 

nc -lkU /tmp/aSocket.sock

3. Insert the following into 

/etc/puppetlabs/code/environments/production/manifests/site.pp
file {'/tmp': 
   ensure => directory, 
   owner => root, 
   recurse => true, 
}

4. Run: 

puppet apply -v --noop "/etc/puppetlabs/code/environments/production/manifests/site.pp"

 

The only way to currently get around this is to add the file to Ignore parameter but from what I can see, not all files have the .sock extension, the only thing that matches is the file type. 

Desired Behavior: Handle socket file types 

Actual Behavior: Throws an error

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Austin Boyd (Jira)

unread,
Jun 30, 2021, 4:42:02 AM6/30/21
to puppe...@googlegroups.com

Austin Boyd (Jira)

unread,
Jun 30, 2021, 4:42:02 AM6/30/21
to puppe...@googlegroups.com

Bartosz Blizniak (Jira)

unread,
Jun 30, 2021, 4:43:01 AM6/30/21
to puppe...@googlegroups.com
Bartosz Blizniak updated an issue
Change By: Bartosz Blizniak
Agent OS: RHEL 7 (x86_64) Other
Master OS: Other RHEL 7 (x86_64)

Josh Cooper (Jira)

unread,
Jul 1, 2021, 4:13:02 AM7/1/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11135
 
Re: Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

This is a dup of PUP-4045 so I'm going to close this. Please comment on/reference the existing ticket.

Reply all
Reply to author
Forward
0 new messages