Ask Your Question
0

does glance bzr129 version support swift

asked 2011-06-02 19:29:36 -0500

diego-lalo gravatar image

Hi Everyone, I configured a virtual machine with swift using this guide:

http://swift.openstack.org/development_saio.html (http://swift.openstack.org/developmen...)

and in the cloud controller I'm using glance imaging service, here is the config file of glance:

[DEFAULT]

Show more verbose log output (sets INFO log level output)

verbose = True

Show debugging output in logs (sets DEBUG log level output)

debug = False

[app:glance-api] paste.app_factory = glance.server:app_factory

Which backend store should Glance use by default is not specified

in a request to add a new image to Glance? Default: 'file'

Available choices are 'file', 'swift', and 's3'

default_store = swift

Address to bind the API server

bind_host = 0.0.0.0

Port the bind the API server to

bind_port = 9292

Address to find the registry server

registry_host = 0.0.0.0

Port the registry server is listening on

registry_port = 9191

Log to this file. Make sure you do not set the same log

file for both the API and registry servers!

log_file = /var/log/glance/api.log

============ Filesystem Store Options ========================

Directory that the Filesystem backend store

writes image data to

filesystem_store_datadir = /var/lib/glance/images/

============ Swift Store Options =============================

Address where the Swift authentication service lives

swift_store_auth_address = 192.168.1.217:8080/auth/v1.0/

User to authenticate against the Swift authentication service

swift_store_user = test:tester

Auth key for the user authenticating against the

Swift authentication service

swift_store_key = testing

Container within the account that the account should use

for storing images in Swift

swift_store_container = glance

Do we create the container if it does not exist?

swift_store_create_container_on_put = true

[app:glance-registry] paste.app_factory = glance.registry.server:app_factory

Address to bind the registry server

bind_host = 0.0.0.0

Port the bind the registry server to

bind_port = 9191

Log to this file. Make sure you do not set the same log

file for both the API and registry servers!

log_file = /var/log/glance/registry.log

SQLAlchemy connection string for the reference implementation

registry server. Any valid SQLAlchemy connection string is fine.

See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine (http://www.sqlalchemy.org/docs/05/ref...)

sql_connection = sqlite:////var/lib/glance/glance.sqlite

Period in seconds after which SQLAlchemy should reestablish its connection

to the database.

#

MySQL uses a default wait_timeout of 8 hours, after which it will drop

idle connections. This can result in 'MySQL Gone Away' exceptions. If you

notice this, you can lower this value to ensure that SQLAlchemy reconnects

before MySQL can drop the connection.

sql_idle_timeout = 3600

When I tried to add an image to glance I got the following error:

glance add --verbose name="Centos 5.5 Qcow2-2-SWIFT" is_public=true disk_format=qcow2 container_format=bare < Centos5.5-32Bits_1.0rev2_vhd/Centos5.5-32Bits_1.0rev2.qcow2 Failed to add image. Got error: 400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

Error uploading image: No module named swift.common
Note: Your image metadata may still be in the registry, but the image's status ...
(more)

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2011-06-13 13:30:30 -0500

diego-lalo gravatar image

Anyone know about the error I had when I tried to add the image with glance using swift?

Cheers Diego

edit flag offensive delete link more
0

answered 2011-06-02 19:50:59 -0500

jaypipes gravatar image

Yep, support for Swift is in there. You just need to install swift :)

If you're on Ubuntu, a quick:

sudo apt-get install python-swift

should do the trick.

-jay

edit flag offensive delete link more
0

answered 2011-06-02 20:04:11 -0500

diego-lalo gravatar image

Ty Jay, I installed the package you told me but now I have another error:

glance add --verbose name="Centos 5.5 Qcow2-2-SWIFT" is_public=true disk_format=qcow2 container_format=bare < Centos5.5-32Bits_1.0rev2_vhd/Centos5.5-32Bits_1.0rev2.qcow2 Failed to add image. Got error: 400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

Error uploading image: [Errno 1] _ssl.c:490: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'. Completed in 36.4647 sec.

edit flag offensive delete link more
0

answered 2011-06-13 19:31:45 -0500

jaypipes gravatar image

On Mon, Jun 13, 2011 at 9:31 AM, Diego Lalo question160060@answers.launchpad.net wrote:

Question #160060 on Glance changed: https://answers.launchpad.net/glance/...

Diego Lalo gave more information on the question: Anyone know about the error I had when I tried to add the image with glance using swift?

Hi Diego! Sorry, I haven't been able to find an answer on that one. It kind of looks like your python-MCrypto library wasn't installed correctly or didn't build the SSL lib correctly. I'm a little unsure what to recommend, frankly :(

-jay

edit flag offensive delete link more
0

answered 2011-06-15 17:45:32 -0500

diego-lalo gravatar image

Ty anyway Jay, I reinstalled the package python-m2crypto but the issue remains, I found this googling the error:

http://mercurial.808500.n3.nabble.com/cloning-problem-td2281623.html (http://mercurial.808500.n3.nabble.com...)

                                                                                                                               diff python/Modules/_ssl.c python/Modules/_ssl.c

--- python/Modules/_ssl.c +++ python/Modules/_ssl.c @@ -365,7 +365,7 @@ newPySSLObject(PySocketSockObject *Sock, char *key_file, char *cert_file, }

 /* ssl compatibility */

- SSL_CTX_set_options(self->ctx, SSL_OP_ALL); + SSL_CTX_set_options(self->ctx, SSL_OP_ALL|SSL_OP_NO_TLSv1_1);

 verification_mode = SSL_VERIFY_NONE; 
 if (certreq == PY_SSL_CERT_OPTIONAL)

I will have to find out if this could help me

Cheers Diego

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-06-02 19:29:36 -0500

Seen: 52 times

Last updated: Jun 15 '11