HELP: Error while building stemcell ...


Vish
 

Hi Folks,

Hope everyone is doing great :-)
Needed some pointers on the below issue , kindly assist.

Thanks in advance.

Using the latest stemcell builder from bosh release, ran the below command in the vagrant stemcell builder VM.


CANDIDATE_BUILD_NUMBER=3153 bundle exec rake --trace stemcell:build[vsphere,esxi,ubuntu,trusty,go,bosh-os-images,bosh-ubuntu-trusty-os-image.tgz]

Got the below error , what am I missing here :
ubuntu(a)ubuntu:/bosh$ CANDIDATE_BUILD_NUMBER=3153 bundle exec rake --trace stemcell:build[vsphere,esxi,ubuntu,trusty,go,bosh-os-images,bosh-ubuntu-trusty-os-image.tgz]
** Invoke stemcell:build (first_time)
** Execute stemcell:build
Using OS image bosh-ubuntu-trusty-os-image.tgz, version L6G9dXmF3gVQ2xH5_jTAcENCRGkHbqXB
I, [2015-12-13T06:12:10.893106 #17856] INFO : Downloading http://s3.amazonaws.com/bosh-os-images/bosh-ubuntu-trusty-os-image.tgz?versionId=L6G9dXmF3gVQ2xH5_jTAcENCRGkHbqXB to /mnt/tmp/os-image20151213-17856-xerlc6/base_os_image.tgz
** Invoke stemcell:build_with_local_os_image (first_time)
** Execute stemcell:build_with_local_os_image
I, [2015-12-13T06:15:18.153697 #17856] INFO : CANDIDATE_BUILD_NUMBER is 3153. Using candidate build.
I, [2015-12-13T06:15:18.154151 #17856] INFO : Downloading http://bosh-ci-pipeline.s3.amazonaws.com/3153/release/bosh-3153.tgz to tmp/bosh-3153.tgz
cd /bosh/bosh-stemcell; OS_IMAGE=/mnt/tmp/os-image20151213-17856-xerlc6/base_os_image.tgz bundle exec rspec -fd spec/os_image/ubuntu_trusty_spec.rb
Using ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]
All stemcell_image tests are being skipped. STEMCELL_IMAGE needs to be set
All stemcell_tarball tests are being skipped. STEMCELL_WORKDIR needs to be set
Run options: exclude {:stemcell_tarball=>true, :stemcell_image=>true}

Ubuntu 14.04 OS image
behaves like every OS image
installed by base_<os>
Command "dig -v"
should return exit status 0
Command "which crontab"
should return exit status 0
.
.
.
.

.
cp /tmp/all_the_gems/17856/rack-protection-*.gem /bosh/release/src/bosh/simple_blobstore_server
cp /tmp/all_the_gems/17856/tilt-*.gem /bosh/release/src/bosh/simple_blobstore_server
cp /tmp/all_the_gems/17856/sinatra-*.gem /bosh/release/src/bosh/simple_blobstore_server
cp /tmp/all_the_gems/17856/thin-*.gem /bosh/release/src/bosh/simple_blobstore_server
cp /tmp/all_the_gems/17856/simple_blobstore_server-*.gem /bosh/release/src/bosh/simple_blobstore_server
Failed: 'sudo umount /mnt/stemcells/vsphere/esxi/ubuntu/work/work/mnt/tmp/grub/vsphere-esxi-ubuntu.raw 2> /dev/null' from /bosh, with exit status 256

, continuing anyway
Failed: 'sudo umount /mnt/stemcells/vsphere/esxi/ubuntu/work/work/mnt 2> /dev/null' from /bosh, with exit status 256

, continuing anyway
mkdir -p /mnt/stemcells/vsphere/esxi/ubuntu/build/build
cp -rp /bosh/stemcell_builder/README.md /bosh/stemcell_builder/etc /bosh/stemcell_builder/lib /bosh/stemcell_builder/stages /mnt/stemcells/vsphere/esxi/ubuntu/build/build
mkdir -p /mnt/stemcells/vsphere/esxi/ubuntu/work

For help with stemcell building, see: <https://github.com/cloudfoundry/bosh/blob/master/bosh-stemcell/README.md>


For help with stemcell building, see: <https://github.com/cloudfoundry/bosh/blob/master/bosh-stemcell/README.md>

rake aborted!
You must build stemcells as a user with UID 1000. Your effective UID now is 900.
/bosh/bosh-stemcell/lib/bosh/stemcell/stage_runner.rb:17:in `check_correct_uid'
/bosh/bosh-stemcell/lib/bosh/stemcell/stage_runner.rb:22:in `configure_and_apply'
/bosh/bosh-stemcell/lib/bosh/stemcell/stemcell_builder.rb:20:in `build'
/bosh/bosh-dev/lib/bosh/dev/tasks/stemcell.rake:155:in `block (2 levels) in <top (required)>'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/bosh/bosh-dev/lib/bosh/dev/tasks/stemcell.rake:93:in `block (3 levels) in <top (required)>'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
/bosh/bosh-dev/lib/bosh/dev/tasks/stemcell.rake:88:in `block (2 levels) in <top (required)>'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/usr/local/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/usr/local/rbenv/versions/1.9.3-p448/bin/rake:23:in `load'
/usr/local/rbenv/versions/1.9.3-p448/bin/rake:23:in `<main>'
Tasks: TOP => stemcell:build_with_local_os_image


Vish
 

Known issue https://github.com/cloudfoundry/bosh/issues/807

Looks like the images are still not fixed.
I modified the stemcell code to use UID=900


Marco Voelz
 

Hi,

using a UID 900 will build you the stemcell, but it won't work correctly. The VCAP user home on the stemcell will have the wrong owner and you won't be able to deploy anything succesfully with it.

Right now your only option is to build stemcells on AWS instead of using virtualbox as provider.

Warm regards
Marco

On 14/12/15 03:13, "Vish V" <thelinuxguyis(a)yahoo.co.in> wrote:

Known issue https://github.com/cloudfoundry/bosh/issues/807

Looks like the images are still not fixed.
I modified the stemcell code to use UID=900