Ubuntu 11.10, Nova Essex-1
Fresh install
add-apt-repository ppa:nova-core/milestone
apt-get update
apt-get install -y rabbitmq-server nova-api nova-objectstore nova-scheduler nova-network nova-compute glance qemu unzip
(etc).
On remote Ubuntu 11.10 machine, upload an image...
openstack@ubuntu:~/openstack$ cloud-publish-tarball ubuntu-11.10-server-cloudimg-i386.tar.gz images i386
Sun Dec 11 11:57:03 GMT 2011: ====== extracting image ======
Warning: no ramdisk found, assuming '--ramdisk none'
kernel : oneiric-server-cloudimg-i386-vmlinuz-virtual
ramdisk: none
image : oneiric-server-cloudimg-i386.img
Sun Dec 11 11:57:28 GMT 2011: ====== bundle/upload kernel ======
Sun Dec 11 11:57:30 GMT 2011: ====== bundle/upload image ======
failed to register oneiric-server-cloudimg-i386.img.manifest.xml
failed: euca-register --name images/oneiric-server-cloudimg-i386.img images/oneiric-server-cloudimg-i386.img.manifest.xml
UnknownError: An unknown error has occurred. Please try your request again.failed bundle/upload/register of image
On OpenStack host
==> /var/log/nova/nova-api.log <==
2011-12-11 11:41:21,884 DEBUG nova.api [c78bb1b5-5b92-4ac3-97eb-f55860762af8 fbf26792-57d0-4975-8634-aa02b7b0943d example] action: RegisterImage from (pid=7366) __call__ /usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py:240
2011-12-11 11:41:21,885 DEBUG nova.api [c78bb1b5-5b92-4ac3-97eb-f55860762af8 fbf26792-57d0-4975-8634-aa02b7b0943d example] arg: Name val: images/oneiric-server-cloudimg-i386.img from (pid=7366) __call__ /usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py:242
2011-12-11 11:41:21,886 DEBUG nova.api [c78bb1b5-5b92-4ac3-97eb-f55860762af8 fbf26792-57d0-4975-8634-aa02b7b0943d example] arg: Architecture val: i386 from (pid=7366) __call__ /usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py:242
2011-12-11 11:41:21,886 DEBUG nova.api [c78bb1b5-5b92-4ac3-97eb-f55860762af8 fbf26792-57d0-4975-8634-aa02b7b0943d example] arg: ImageLocation val: images/oneiric-server-cloudimg-i386.img.manifest.xml from (pid=7366) __call__ /usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py:242
==> /var/log/nova/nova-objectstore.log <==
2011-12-11 11:41:21,889 DEBUG routes.middleware [-] Matched GET /images/ from (pid=7397) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:100
2011-12-11 11:41:21,889 DEBUG routes.middleware [-] Route path: '/{bucket_name}/', defaults: {'controller': <function <lambda> at 0x2f29230>} from (pid=7397) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:102
2011-12-11 11:41:21,890 DEBUG routes.middleware [-] Match dict: {'controller': <function <lambda> at 0x2f29230>, 'bucket_name': u'images'} from (pid=7397) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:103
2011-12-11 11:41:21,894 DEBUG routes.middleware [-] Matched HEAD /images/oneiric-server-cloudimg-i386.img.manifest.xml from (pid=7397) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:100
2011-12-11 11:41:21,894 DEBUG routes.middleware [-] Route path: '/{bucket}/{object_name}', defaults: {'controller': <function <lambda> at 0x2f291b8>} from (pid=7397) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:102
2011-12-11 11:41:21,895 DEBUG routes.middleware [-] Match dict: {'object_name': u'oneiric-server-cloudimg-i386.img.manifest.xml', 'bucket': u'images', 'controller': <function <lambda> at 0x2f291b8>} from (pid=7397) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:103
2011-12-11 11:41:21,897 DEBUG routes.middleware [-] Matched GET /images/oneiric-server-cloudimg-i386.img.manifest.xml from (pid=7397) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:100
2011-12-11 11:41:21,897 DEBUG routes.middleware [-] Route path: '/{bucket}/{object_name}', defaults: {'controller': <function <lambda> at 0x2f291b8>} from (pid=7397) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:102
2011-12-11 11:41:21,898 DEBUG routes.middleware [-] Match dict: {'object_name': u'oneiric-server-cloudimg-i386.img.manifest.xml', 'bucket': u'images', 'controller': <function <lambda> at 0x2f291b8>} from (pid=7397) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:103
==> /var/log/nova/nova-api.log <==
2011-12-11 11:41:21,901 ERROR nova.api [c78bb1b5-5b92-4ac3-97eb-f55860762af8 fbf26792-57d0-4975-8634-aa02b7b0943d example] Unexpected error raised: global name 'ec2_utils' is not defined
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py", line 348, in __call__
(nova.api): TRACE: result = api_request.invoke(context)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/api/ec2/apirequest.py", line 90, in invoke
(nova.api): TRACE: result = method(context, **args)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/api/ec2/cloud.py", line 1638, in register_image
(nova.api): TRACE: image_id = self._register_image(context, metadata)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/api/ec2/cloud.py", line 1619, in _register_image
(nova.api): TRACE: image = self.image_service.create(context, metadata)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/image/s3.py", line 102, in create
(nova.api): TRACE: image = self._s3_create(context, metadata)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/image/s3.py", line 261, in _s3_create
(nova.api): TRACE: manifest)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/image/s3.py", line 215, in _s3_parse_manifest
(nova.api): TRACE: kernel_id = ec2_utils.ec2_id_to_id(kernel_id)
(nova.api): TRACE: NameError: global name 'ec2_utils' is not defined
(nova.api): TRACE:
2011-12-11 11:41:21,903 ERROR nova.api [c78bb1b5-5b92-4ac3-97eb-f55860762af8 fbf26792-57d0-4975-8634-aa02b7b0943d example] Environment: {"CONTENT_TYPE": "application/x-www-form-urlencoded; charset=UTF-8", "SCRIPT_NAME": "/services/Cloud", "REQUEST_METHOD": "POST", "HTTP_HOST": "172.16.0.1:8773", "PATH_INFO": "/", "SERVER_PROTOCOL": "HTTP/1.0", "HTTP_USER_AGENT": "Boto/2.0 (linux2)", "SERVER_NAME": "172.16.0.1", "REMOTE_ADDR": "172.16.0.253", "wsgi.url_scheme": "http", "SERVER_PORT": "8773", "GATEWAY_INTERFACE": "CGI/1.1", "HTTP_ACCEPT_ENCODING": "identity"}
2011-12-11 11:41:21,903 ERROR nova.api [c78bb1b5-5b92-4ac3-97eb-f55860762af8 fbf26792-57d0-4975-8634-aa02b7b0943d example] UnknownError: An unknown error has occurred. Please try your request again.
2011-12-11 11:41:21,904 INFO nova.api [c78bb1b5-5b92-4ac3-97eb-f55860762af8 fbf26792-57d0-4975-8634-aa02b7b0943d example] 0.20209s 172.16.0.253 POST /services/Cloud/ CloudController:RegisterImage 400 [Boto/2.0 (linux2)] application/x-www-form-urlencoded text/xml
2011-12-11 11:41:22,020 DEBUG nova.api [2c04c55f-5616-465c-bf0d-5aac0bdb1058 fbf26792-57d0-4975-8634-aa02b7b0943d example] action: DescribeImages from (pid=7366) __call__ /usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py:240
2011-12-11 11:41:22,020 DEBUG nova.api [2c04c55f-5616-465c-bf0d-5aac0bdb1058 fbf26792-57d0-4975-8634-aa02b7b0943d example] arg: Owner.1 val: self from (pid=7366) __call__ /usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py:242
2011-12-11 11:41:22,054 DEBUG nova.api.request [2c04c55f-5616-465c-bf0d-5aac0bdb1058 fbf26792-57d0-4975-8634-aa02b7b0943d example] <?xml version="1.0" ?><DescribeImagesResponse xmlns="http://ec2.amazonaws.com/doc/2010-08-31/"><requestId>2c04c55f-5616-465c-bf0d-5aac0bdb1058</requestId><imagesSet><item><displayName/><description/><imageOwnerId/><isPublic>false</isPublic><imageId>aki-00000001</imageId><imageState>available</imageState><architecture>i386</architecture><imageLocation>images/oneiric-server-cloudimg-i386-vmlinuz-virtual.manifest.xml</imageLocation><rootDeviceType>instance-store</rootDeviceType><rootDeviceName>/dev/sda1</rootDeviceName><imageType>kernel</imageType></item></imagesSet></DescribeImagesResponse> from (pid=7366) _render_response /usr/lib/python2.7/dist-packages/nova/api/ec2/apirequest.py:111
2011-12-11 11:41:22,056 INFO nova.api [2c04c55f-5616-465c-bf0d-5aac0bdb1058 fbf26792-57d0-4975-8634-aa02b7b0943d example] 0.37239s 172.16.0.253 POST /services/Cloud/ CloudController:DescribeImages 200 [Boto/2.0 (linux2)] application/x-www-form-urlencoded text/xml
Tried command again
openstack@ubuntu:~/openstack$ cloud-publish-tarball ubuntu-11.10-server-cloudimg-i386.tar.gz images i386
Sun Dec 11 11:50:17 GMT 2011: ====== extracting image ======
Warning: no ramdisk found, assuming '--ramdisk none'
kernel : oneiric-server-cloudimg-i386-vmlinuz-virtual
ramdisk: none
image : oneiric-server-cloudimg-i386.img
Sun Dec 11 11:50:34 GMT 2011: ====== bundle/upload kernel ======
images/oneiric-server-cloudimg-i386-vmlinuz-virtual.manifest.xml already registered as aki-00000001
failed to upload kernel
It uploaded the kernel only
openstack@ubuntu:~/openstack$ euca-describe-images
IMAGE aki-00000001 images/oneiric-server-cloudimg-i386-vmlinuz-virtual.manifest.xml available private i386 kernel instance-store
Note that this worked on Ubuntu 11.10 with Diablo.
/etc/nova/nova.conf
--verbose
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--libvirt_type=qemu
--use_deprecated_auth
--sql_connection=mysql://root:nova@172.16.0.1/nova
--s3_host=172.16.0.1
--rabbit_host=172.16.0.1
--ec2_host=172.16.0.1
--ec2_dmz_host=172.16.0.1
--fixed_range=10.0.0.0/8
--network_size=64
--num_networks=1
--public_interface=eth1
--image_service=nova.image.glance.GlanceImageService
--glance_api_servers=172.16.0.1:9292
--auto_assign_floating_ip
This was fixed in sha 81c8c3ab
On Dec 12, 2011, at 9:28 AM, Scott Moser wrote:
> ** Tags added: ec2 /bugs.launchpad .net/bugs/ 902770 tarball core/milestone ubuntu: ~/openstack$ cloud-publish- tarball ubuntu- 11.10-server- cloudimg- i386.tar. gz images i386 server- cloudimg- i386-vmlinuz- virtual server- cloudimg- i386.img server- cloudimg- i386.img. manifest. xml oneiric- server- cloudimg- i386.img images/ oneiric- server- cloudimg- i386.img. manifest. xml upload/ register of image nova/nova- api.log <== 5b92-4ac3- 97eb-f55860762a f8 fbf26792- 57d0-4975- 8634-aa02b7b094 3d example] action: RegisterImage from (pid=7366) __call__ /usr/lib/ python2. 7/dist- packages/ nova/api/ ec2/__init_ _.py:240 5b92-4ac3- 97eb-f55860762a f8 fbf26792- 57d0-4975- 8634-aa02b7b094 3d example] arg: Name val: images/ oneiric- server- cloudimg- i386.img from (pid=7366) __call__ /usr/lib/ python2. 7/dist- packages/ nova/api/ ec2/__init_ _.py:242 5b92-4ac3- 97eb-f55860762a f8 fbf26792- 57d0-4975- 8634-aa02b7b094 3d example] arg: Architecture val: i386 from (pid=7366) __call__ /usr/lib/ python2. 7/dist- packages/ nova/api/ ec2/__init_ _.py:242 5b92-4ac3- 97eb-f55860762a f8 fbf26792- 57d0-4975- 8634-aa02b7b094 3d example] arg: ImageLocation val: images/ oneiric- server- cloudimg- i386.img. manifest. xml from (pid=7366) __call__ /usr/lib/ python2. 7/dist- packages/ nova/api/ ec2/__init_ _.py:242 nova/nova- objectstore. log <== pymodules/ python2. 7/routes/ middleware. py:100 pymodules/ python2. 7/routes/ middleware. py:102
>
> --
> You received this bug notification because you are subscribed to
> OpenStack Compute (nova).
> https:/
>
> Title:
> Global name ec2_util is not defined when using cloud-publish-
> under Essex-1
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> Ubuntu 11.10, Nova Essex-1
> Fresh install
> add-apt-repository ppa:nova-
> apt-get update
> apt-get install -y rabbitmq-server nova-api nova-objectstore nova-scheduler nova-network nova-compute glance qemu unzip
> (etc).
>
>
> On remote Ubuntu 11.10 machine, upload an image...
>
> openstack@
> Sun Dec 11 11:57:03 GMT 2011: ====== extracting image ======
> Warning: no ramdisk found, assuming '--ramdisk none'
> kernel : oneiric-
> ramdisk: none
> image : oneiric-
> Sun Dec 11 11:57:28 GMT 2011: ====== bundle/upload kernel ======
> Sun Dec 11 11:57:30 GMT 2011: ====== bundle/upload image ======
> failed to register oneiric-
> failed: euca-register --name images/
> UnknownError: An unknown error has occurred. Please try your request again.failed bundle/
>
>
> On OpenStack host
>
> ==> /var/log/
> 2011-12-11 11:41:21,884 DEBUG nova.api [c78bb1b5-
> 2011-12-11 11:41:21,885 DEBUG nova.api [c78bb1b5-
> 2011-12-11 11:41:21,886 DEBUG nova.api [c78bb1b5-
> 2011-12-11 11:41:21,886 DEBUG nova.api [c78bb1b5-
>
> ==> /var/log/
> 2011-12-11 11:41:21,889 DEBUG routes.middleware [-] Matched GET /images/ from (pid=7397) __call__ /usr/lib/
> 2011-12-11 11:41:21,889 DEBUG routes.middleware [-] Route path: '/{bucket_name}/', defaults: {'controller': <function <lambda> at 0x2f29230>} from (pid=7397) __call__ /usr/lib/
> 2011-12-11 11:41:21,890 DEBUG routes.middleware [-] Match dict: {'controller': <function <lambda> at 0x2f29230>, 'bucket_name': u'images'} from (pid=7397) __call__ /usr/lib/pymodu...