Description of problem: ebs backed images are not properly stopped when pushing a fedora image to ec2. Fedora_ec2_Builder.py needs to call instance.terminate() instead of instance.stop().
note.. this is an issue when pushing fedora, seems to work w/ RHEL. Are there different boto calls for fedora vs RHEL?? that seems crazy to me. Just out of curiosity where is that script.. Fedora_ec2_Builder.py? recreated: 2011-09-27 18:07:43,355 INFO imgfac.ImageWarehouse.ImageWarehouse pid(4541) Message: Creating a bucket returned status 500. 2011-09-27 18:07:43,358 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(4541) Message: Setting metadata ({'target_image': 'ab6848f3-7e99-490f-b14f-039479fd2e64', 'uuid': 'd591b1ef-c417-479a-bd39-11fee31cadea', 'icicle': 'edb742c7-73f3-48ff-b61a-a31745c2e47a', 'target_identifier': 'ami-d9b07db0', 'object_type': 'provider_image', 'provider': 'ec2-us-east-1'}) for http://localhost:9090/provider_images/d591b1ef-c417-479a-bd39-11fee31cadea 2011-09-27 18:07:43,365 DEBUG imgfac.builders.BaseBuilder.Fedora_ec2_Builder pid(4541) Message: Stopping EC2 instance and deleting temp security group 2011-09-27 18:07:44,858 ERROR boto pid(4541) Message: 400 Bad Request 2011-09-27 18:07:44,858 ERROR boto pid(4541) Message: <?xml version="1.0" encoding="UTF-8"?> <Response><Errors><Error><Code>UnsupportedOperation</Code><Message>The instance 'i-6481ee04' does not have an 'ebs' root device type and cannot be stopped.</Message></Error></Errors><RequestID>85fe2245-7db1-4364-846f-de4170fa6030</RequestID></Response> 2011-09-27 18:07:44,859 DEBUG imgfac.builders.BaseBuilder.Fedora_ec2_Builder pid(4541) Message: Exception caught in ImageFactory 2011-09-27 18:07:44,889 DEBUG imgfac.builders.BaseBuilder.Fedora_ec2_Builder pid(4541) Message: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/imgfac/builders/Fedora_ec2_Builder.py", line 425, in push_image credentials) File "/usr/lib/python2.7/site-packages/imgfac/builders/Fedora_ec2_Builder.py", line 664, in push_image_snapshot_ec2 instance.stop() File "/usr/lib/python2.7/site-packages/boto/ec2/instance.py", line 248, in stop rs = self.connection.stop_instances([self.id]) File "/usr/lib/python2.7/site-packages/boto/ec2/connection.py", line 655, in stop_instances [('item', Instance)], verb='POST') File "/usr/lib/python2.7/site-packages/boto/connection.py", line 680, in get_list raise self.ResponseError(response.status, response.reason, body) EC2ResponseError: EC2ResponseError: 400 Bad Request <?xml version="1.0" encoding="UTF-8"?> <Response><Errors><Error><Code>UnsupportedOperation</Code><Message>The instance 'i-6481ee04' does not have an 'ebs' root device type and cannot be stopped.</Message></Error></Errors><RequestID>85fe2245-7db1-4364-846f-de4170fa6030</RequestID></Response> 2011-09-27 18:07:44,889 DEBUG imgfac.BuildJob.BuildAdaptor pid(4541) Message: Raising event with agent handler (<ImageFactoryAgent(Thread-1, initial)>), changed status from PUSHING to FAILED
[root@unused conductor]# rpm -qa | grep aeolus aeolus-conductor-0.4.0-0.20110926211730git1cc372b.fc15.noarch aeolus-conductor-daemons-0.4.0-0.20110926211730git1cc372b.fc15.noarch aeolus-all-0.4.0-0.20110926211730git1cc372b.fc15.noarch aeolus-conductor-doc-0.4.0-0.20110926211730git1cc372b.fc15.noarch aeolus-conductor-devel-0.4.0-0.20110926211730git1cc372b.fc15.noarch rubygem-aeolus-image-0.1.0-3.20110919115936gitd1d24b4.fc15.noarch aeolus-configure-2.0.2-4.20110926142838git5044e56.fc15.noarch [root@unused conductor]#
(In reply to comment #1) > note.. this is an issue when pushing fedora, seems to work w/ RHEL. > Are there different boto calls for fedora vs RHEL?? that seems crazy to me. > Just out of curiosity where is that script.. Fedora_ec2_Builder.py? > > recreated: > > 2011-09-27 18:07:43,355 INFO imgfac.ImageWarehouse.ImageWarehouse pid(4541) > Message: Creating a bucket returned status 500. > 2011-09-27 18:07:43,358 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(4541) > Message: Setting metadata ({'target_image': > 'ab6848f3-7e99-490f-b14f-039479fd2e64', 'uuid': > 'd591b1ef-c417-479a-bd39-11fee31cadea', 'icicle': > 'edb742c7-73f3-48ff-b61a-a31745c2e47a', 'target_identifier': 'ami-d9b07db0', > 'object_type': 'provider_image', 'provider': 'ec2-us-east-1'}) for > http://localhost:9090/provider_images/d591b1ef-c417-479a-bd39-11fee31cadea > 2011-09-27 18:07:43,365 DEBUG imgfac.builders.BaseBuilder.Fedora_ec2_Builder > pid(4541) Message: Stopping EC2 instance and deleting temp security group > 2011-09-27 18:07:44,858 ERROR boto pid(4541) Message: 400 Bad Request > 2011-09-27 18:07:44,858 ERROR boto pid(4541) Message: <?xml version="1.0" > encoding="UTF-8"?> > <Response><Errors><Error><Code>UnsupportedOperation</Code><Message>The instance > 'i-6481ee04' does not have an 'ebs' root device type and cannot be > stopped.</Message></Error></Errors><RequestID>85fe2245-7db1-4364-846f-de4170fa6030</RequestID></Response> > 2011-09-27 18:07:44,859 DEBUG imgfac.builders.BaseBuilder.Fedora_ec2_Builder > pid(4541) Message: Exception caught in ImageFactory > 2011-09-27 18:07:44,889 DEBUG imgfac.builders.BaseBuilder.Fedora_ec2_Builder > pid(4541) Message: Traceback (most recent call last): > File > "/usr/lib/python2.7/site-packages/imgfac/builders/Fedora_ec2_Builder.py", line > 425, in push_image > credentials) > File > "/usr/lib/python2.7/site-packages/imgfac/builders/Fedora_ec2_Builder.py", line > 664, in push_image_snapshot_ec2 > instance.stop() > File "/usr/lib/python2.7/site-packages/boto/ec2/instance.py", line 248, in > stop > rs = self.connection.stop_instances([self.id]) > File "/usr/lib/python2.7/site-packages/boto/ec2/connection.py", line 655, in > stop_instances > [('item', Instance)], verb='POST') > File "/usr/lib/python2.7/site-packages/boto/connection.py", line 680, in > get_list > raise self.ResponseError(response.status, response.reason, body) > EC2ResponseError: EC2ResponseError: 400 Bad Request > <?xml version="1.0" encoding="UTF-8"?> > <Response><Errors><Error><Code>UnsupportedOperation</Code><Message>The instance > 'i-6481ee04' does not have an 'ebs' root device type and cannot be > stopped.</Message></Error></Errors><RequestID>85fe2245-7db1-4364-846f-de4170fa6030</RequestID></Response> > > 2011-09-27 18:07:44,889 DEBUG imgfac.BuildJob.BuildAdaptor pid(4541) Message: > Raising event with agent handler (<ImageFactoryAgent(Thread-1, initial)>), > changed status from PUSHING to FAILED Yes, this is just for pushing Fedora guest images. The Fedora_ec2_Builder.py is laid down by image factory.
making sure all the bugs are at the right version for future queries
https://www.aeolusproject.org/redmine/issues/2443
Fixed here: https://github.com/aeolusproject/imagefactory/commit/efc7bfc8066ccb47343762a0efd851f3f1099691 Which is available in the 0.7.0 packages here: http://repos.fedorapeople.org/repos/aeolus/imagefactory/0.7.0/packages/fedora-14/noarch/
verified in 0.4.0 build
taking off tracker
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2012-0588.html