8 Replies Latest reply on Nov 27, 2011 1:52 PM by Marek Goldmann

    centos6 and boxgrinder 0.9.8 not work

    oleg vasya Newbie

      Hello

       

      Support for centos 6 in boxgrinder 0.9.8 is not work

      I'm attach all logs with --debug and --trace in files.

       

      My config:

       

      name: centos-6.0-scalr
      os:
        name: centos
        version: 6
        password: scalarizr123
      
      hardware:
        partitions:
          "/":
            size: 9.5
            type: ext3
      
      files:
        "/etc/rc.d":
          - "rc.local"
      
      post:
        ec2:
          - "/bin/sed -i 's/PermitRootLogin no/PermitRootLogin yes/g'  /etc/ssh/sshd_config"
          - "/usr/sbin/userdel ec2-user"
          - "rm -rf /home/ec2-user"
          - "rm -f /root/.ssh/authorized_keys"
      
      

       

      With ext4 for root partitions the same error

        • 1. Re: centos6 and boxgrinder 0.9.8 not work
          Marek Goldmann Master

          Oleg,

           

          You need update appliance-tools to version 006 or newer.

           

           

          I forgot to make expllicit dependency on the appliance-tools in spec file, but will fix it in new version once this one will land in stable.

           

          --Marek

          • 2. Re: centos6 and boxgrinder 0.9.8 not work
            oleg vasya Newbie

            I'm install appliance-tools-006, but no changes

             

             

            [root@ip-10-130-63-228 ~]# yum info appliance-tools
            Installed Packages
            Name        : appliance-tools
            Arch        : noarch
            Version     : 006
            Release     : 1.fc15
            Size        : 129 k
            Repo        : installed
            From repo   : updates-testing
            Summary     : Tools for building Appliances
            URL         : http://thincrust.org/
            License     : GPLv2
            Description : Tools for generating appliance images on Fedora based systems including
                        : derived distributions such as RHEL, CentOS and others.
                        : See http://thincrust.net for more details.
            
            
            

             

            Error:

             

            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/appliance.rb:120:in `create'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/bin/boxgrinder-build:189
            /usr/bin/boxgrinder-build:19:in `load'
            /usr/bin/boxgrinder-build:19
            F, [2011-11-18T08:33:38.216013 #26372] FATAL -- : RuntimeError: An error occurred while executing command: 'appliance-creator -d -v -t 'build/appliances/i686/centos/6/centos-6.0-scalr/1.0/centos-plugin/tmp' --cache=/var/cache/boxgrinder/rpms-cache/i686/centos/6 --config 'build/appliances/i686/centos/6/centos-6.0-scalr/1.0/centos-plugin/tmp/centos-6.0-scalr.ks' -o 'build/appliances/i686/centos/6/centos-6.0-scalr/1.0/centos-plugin/tmp' --name 'centos-6.0-scalr' --vmem 256 --vcpu 1 --format raw', process exited with wrong exit status: 1
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-core-0.3.9/lib/boxgrinder-core/helpers/exec-helper.rb:92:in `execute'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:165:in `execute_appliance_creator'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:129:in `build_with_appliance_creator'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/plugins/os/rhel/rhel-plugin.rb:31:in `build_rhel'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb:43:in `execute'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/plugins/base-plugin.rb:192:in `run'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/appliance.rb:139:in `execute_plugin'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/appliance.rb:105:in `execute_plugin_chain'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/appliance.rb:105:in `each'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/appliance.rb:105:in `execute_plugin_chain'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/lib/boxgrinder-build/appliance.rb:120:in `create'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.9.8/bin/boxgrinder-build:189
            /usr/bin/boxgrinder-build:19:in `load'
            /usr/bin/boxgrinder-build:19
            
            
            • 3. Re: centos6 and boxgrinder 0.9.8 not work
              Marek Goldmann Master

              The error message provide in first log states that you're clearly using an old version of appliance-tools. The 2nd log unfortunately tells me nothing - please provide a debug log after you run the build with updated appliance-tools, thanks!

               

              P.S. We have successful integration test builds for CentOS 6: http://ci.boxgrinder.org/viewLog.html?buildId=2921&buildTypeId=bt17&tab=testsInfo

               

              ---Marek

              • 5. Re: centos6 and boxgrinder 0.9.8 not work
                Marek Goldmann Master

                OK, found the issue, this is because appliance-creator is trying to find the grub files in /usr/share/grub/i386-{reshat,unknown}, but the files are in /usr/share/grub/i386-pc for 32 arch, and /usr/share/grub/x864_64-unknown for 64 bit arch. Therefore building 64 bit images works fine for CentOS 6.

                 

                I'll post a temporary patch for you soon and fix it in appliance-tools.

                 

                Thanks!

                 

                --Marek

                • 6. Re: centos6 and boxgrinder 0.9.8 not work
                  Marek Goldmann Master

                  Please take a look at this patch:

                   

                  diff --git a/appcreate/appliance.py b/appcreate/appliance.pyindex 3e1bc94..f9fc784 100644
                  --- a/appcreate/appliance.py
                  +++ b/appcreate/appliance.py
                  @@ -266,7 +266,7 @@ class ApplianceImageCreator(ImageCreator):
                           imgpath = None
                           # http://bugs.centos.org/view.php?id=4995
                           # https://issues.jboss.org/browse/BGBUILD-267
                  -        for machine in ["x86_64-redhat", "i386-redhat", "x86_64-unknown", "i386-unknown"]:
                  +        for machine in ["x86_64-redhat", "i386-redhat", "x86_64-unknown", "i386-unknown", "x86_64-pc", "i386-pc"]:
                               imgpath = self._instroot + "/usr/share/grub/" + machine
                               if os.path.exists(imgpath):
                                   break
                  

                   

                  You can change the file manually by editing line 266 in /usr/lib/python2.7/site-packages/appcreate/appliance.py.

                   

                  Then re-run hte build and let me know if it worked - I'll pushe the changes upstream.

                   

                  Thanks!

                   

                  --Marek

                  • 7. Re: centos6 and boxgrinder 0.9.8 not work
                    oleg vasya Newbie

                    Hello

                     

                    Thank You, centos6 - x32  work fine

                    • 8. Re: centos6 and boxgrinder 0.9.8 not work
                      Marek Goldmann Master

                      Thanks, appliance-creator 006.1 or higher includes the fix.

                       

                      --Marek