Unable to use it locally, r10k is never found.

Bug #1550331 reported by Sofer Athlan-Guyot
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
puppet-openstack-integration
Fix Released
High
Sofer Athlan-Guyot

Bug Description

When using:

    git clone https://review.openstack.org/p/openstack/puppet-keystone
    cd puppet-keystone
    bundle install
    bundle exec rake spec_prep

You always end up with r10k not found:

    rm -rf openstack/puppet-openstack-integration
    git clone https://git.openstack.org/openstack/puppet-openstack-integration openstack/puppet-openstack-integration
    Cloning into 'openstack/puppet-openstack-integration'...
    remote: Counting objects: 783, done.
    remote: Compressing objects: 100% (513/513), done.
    remote: Total 783 (delta 478), reused 518 (delta 246)
    Receiving objects: 100% (783/783), 136.31 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (478/478), done.
    Checking connectivity... done.
    I have defined the email to '<email address hidden>'.
    env PUPPETFILE_DIR=****/spec/fixtures/modules ZUUL_REF= ZUUL_BRANCH= ZUUL_URL= bash openstack/puppet-openstack-integration/install_modules_unit.sh
    + '[' '!' -z ~/.gem/ruby ']'
    + GEM_BIN_DIR=~/.gem/ruby/bin/
    +++ dirname openstack/puppet-openstack-integration/install_modules_unit.sh
    ++ cd openstack/puppet-openstack-integration
    ++ pwd -P
    + export SCRIPT_DIR=****/openstack/puppet-openstack-integration
    + SCRIPT_DIR=****/openstack/puppet-openstack-integration
    + export PUPPETFILE_DIR=****/spec/fixtures/modules
    + PUPPETFILE_DIR=****/spec/fixtures/modules
    + source ****/openstack/puppet-openstack-integration/functions
    + install_modules
    + '[' -e /usr/zuul-env/bin/zuul-cloner ']'
    + install_all
    + PUPPETFILE=****/openstack/puppet-openstack-integration/Puppetfile
    + ~/.gem/ruby/bin/r10k puppetfile install -v
    ****/openstack/puppet-openstack-integration/functions: line 51: ~/.gem/ruby/bin/r10k: No such file or directory
    rake aborted!
    Command failed with status (1): [env PUPPETFILE_DIR=****...]
    ~/.gem/ruby/bundler/gems/puppet-openstack_spec_helper-e844c0797de9/lib/puppet-openstack_spec_helper/rake_tasks.rb:70:in `block in <top (required)>'
    Tasks: TOP => spec_prep
    (See full trace by running task with --trace)

This is kind of annoying for local testing.

There is no simple workaround as bundler is always setting the
GEM_HOME environment variable. If one set the GEM_HOME env variable
by itself then the gem are not found anymore.

Changed in puppet-openstack-integration:
assignee: nobody → Sofer Athlan-Guyot (sofer-athlan-guyot)
importance: Undecided → High
Changed in puppet-openstack-integration:
status: New → In Progress
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :
Changed in puppet-openstack-integration:
status: In Progress → Fix Committed
Cody Herriges (ody-cat)
Changed in puppet-openstack-integration:
status: Fix Committed → Fix Released
Revision history for this message
Sanjay Upadhyay (saneax) wrote :

I still wasnt able to run ./allinone.sh - here is a run..

--------------------------------------------------------------------------------
| Install Modules |
--------------------------------------------------------------------------------
+ install_modules
+ '[' -e /usr/zuul-env/bin/zuul-cloner ']'
+ install_all
+ PUPPETFILE=/tmp/puppet-openstack-integration/Puppetfile
+ r10k puppetfile install -v
/tmp/puppet-openstack-integration/functions: line 54: r10k: command not found

Revision history for this message
Sanjay Upadhyay (saneax) wrote :

FYI, after this small change it went past the error -

diff --git a/functions b/functions
index 91edb94..afefc19 100644
--- a/functions
+++ b/functions
@@ -51,7 +51,7 @@ EOF
 #
 # - ``SCRIPT_DIR`` must be set to script path
 install_all() {
- PUPPETFILE=${SCRIPT_DIR}/Puppetfile r10k puppetfile install -v
+ PUPPETFILE=${SCRIPT_DIR}/Puppetfile ${GEM_BIN_DIR}/r10k puppetfile install -v
 }

So, my asumptions could be all the gems could be installed by default on your CI node?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.