Comment 4 for bug 724143

Revision history for this message
Dan Prince (dan-prince) wrote :

You should be able to gem install the openstack-compute binding with the following command:

  'gem install openstack-compute'

** You'll need Ruby and Rubygems installed before running this command (those are available as packages).

I tried your hot fix and it allowed me to create a server with no metadata:

  cs.create_server(:name => "Yo", :imageId => 3, :flavorId => 1)

I also tried to create a server with metadata:

  cs.create_server(:name => "Yo", :imageId => 3, :flavorId => 1, :metadata=>{"foo" => "bar"} )

When trying with metadata I get a totally different exception:

(nova.api.openstack): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/collections.py", line 660, in bulk_replace
(nova.api.openstack): TRACE: constants = idset(existing_adapter or ()).intersection(values or ())
(nova.api.openstack): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/util.py", line 1104, in intersection
(nova.api.openstack): TRACE: self._working_set(self._member_id_tuples()).intersection(_iter_id(iterable)))
(nova.api.openstack): TRACE: TypeError: unhashable type: 'dict'

---

I'm not sure the metadata code works 'as-is' with cloud servers bindings. Using the Ruby binding above should allow you to reproduce the issue on your end. To be fair *any* of the Rackspace Cloud Servers bindings (Ruby or Python) should allow you to reproduce these issue from an end users prospective.

Adding more unit tests to catch these things would be great too. Let me know if you want me to take a look at anything else.