Error during ec2 image creating running losetup
starksm64 Sep 3, 2010 3:16 PMA boxgrinder build failed with:
I, [2010-09-03T11:59:18.965288 #21804] INFO -- : Converting hostmanager appliance image to EC2 format...
E, [2010-09-03T11:59:21.386644 #21804] ERROR -- : /usr/lib/ruby/gems/1.8/gems/boxgrinder-core-0.0.22/lib/boxgrinder-core/helpers/exec-helper.rb:62:in `execute'
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-ec2-platform-plugin-0.0.3/lib/boxgrinder-build-ec2-platform-plugin/ec2-plugin.rb:160:in `calculate_disk_offsets'
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-ec2-platform-plugin-0.0.3/lib/boxgrinder-build-ec2-platform-plugin/ec2-plugin.rb:168:in `mount_image'
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-ec2-platform-plugin-0.0.3/lib/boxgrinder-build-ec2-platform-plugin/ec2-plugin.rb:93:in `execute'
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/plugins/base-plugin.rb:90:in `run'
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/appliance.rb:92:in `execute_platform_plugin'
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/appliance.rb:56:in `create'
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/bin/boxgrinder-build:88
/usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
/usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
/usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
/usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
/usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:62:in `run!'
/usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/delegates.rb:7:in `run!'
/usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/import.rb:10
/usr/bin/boxgrinder-build:19
E, [2010-09-03T11:59:21.386785 #21804] ERROR -- : An error occurred while executing command: 'losetup -d /dev/loop1', process exited with wrong exit status: 1
error: Error while mounting image. See logs for more info. Use --trace to view backtrace
The boxgrinder.log adds:
D, [2010-09-03T11:59:21.375861 #21804] DEBUG -- : Executing command: 'losetup -d /dev/loop1'
D, [2010-09-03T11:59:21.386313 #21804] DEBUG -- : loop: can't delete device /dev/loop1: Device or resource busy
There are multiple loop devices defined, including loop1:
[starksm@fedora13 noarch]$ sudo losetup -a
/dev/loop0: [fd00]:798851 (/home/starksm/Dev/BoxGrinder/build/appliances/i386/fedora/13/h*)
/dev/loop1: [fd00]:798855 (/home/starksm/Dev/BoxGrinder/build/appliances/i386/fedora/13/h*)
I simply tried rerunning figuring there was some problem with detecting the devices that were defined, and the build did in fact succeed. Perhaps there is a race condition somewhere between reading existing devices and creating a new one?
What clears these up after the build?