Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Unknown
-
Resolution: Fixed
-
Affects Version/s: 0.10.10
-
Fix Version/s: 10.14.0
-
Component/s: Chef Client
-
Labels:None
Description
when running under omnibus with a system ruby and an omnibus ruby, the gem environment is mishandled by chef and a gem_package will bleed memoized state pointing at the system ruby into later resources.
this code will fail (assuming that ruby-shadow is /not/ installed in the system ruby):
chef_gem "ruby-shadow" gem_package "fpm" user "foobar" do comment "FOO BAR" uid 6666 gid "sysadmin" home "/home/foobar" shell "/bin/zsh" password "$1$5PVdQna7$XDmd2Eeywh5gIIcCk3Prc." end
in order to make the user resource not throw a MissingLibrary exception, you can comment out the gem_package "fpm" line and all will be well...
the chef_gem "ruby-shadow" line is not really part of the bug, that is just there to assert that the library is really present in the omnibus ruby...
a really poor failure case i've run across is:
1. highline installed in omnibus gem and not system gem (correctly)
2. chef-client evaluates a gem_package install into the system and switches context
3. some error occurs
4. error inspect blows up trying to load highline (because it is incorrectly pointed at the system gems) and no useful output is given.