Tested using nova revision No 925.
Steps to reproduce:-
1) Run one VM instance
2) Confirm if state of the VM instance is Active
{{{
root@ubuntu-openstack-network-api-server:/home/tpatil/nova# nova list
+----+-----------+--------+-----------+---------------------------------------+
| ID | Name | Status | Public IP | Private IP |
+----+-----------+--------+-----------+---------------------------------------+
| 58 | Server 58 | active | | {u'version': 4, u'addr': u'10.0.0.5'} |
+----+-----------+--------+-----------+---------------------------------------+
}}}
3) snapshot vm instance
$nova image-create 58 "Snapshot Testing"
{{{
Unknown error occurred! {"image": {"status": "queued", "name": "Snapshot Testing", "deleted": false, "container_format": null, "created_at": "2011-04-02T00:20:16.285868", "disk_format": null, "updated_at": null, "id": 6, "location": null, "checksum": null, "is_public": false, "deleted_at": null, "properties": {"instance_id": "58", "user_id": "admin"}, "size": 0}} (HTTP 500)
}}}
4) nova-api.log
{{{
2011-04-01 17:19:21,665 DEBUG eventlet.wsgi.server [-] 10.2.3.150 - - [01/Apr/2011 17:19:21] "GET /v1.1/ HTTP/1.1" 204 276 0.007600
from (pid=19241) write /home/tpatil/nova/nova/wsgi.py:56
2011-04-01 17:19:21,723 DEBUG routes.middleware [-] No route matched for GET /servers/58 from (pid=19241) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:97
2011-04-01 17:19:21,724 DEBUG routes.middleware [-] Matched GET /servers/58 from (pid=19241) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:100
2011-04-01 17:19:21,724 DEBUG routes.middleware [-] Route path: '/servers/:(id)', defaults: {'action': u'show', 'controller': <nova.api.openstack.servers.ControllerV11 object at 0x21fffd0>} from (pid=19241) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:102
2011-04-01 17:19:21,724 DEBUG routes.middleware [-] Match dict: {'action': u'show', 'controller': <nova.api.openstack.servers.ControllerV11 object at 0x21fffd0>, 'id': u'58'} from (pid=19241) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:103
2011-04-01 17:19:21,854 DEBUG eventlet.wsgi.server [-] 10.2.3.150 - - [01/Apr/2011 17:19:21] "GET /v1.1//servers/58?fresh=1301703561.67 HTTP/1.1" 200 723 0.186549
from (pid=19241) write /home/tpatil/nova/nova/wsgi.py:56
2011-04-01 17:19:21,911 DEBUG routes.middleware [-] No route matched for POST /images from (pid=19241) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:97
2011-04-01 17:19:21,912 DEBUG routes.middleware [-] Matched POST /images from (pid=19241) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:100
2011-04-01 17:19:21,913 DEBUG routes.middleware [-] Route path: '/images', defaults: {'action': u'create', 'controller': <nova.api.openstack.images.ControllerV11 object at 0x220f910>} from (pid=19241) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:102
2011-04-01 17:19:21,913 DEBUG routes.middleware [-] Match dict: {'action': u'create', 'controller': <nova.api.openstack.images.ControllerV11 object at 0x220f910>} from (pid=19241) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:103
2011-04-01 17:19:21,914 DEBUG nova.image.glance [-] Creating image in Glance. Metadata passed in {'is_public': False, 'name': u'Snapshot Testing', 'properties': {'instance_id': '58', 'user_id': 'admin'}} from (pid=19241) create /home/tpatil/nova/nova/image/glance.py:135
2011-04-01 17:19:21,914 DEBUG nova.image.glance [-] Metadata after formatting for Glance {'is_public': False, 'name': u'Snapshot Testing', 'properties': {'instance_id': '58', 'user_id': 'admin'}} from (pid=19241) create /home/tpatil/nova/nova/image/glance.py:138
2011-04-01 17:19:22,016 ERROR nova.api.openstack [-] Caught error: Unknown error occurred! {"image": {"status": "queued", "name": "Snapshot Testing", "deleted": false, "container_format": null, "created_at": "2011-04-02T00:20:16.285868", "disk_format": null, "updated_at": null, "id": 6, "location": null, "checksum": null, "is_public": false, "deleted_at": null, "properties": {"instance_id": "58", "user_id": "admin"}, "size": 0}}
(nova.api.openstack): TRACE: Traceback (most recent call last):
(nova.api.openstack): TRACE: File "/home/tpatil/nova/nova/api/openstack/__init__.py", line 58, in __call__
(nova.api.openstack): TRACE: return req.get_response(self.application)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in get_response
(nova.api.openstack): TRACE: application, catch_exc_info=False)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in call_application
(nova.api.openstack): TRACE: app_iter = application(self.environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 131, in __call__
(nova.api.openstack): TRACE: response = self.app(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 131, in __call__
(nova.api.openstack): TRACE: response = self.app(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
(nova.api.openstack): TRACE: resp = self.call_func(req, *args, **self.kwargs)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
(nova.api.openstack): TRACE: return self.func(req, *args, **kwargs)
(nova.api.openstack): TRACE: File "/home/tpatil/nova/nova/wsgi.py", line 354, in __call__
(nova.api.openstack): TRACE: result = method(**arg_dict)
(nova.api.openstack): TRACE: File "/home/tpatil/nova/nova/api/openstack/images.py", line 132, in create
(nova.api.openstack): TRACE: image = self._compute_service.snapshot(context, server_id, image_name)
(nova.api.openstack): TRACE: File "/home/tpatil/nova/nova/compute/api.py", line 473, in snapshot
(nova.api.openstack): TRACE: recv_meta = self.image_service.create(context, sent_meta)
(nova.api.openstack): TRACE: File "/home/tpatil/nova/nova/image/glance.py", line 141, in create
(nova.api.openstack): TRACE: sent_service_image_meta, data)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/glance/client.py", line 259, in add_image
(nova.api.openstack): TRACE: res = self.do_request("POST", "/images", body, headers)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/glance/client.py", line 160, in do_request
(nova.api.openstack): TRACE: raise Exception("Unknown error occurred! %s" % res.read())
(nova.api.openstack): TRACE: Exception: Unknown error occurred! {"image": {"status": "queued", "name": "Snapshot Testing", "deleted": false, "container_format": null, "created_at": "2011-04-02T00:20:16.285868", "disk_format": null, "updated_at": null, "id": 6, "location": null, "checksum": null, "is_public": false, "deleted_at": null, "properties": {"instance_id": "58", "user_id": "admin"}, "size": 0}}
(nova.api.openstack): TRACE:
}}}
What version of glance are you running? Although snapshotting doesn't work for me in nova trunk, this looks to be a glance issue?