Jira (PUP-11594) Puppet::Util.safe_posix_fork fails if /proc/self is not a directory

26 views
Skip to first unread message

Clay Caviness (Jira)

unread,
Jul 20, 2022, 12:28:02 PM7/20/22
to puppe...@googlegroups.com
Clay Caviness created an issue
 
Puppet / Bug PUP-11594
Puppet::Util.safe_posix_fork fails if /proc/self is not a directory
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2022/07/20 9:27 AM
Priority: Normal Normal
Reporter: Clay Caviness

Puppet Version: 7.12.0
Puppet Server Version: N/A
OS Name/Version: macOS 12.5

If a host has /proc/self but as a file, safe_posix_fork will throw an unhandled Errno::ENOTDIR, leading to a failed puppet run.

This is not typical, but we had a user on a macOS 12 machine set up /proc/self in this way:

  1. Append proc Volumes/proc to /etc/synthentic.conf
  2. sudo mkdir /Volumes/proc
  3. Reboot
  4. sudo touch /proc/self

Subsequent puppet executions will fail:

Error: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: Could not get group list from DirectoryService
Error: Could not prepare for execution: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: Could not get group list from DirectoryService

Adding Errno::ENOTDIR to the rescue here works around the issue.

Desired Behavior:
Puppet handles misconfigured /proc filesystems correctly

Actual Behavior:
Puppet runs fail.

$ echo "notice('test')" | sudo /Library/GoogleCorpSupport/bin/puppet apply --test --trace --debug
Error: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: Could not get group list from DirectoryService
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/provider/nameservice/directoryservice.rb:101:in `rescue in list_all_present'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/provider/nameservice/directoryservice.rb:98:in `list_all_present'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/provider/nameservice/directoryservice.rb:151:in `single_report'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/provider/nameservice/directoryservice.rb:504:in `getinfo'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/provider/nameservice.rb:192:in `exists?'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/type/group.rb:234:in `exists?'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings.rb:888:in `service_group_available?'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings/file_setting.rb:52:in `safe_to_use_settings_value?'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings/file_setting.rb:43:in `value'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings/file_setting.rb:95:in `group'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings/file_setting.rb:157:in `to_resource'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings.rb:1052:in `block in to_catalog'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings.rb:1048:in `each'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings.rb:1048:in `to_catalog'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings.rb:1123:in `use'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/application/apply.rb:310:in `setup'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/application.rb:413:in `block in run'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/util.rb:744:in `exit_on_fail'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/application.rb:413:in `run'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/util/command_line.rb:143:in `run'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/util/command_line.rb:77:in `execute'
/Library/GoogleCorpSupport/Puppet/bin/puppet:5:in `<main>'
Error: Could not prepare for execution: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: Could not get group list from DirectoryService
Could not get group list from DirectoryService
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/provider/nameservice/directoryservice.rb:101:in `rescue in list_all_present'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/provider/nameservice/directoryservice.rb:98:in `list_all_present'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/provider/nameservice/directoryservice.rb:151:in `single_report'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/provider/nameservice/directoryservice.rb:504:in `getinfo'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/provider/nameservice.rb:192:in `exists?'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/type/group.rb:234:in `exists?'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings.rb:888:in `service_group_available?'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings/file_setting.rb:52:in `safe_to_use_settings_value?'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings/file_setting.rb:43:in `value'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings/file_setting.rb:95:in `group'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings/file_setting.rb:157:in `to_resource'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings.rb:1052:in `block in to_catalog'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings.rb:1048:in `each'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings.rb:1048:in `to_catalog'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/settings.rb:1123:in `use'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/application/apply.rb:310:in `setup'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/application.rb:413:in `block in run'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/util.rb:744:in `exit_on_fail'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/application.rb:413:in `run'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/util/command_line.rb:143:in `run'
/Library/GoogleCorpSupport/Puppet/lib/ruby/site_ruby/puppet/util/command_line.rb:77:in `execute'
/Library/GoogleCorpSupport/Puppet/bin/puppet:5:in `<main>'

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Clay Caviness (Jira)

unread,
Jul 20, 2022, 1:14:01 PM7/20/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jul 26, 2022, 4:50:01 PM7/26/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jul 27, 2022, 1:07:03 PM7/27/22
to puppe...@googlegroups.com

Nirupama Mantha (Jira)

unread,
Jul 28, 2022, 11:20:01 AM7/28/22
to puppe...@googlegroups.com

Tony Vu (Jira)

unread,
Aug 2, 2022, 2:51:03 PM8/2/22
to puppe...@googlegroups.com
Tony Vu updated an issue
Change By: Tony Vu
Sprint: Phoenix 2022-08- 17 03

Tony Vu (Jira)

unread,
Aug 2, 2022, 2:52:02 PM8/2/22
to puppe...@googlegroups.com

Nirupama Mantha (Jira)

unread,
Aug 3, 2022, 12:18:02 PM8/3/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
Change By: Nirupama Mantha
Sprint: Phoenix 2022-08-03 , Phoenix 2022-08-17

Lisa Ross (Jira)

unread,
Aug 3, 2022, 12:20:02 PM8/3/22
to puppe...@googlegroups.com
Lisa Ross updated an issue
Change By: Lisa Ross
Sprint: Phoenix 2022-08-03 , Phoenix 2022-08-17

Lisa Ross (Jira)

unread,
Aug 3, 2022, 12:20:02 PM8/3/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Aug 8, 2022, 8:47:01 PM8/8/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Aug 8, 2022, 8:47:01 PM8/8/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Aug 8, 2022, 8:48:01 PM8/8/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Bug Fix
Release Notes Summary:
Puppet handles misconfigured /proc filesystems correctly

Parker Leach (Jira)

unread,
Sep 12, 2022, 12:30:01 PM9/12/22
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages