bosh icon indicating copy to clipboard operation
bosh copied to clipboard

rake stemcell:mcf failed - cp: cannot stat `/tmp/all_the_gems/multi_xml-*.gem': No such file or directory

Open drnic opened this issue 13 years ago • 17 comments

$ bundle exec rake stemcell:mcf[vsphere,../micro/deploy/manifest.yml,$LATEST_RELEASE]
...
rm -rf /var/vcap/store/repos/bosh/release/src/bosh/bosh_aws_registry
mkdir -p /var/vcap/store/repos/bosh/release/src/bosh/bosh_aws_registry
cp /tmp/all_the_gems/multi_json-*.gem .
cp /tmp/all_the_gems/pg*.gem .
cp /tmp/all_the_gems/multi_xml-*.gem .
cp: cannot stat `/tmp/all_the_gems/multi_xml-*.gem': No such file or directory
rake aborted!
Command failed with status (1): [cp /tmp/all_the_gems/multi_xml-*.gem ....]
/var/vcap/store/repos/bosh/rake/gem.rake:52:in `block (5 levels) in <top (required)>'
/var/vcap/store/repos/bosh/rake/gem.rake:48:in `block (4 levels) in <top (required)>'
/var/vcap/store/repos/bosh/rake/gem.rake:47:in `chdir'
/var/vcap/store/repos/bosh/rake/gem.rake:47:in `block (3 levels) in <top (required)>'
Tasks: TOP => stemcell:mcf => all:build_with_deps => bosh_aws_registry:build_with_deps => bosh_aws_registry:gem_with_deps
(See full trace by running task with --trace)

drnic avatar Feb 14 '13 01:02 drnic

I see all dependencies on multi_xml as being removed a few days ago. Do you have any hanging around in your bosh Gemfile.lock?

mmb avatar Feb 14 '13 05:02 mmb

I'm cloning all repos from scratch (via https://gist.github.com/drnic/4950698); will report back.

drnic avatar Feb 14 '13 05:02 drnic

Yep, problem gone now.

drnic avatar Feb 14 '13 06:02 drnic

Spoke too soon.

mkdir -p /var/vcap/store/repos/bosh/release/src/bosh/bosh_aws_registry
cp /tmp/all_the_gems/multi_json-*.gem .
cp /tmp/all_the_gems/pg*.gem .
cp /tmp/all_the_gems/multi_xml-*.gem .
cp: cannot stat `/tmp/all_the_gems/multi_xml-*.gem': No such file or directory
rake aborted!
Command failed with status (1): [cp /tmp/all_the_gems/multi_xml-*.gem ....]
/var/vcap/store/repos/bosh/rake/gem.rake:52:in `block (5 levels) in <top (required)>'
/var/vcap/store/repos/bosh/rake/gem.rake:48:in `block (4 levels) in <top (required)>'
/var/vcap/store/repos/bosh/rake/gem.rake:47:in `chdir'
/var/vcap/store/repos/bosh/rake/gem.rake:47:in `block (3 levels) in <top (required)>'
Tasks: TOP => stemcell:mcf => all:build_with_deps => bosh_aws_registry:build_with_deps => bosh_aws_registry:gem_with_deps

drnic avatar Feb 14 '13 06:02 drnic

Also not working for rake stemcell:micro

drnic avatar Feb 14 '13 07:02 drnic

Which version of ruby are you using. Also do you happend to know if it was compiled with libxml support or not?

ajackson avatar Feb 14 '13 16:02 ajackson

It is a debian package of 1.9.3 that comes from apt.unboxedconsulting.com

https://github.com/StarkAndWayne/bosh-bootstrap/blob/master/lib/bosh-bootstrap/stages/stage_prepare_inception_vm/install_ruby#L17-L27

drnic avatar Feb 14 '13 16:02 drnic

How do I figure out what is included in that ruby?

drnic avatar Feb 14 '13 16:02 drnic

Have uninstalled the 1.9.3 ruby from unboxedconsulting and installed ruby 1.9.3p327 from source. This however does not solve the above problem.

rkoster avatar Feb 15 '13 19:02 rkoster

Stemcell building used to work from the same VM before the rake file refactoring; if that helps with debugging

Dr Nic Williams Stark & Wayne LLC - consultancy for Cloud Foundry users http://drnicwilliams.com http://starkandwayne.com cell +1 (415) 860-2185 twitter @drnic

drnic avatar Feb 15 '13 19:02 drnic

@rkoster discovered that the following gems need to be uninstalled before running the rake task:

https://github.com/StarkAndWayne/bosh-bootstrap/commit/68b919288c67ffa4d6357cab0ce0162e0bdacf63

drnic avatar Feb 16 '13 03:02 drnic

After adding some logging to the gem_with_deps rake task I got the following:

"bosh_aws_registry deps: #<Bundler::SpecSet:0x000000030ffd68 
@specs=[aws-sdk (1.6.9), bosh_aws_registry (0.2.3), daemons (1.1.9), eventmachine (1.0.0), 
httparty (0.10.2), json (1.7.7), multi_json (1.5.1), multi_xml (0.5.3), nokogiri (1.5.6), 
rack (1.5.2), rack-protection (1.3.2), sequel (3.44.0), sinatra (1.3.4), thin (1.5.0), 
tilt (1.3.3), uuidtools (2.1.3), yajl-ruby (1.1.0)]>"
cp /tmp/all_the_gems/multi_json-*.gem .
cp /tmp/all_the_gems/pg*.gem .
cp /tmp/all_the_gems/multi_xml-*.gem .
cp: cannot stat `/tmp/all_the_gems/multi_xml-*.gem': No such file or directory
rake aborted!

The problem is that sinatra (1.3.4) is listed as a dependency while 1.2.8 is specified in bosh_aws_registry/bosh_aws_registry.gemspec

When running a gem dependency bosh_aws_registry I get:

Gem bosh_aws_registry-0.2.3
  aws-sdk (~> 1.6.9)
  sequel (>= 0)
  sinatra (>= 0)
  thin (>= 0)
  yajl-ruby (>= 0)

So It looks like the context of the Gemfile is not set here.

rkoster avatar Feb 16 '13 12:02 rkoster

bundle install --deployment solves the problem

rkoster avatar Feb 16 '13 16:02 rkoster

Before running the rake task?

Aren't the bad gems coming from bosh_deployer gem being already installed?

On Saturday, February 16, 2013, Ruben Koster wrote:

bundle install --deployment solves the problem

— Reply to this email directly or view it on GitHubhttps://github.com/cloudfoundry/bosh/issues/44#issuecomment-13655347.

Dr Nic Williams Stark & Wayne LLC - consultancy for Cloud Foundry users http://drnicwilliams.com http://starkandwayne.com cell +1 (415) 860-2185 twitter @drnic

drnic avatar Feb 16 '13 16:02 drnic

The already installed gems are in the system directories. By using the --deployment flag bundler will ignore system gems and install all gems in vendor/bundle.

The --deployment flag activates a number of deployment-friendly conventions:

  • Isolate all gems into vendor/bundle
  • Require an up-to-date Gemfile.lock
  • If bundle package was run, do not fetch gems from rubygems.org. Instead, only use gems in the checked in vendor/cache

source

rkoster avatar Feb 16 '13 16:02 rkoster

When resolving the list of gems to copy it wasn't taking into account Gemfile.lock.

I had the same issue with it trying to copy old blobstore_client dependencies because I had bosh_cli installed which has a dependency on blobstore_client 0.4.0. Since the old dependencies weren't in the bundle they weren't there to copy.

mmb avatar Feb 24 '13 07:02 mmb

The build script not takes into account the Gemfile.lock. Please reopen if you still have this issue.

ajackson avatar Mar 19 '13 05:03 ajackson