[Openstack] Uploading Images to nova

Nicolas Odermatt odermattn at gmail.com
Thu Feb 23 21:26:02 UTC 2012


Hi Derrick,

 

Thanks a lot for your answer!

 

Well, the euca-describe-images command gave me the following output:

 

root at nova-controller:~# euca-describe-availability-zones verbose

Warning: failed to parse error message from AWS: <unknown>:1:0: syntax error

BotoServerError: 500 Internal Server Error

Traceback (most recent call last):

  File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in
handle_one_response

    result = self.application(self.environ, start_response)

  File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 203, in __call__

    return app(environ, start_response)

  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__

    resp = self.call_func(req, *args, **self.kwargs)

  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func

    return self.func(req, *args, **kwargs)

  File "/var/lib/nova/nova/api/ec2/__init__.py", line 58, in __call__

    rv = req.get_response(self.application)

  File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in
get_response

    application, catch_exc_info=False)

  File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in
call_application

    app_iter = application(self.environ, start_response)

  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__

    resp = self.call_func(req, *args, **self.kwargs)

  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func

    return self.func(req, *args, **kwargs)

  File "/var/lib/nova/keystone/middleware/ec2_token.py", line 71, in
__call__

    o = urlparse(FLAGS.keystone_ec1_url)

  File "/var/lib/nova/nova/flags.py", line 144, in __getattr__

    val = gflags.FlagValues.__getattr__(self, name)

  File "/usr/lib/python2.6/dist-packages/gflags.py", line 810, in
__getattr__

    raise AttributeError(name)

AttributeError: keystone_ec1_url

 

I don't want to leap on conclusions, but because of the "AttributeError for
keystone_ec1_url" I think there might be some kind of typo ;).

 

I found a thread in the openstack forum [1] where a similar problem is
discussed and apparently the euca2ools need to be patched. My euca2ools are
currently on version 1.2 and on the euca2ools download page [3] release 1.3
is available. The website states that lucid users can install it from the
standard Ubuntu repository, but when I execute "apt-get update" and "apt-get
install euca2ools", my system tells me that they are already installed. I
suppose that I have to add a source to my sources.list but sadly I couldn't
find one including the desired version of euca2ools.

 

In the forum thread I mentioned, Lean posted a link to a github commit [2]
which fixes the AttributeError. But I have never done a software update from
a github repository commit. How does one approach this intention?

 

Cheers,

Nicolas

 

[1] <http://forums.openstack.org/viewtopic.php?f=23&t=379>
http://forums.openstack.org/viewtopic.php?f=23&t=379

[2]
<https://github.com/openstack/keystone/commit/2bb474331d73e7c6d2a507cb097c50
>
https://github.com/openstack/keystone/commit/2bb474331d73e7c6d2a507cb097c50

[3]http://open.eucalyptus.com/downloads

 

From: Derrick Wippler [mailto:thrawn01 at gmail.com] 
Sent: Donnerstag, 23. Februar 2012 20:32
To: Nicolas Odermatt
Cc: openstack at lists.launchpad.net
Subject: Re: [Openstack] Uploading Images to nova

 

Run 'euca-describe-images' it should tell you what your missing in your
environment, or perhaps the error. ( It looks like you have all the
environment variables )

 

The euca-describe-images needs the following

EC2_SECRET_KEY

EC2_ACCESS_KEY

EC2_URL


On a side note, uec-publish-tarball didn't work for me on essex-3 ( it
worked, but uploaded the image incorrectly).

I stole the upload code from devstack and made a little script located on my
github repo ( I'm running glance )

https://github.com/thrawn01/dev-tools/blob/master/openstack/publish-uec-imag
e.sh

 

It might be of some help to you. Hope this helps!

 

Derrick,

 

 

On Wed, Feb 22, 2012 at 5:51 AM, Nicolas Odermatt <odermattn at gmail.com>
wrote:

Hey guys,

 

I successfully installed a single-node with the stackops-distro. However I
encountered an error while uploading an image to nova using
"uec-publish-tarball" command.

 

Here is what I did:

//Execute command to upload

root at nova-controller:~# uec-publish-tarball
lucid-server-cloudimg-amd64.tar.gz images

 

// Error message printed

Unable to run euca-describe-images.  Is euca2ools environment set up?

 

// First of all I checked wether euca2ools were installed:

root at nova-controller:~# dpkg --get-selections | grep euca2ools

euca2ools                                       install

 

// Then I looked into the environment variables to verify that the novarc
file has been sourced:

 

root at nova-controller:/usr/lib/python2.6/dist-packages# env

TERM=xterm

SHELL=/bin/bash

SSH_CLIENT=192.168.163.1 49471 22

EUCALYPTUS_CERT=/root/ipa-cred/cacert.pem

OLDPWD=/root

SSH_TTY=/dev/pts/0

USER=root

LS_COLORS=rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;3
3;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st
=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:
*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;
31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.
rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=0
1;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;3
5:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*
.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mp
eg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=
01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:
*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl
=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;
35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:
*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa
=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:

NOVA_CERT=/root/ipa-cred/cacert.pem

EC2_SECRET_KEY=ec90b740-8f45-49c1-880a-71a8f8f8b6cc

NOVA_PROJECT_ID=ipa

EC2_USER_ID=42

MAIL=/var/mail/root

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
:/var/lib/nova/bin/

NOVA_VERSION=1.1

NOVA_USERNAME=nodermatt

PWD=/usr/lib/python2.6/dist-packages

LANG=en_US.UTF-8

NOVA_API_KEY=nodermatt

NOVA_URL=http://192.168.163.10:8774/v1.1/

SHLVL=1

HOME=/root

EC2_URL=http://192.168.163.10:8773/services/Cloud

LOGNAME=root

SSH_CONNECTION=192.168.163.1 49471 192.168.163.10 22

EC2_ACCESS_KEY=nodermatt:ipa

LESSOPEN=| /usr/bin/lesspipe %s

EC2_PRIVATE_KEY=/root/ipa-cred/pk.pem

S3_URL=http://192.168.163.10:3333

LESSCLOSE=/usr/bin/lesspipe %s %s

EC2_CERT=/root/ipa-cred/cert.pem

_=/usr/bin/env

 

//After that I took a look into the nova-api.log:

root at nova-controller:~/ipa-cred# tail -n10 /var/log/nova/nova-api.log

2012-02-22 11:01:26,999 DEBUG routes.middleware
[293b16dd-ca98-46f1-94f3-34469d85ca6e admin 2] Match dict: {'action':
u'index', 'controller': <nova.api.openstack.wsgi.Resource object at
0x4058d10>, 'project_id': u'2'} from (pid=1369) __call__
/usr/lib/pymodules/python2.6/routes/middleware.py:103

2012-02-22 11:01:26,999 INFO nova.api.openstack.wsgi
[293b16dd-ca98-46f1-94f3-34469d85ca6e admin 2] GET
http://192.168.163.10:8774/v1.1/2/os-keypairs?fresh=1329908486.91

2012-02-22 11:01:27,000 DEBUG nova.api.openstack.wsgi
[293b16dd-ca98-46f1-94f3-34469d85ca6e admin 2] Unrecognized Content-Type
provided in request from (pid=1369) deserialize_body
/var/lib/nova/nova/api/openstack/wsgi.py:231

2012-02-22 11:01:27,004 INFO nova.api.openstack.wsgi
[293b16dd-ca98-46f1-94f3-34469d85ca6e admin 2]
http://192.168.163.10:8774/v1.1/2/os-keypairs?fresh=1329908486.91 returned
with HTTP 200

2012-02-22 11:02:35,731 INFO nova.api.openstack.wsgi [-] GET
http://192.168.163.10:8774/favicon.ico

2012-02-22 11:02:35,732 DEBUG nova.api.openstack.wsgi [-] Unrecognized
Content-Type provided in request from (pid=1369) deserialize_body
/var/lib/nova/nova/api/openstack/wsgi.py:231

2012-02-22 11:02:35,733 INFO nova.api.openstack.wsgi [-]
http://192.168.163.10:8774/favicon.ico returned with HTTP 300

2012-02-22 11:02:35,755 INFO nova.api.openstack.wsgi [-] GET
http://192.168.163.10:8774/favicon.ico

2012-02-22 11:02:35,756 DEBUG nova.api.openstack.wsgi [-] Unrecognized
Content-Type provided in request from (pid=1369) deserialize_body
/var/lib/nova/nova/api/openstack/wsgi.py:231

2012-02-22 11:02:35,818 INFO nova.api.openstack.wsgi [-]
http://192.168.163.10:8774/favicon.ico returned with HTTP 300

 

//Then I ran the euca-describe-zones command to receive more information:

root at nova-controller:~# euca-describe-availability-zones verbose

Warning: failed to parse error message from AWS: <unknown>:1:0: syntax error

BotoServerError: 500 Internal Server Error

Traceback (most recent call last):

  File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in
handle_one_response

    result = self.application(self.environ, start_response)

  File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 203, in __call__

    return app(environ, start_response)

  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__

    resp = self.call_func(req, *args, **self.kwargs)

  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func

    return self.func(req, *args, **kwargs)

  File "/var/lib/nova/nova/api/ec2/__init__.py", line 58, in __call__

    rv = req.get_response(self.application)

  File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in
get_response

    application, catch_exc_info=False)

  File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in
call_application

    app_iter = application(self.environ, start_response)

  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__

    resp = self.call_func(req, *args, **self.kwargs)

  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func

    return self.func(req, *args, **kwargs)

  File "/var/lib/nova/keystone/middleware/ec2_token.py", line 71, in
__call__

    o = urlparse(FLAGS.keystone_ec1_url)

  File "/var/lib/nova/nova/flags.py", line 144, in __getattr__

    val = gflags.FlagValues.__getattr__(self, name)

  File "/usr/lib/python2.6/dist-packages/gflags.py", line 810, in
__getattr__

    raise AttributeError(name)

AttributeError: keystone_ec1_url

 

Shouldn't the system use keystone_ec2_url instead of keystone_ec1_url? 

 

I would be delighted if this error could be resolved.

 

Thanks for your writing in advance!

 

Cheers,

Nicolas

 


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack at lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120223/053b657a/attachment.html>


More information about the Openstack mailing list