Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-Defined Environment Variables #402

Closed
Ginja opened this issue Aug 13, 2014 · 1 comment
Closed

User-Defined Environment Variables #402

Ginja opened this issue Aug 13, 2014 · 1 comment

Comments

@Ginja
Copy link

Ginja commented Aug 13, 2014

Hi @anodelman,

Thanks for submitting a bug to fix the issue I had in #210. I've tried your patch, and while it's fixed the issue of Beaker not running at all, I'm still seeing some odd behaviour.

Below is what I have in my test file (the nodesets have specific versions of Ruby installed, and I specify what it is through the ruby_version key underneath CONFIG:):

apply_manifest_on hosts, manifest, { :environment => { 'PATH' => "/usr/local/rvm/gems/#{options['ruby_version']}/bin:/usr/local/rvm/gems/#{options['ruby_version']}@global/bin:/usr/local/rvm/rubies/#{options['ruby_version']}/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/rvm/bin:/root/bin"},
                                     :catch_failures => true }

The above results in this command being executed on my SUTs:

puppet-stack 17:32:01$  env PATH="/usr/local/rvm/gems/ruby-2.0.0-p451/bin:/usr/local/rvm/gems/ruby-2.0.0-p451@global/bin:/usr/local/rvm/rubies/ruby-2.0.0-p451/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/rvm/bin:/root/bin" PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.zoNoAW

It looks like PATH is being specified twice, and that what I set isn't taking precedence as I see these warnings still during my SUT's Puppet run.

Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-2.0.0-p451/bin' is not at first place,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries,
         it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
         to fix temporarily in this shell session run: 'rvm use ruby-2.0.0-p451'.
@anodelman
Copy link
Contributor

This will be fixed in #449

@kevpl kevpl closed this as completed Nov 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants