Jira (PUP-10493) Puppet should ignore system ruby settings

9 views
Skip to first unread message

Vadym Chepkov (Jira)

unread,
May 6, 2020, 7:55:03 AM5/6/20
to puppe...@googlegroups.com
Vadym Chepkov created an issue
 
Puppet / Bug PUP-10493
Puppet should ignore system ruby settings
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/05/06 4:54 AM
Priority: Normal Normal
Reporter: Vadym Chepkov

Puppet Version: 5.5.20 and 6.15.0
Puppet Server Version: N/A
OS Name/Version: macOSX 10.15.4

I observe every run puppet emitting warning messages like this:

$ puppet --version
Ignoring posix-spawn-0.3.13 because its extensions are not built. Try: gem pristine posix-spawn --version 0.3.13
Ignoring ruby-augeas-0.5.0 because its extensions are not built. Try: gem pristine ruby-augeas --version 0.5.0
Ignoring posix-spawn-0.3.13 because its extensions are not built. Try: gem pristine posix-spawn --version 0.3.13
Ignoring ruby-augeas-0.5.0 because its extensions are not built. Try: gem pristine ruby-augeas --version 0.5.0
Ignoring posix-spawn-0.3.13 because its extensions are not built. Try: gem pristine posix-spawn --version 0.3.13
Ignoring ruby-augeas-0.5.0 because its extensions are not built. Try: gem pristine ruby-augeas --version 0.5.0
6.15.0

Puppet picks up GEM_HOME environment variable, which is used for configuring system ruby, which is different

$ /opt/puppetlabs/puppet/bin/ruby --version
ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-darwin19]
 
$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]

Desired Behavior:

Since puppet comes with it's own ruby, system ruby settings should be ignored.

bolt already handles it properly:

$ head /opt/puppetlabs/bin/bolt 
#!/bin/sh
 
 
# avoid influences from already pre-configured other ruby environments
env -u GEM_HOME -u GEM_PATH -u DLN_LIBRARY_PATH -u RUBYLIB -u RUBYLIB_PREFIX -u RUBYOPT -u RUBYPATH -u RUBYSHELL -u LD_LIBRARY_PATH -u LD_PRELOAD SHELL=/bin/sh /opt/puppetlabs/bolt/bin/bolt "$@"

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
May 7, 2020, 12:34:03 PM5/7/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Night's Watch

Josh Cooper (Jira)

unread,
May 7, 2020, 12:34:03 PM5/7/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10493
 
Re: Puppet should ignore system ruby settings

The bolt change was made in https://github.com/puppetlabs/bolt-vanagon/blob/master/resources/files/posix/bolt_env_wrapper

One concern with unsetting the values is it may break puppet's ability to manage gems in other rubies on the system (not entirely sure, but will need some investigation).

Mihai Buzgau (Jira)

unread,
May 12, 2020, 10:35:03 AM5/12/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
 
Change By: Mihai Buzgau
Sprint: NW - 2020-05-27

Mihai Buzgau (Jira)

unread,
May 13, 2020, 3:38:03 AM5/13/20
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
May 25, 2020, 5:15:03 AM5/25/20
to puppe...@googlegroups.com
Ciprian Badescu assigned an issue to Ciprian Badescu
Change By: Ciprian Badescu
Assignee: Ciprian Badescu
Reply all
Reply to author
Forward
0 new messages