3 Replies Latest reply on Sep 11, 2010 5:29 AM by goldmann

    Image creation succeeded even though rpm failed

    starksm64

      I was able to create a vmware image from an appliance file that incorprated the cirras appliance and a custom local rubygem rpm. During the build of the image, the rubygem rpm is failing during the %pre scriplet phase with several errors about not being able to install other gems:

       

      D, [2010-09-03T15:00:36.511777 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:36.512183 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'rack' (= 1.2.0) in any repository
      D, [2010-09-03T15:00:36.654667 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:36.654928 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'sinatra' (>= 0) in any repository
      D, [2010-09-03T15:00:36.808223 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:36.808514 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'dm-core' (>= 0) in any repository
      D, [2010-09-03T15:00:36.974778 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:36.975126 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'dm-sqlite-adapter' (>= 0) in any repository
      D, [2010-09-03T15:00:37.155377 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:37.155664 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'sqlite3-ruby' (>= 0) in any repository
      D, [2010-09-03T15:00:37.319705 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:37.320036 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'dm-migrations' (>= 0) in any repository
      D, [2010-09-03T15:00:37.495530 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:37.495789 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'crack' (>= 0) in any repository
      D, [2010-09-03T15:00:37.658428 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:37.658692 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'rb-inotify' (>= 0) in any repository
      D, [2010-09-03T15:00:37.835986 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:37.836253 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'boxgrinder-core' (>= 0.0.5) in any repository
      D, [2010-09-03T15:00:38.003718 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:38.004002 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'aws-s3' (>= 0.6.2) in any repository
      D, [2010-09-03T15:00:38.161820 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:38.162122 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'amazon-ec2' (>= 0.9.6) in any repository
      D, [2010-09-03T15:00:38.317688 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:38.317992 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'net-sftp' (>= 2.0.4) in any repository
      D, [2010-09-03T15:00:38.456356 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:38.456621 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'net-ssh' (>= 2.0.20) in any repository
      D, [2010-09-03T15:00:38.647504 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:38.647795 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'rake' (>= 0.8.7) in any repository
      D, [2010-09-03T15:00:38.787322 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:38.787660 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'progressbar' (>= 0.9.0) in any repository
      D, [2010-09-03T15:00:38.972527 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:38.972812 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'bluepill' (>= 0.0.39) in any repository
      D, [2010-09-03T15:00:39.175194 #2913] DEBUG -- : ERROR:  http://rubygems.org/ does not appear to be a repository
      D, [2010-09-03T15:00:39.175625 #2913] DEBUG -- : ERROR:  Could not find a valid gem 'json' (>= 1.4.6) in any repository
      D, [2010-09-03T15:00:39.183388 #2913] DEBUG -- : cp: cannot stat `//opt/jbossawsmac/config/httpd/*': No such file or directory
      D, [2010-09-03T15:00:39.184982 #2913] DEBUG -- : error: %pre(rubygem-jboss-aws-hostmanager-0.1.3-1.fc13.i386) scriptlet failed, exit status 1
      D, [2010-09-03T15:00:39.185121 #2913] DEBUG -- : error:   install: %pre scriptlet failed (2), skipping rubygem-jboss-aws-hostmanager-0.1.3-1.fc13

       

      The rpm was therefore not installed. I would expect this to fail the overall image creation. The reslting image is not usable for what I'm doing, so is there a way to have the build fail if the appliance rpms fail?

       

      Also, when the image is being built, is the network interface up for remote installation of gems?

        • 1. Re: Image creation succeeded even though rpm failed
          goldmann

          Scott,

           

          It depends if this is a fatal error or not. If you take a look at the lines you'll see the messages are being saved under DEBUG threshold. This means that the messages returned by the appliance-creator are not considered as fatal. It seems that scripts executed in %pre or %post sections in RPM spec file can fail without failing the RPM install.

           

          Are you sure if the RPM was not installed? Or only dependent Gems are missing?

           

          Yes, network device is up and running.

           

          --Marek

          • 2. Re: Image creation succeeded even though rpm failed
            starksm64

            The boxgrinder.log output indicates that the rpm was not installed:

             

            D, [2010-09-04T00:48:22.498599 #22279] DEBUG -- : error: %pre(rubygem-jboss-aws-hostmanager-0.1.3-1.fc13.i386) scriptlet failed, exit status 1
            D, [2010-09-04T00:48:22.498683 #22279] DEBUG -- : error:   install: %pre scriptlet failed (2), skipping rubygem-jboss-aws-hostmanager-0.1.3-1.fc13
            
            

             

            and when I launch the instances and look at the installed content, the rpm is not there.

            • 3. Re: Image creation succeeded even though rpm failed
              goldmann

              Could you please send me the spec file so I can take a look and test it?

               

              --Marek