I can confirm I'm testing with custom instance types.
2011/6/22 Yuriy Taraday <email address hidden>
> This issue does appear only on custom created instance types, because they > have real time instead of None in created_at field. > Built-in (EC2-like) instance types are not affected. > > -- > You received this bug notification because you are subscribed to the bug > report. > https://bugs.launchpad.net/bugs/788265 > > Title: > Can't boot instance because of instance_type wrong pass > > Status in OpenStack Compute (Nova): > New > > Bug description: > [root@cloud ~]# nova boot --flavor 1 --image 365320335 mike > datetime.datetime(2011, 5, 25, 17, 19, 57) is not JSON serializable (HTTP > 500) > > Trace in nova-api: > 2011-05-25 21:52:36,949 DEBUG nova.rpc [-] Making asynchronous cast on > scheduler... from (pid=4237) cast > /usr/lib/python2.7/site-packages/nova/rpc.py:411 > 2011-05-25 21:52:36,994 ERROR nova.api.openstack [-] Caught error: > datetime.datetime(2011, 5, 25, 17, 19, 57) is not JSON serializable > (nova.api.openstack): TRACE: Traceback (most recent call last): > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/nova/api/openstack/__init__.py", line 59, > in __call__ > (nova.api.openstack): TRACE: return req.get_response(self.application) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/webob/request.py", line 919, in > get_response > (nova.api.openstack): TRACE: application, catch_exc_info=False) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/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/python2.7/site-packages/webob/dec.py", line 159, in __call__ > (nova.api.openstack): TRACE: return resp(environ, start_response) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in __call__ > (nova.api.openstack): TRACE: return resp(environ, start_response) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in __call__ > (nova.api.openstack): TRACE: return resp(environ, start_response) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in > __call__ > (nova.api.openstack): TRACE: response = self.app(environ, > start_response) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in __call__ > (nova.api.openstack): TRACE: return resp(environ, start_response) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/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/python2.7/site-packages/webob/dec.py", line 208, in call_func > (nova.api.openstack): TRACE: return self.func(req, *args, **kwargs) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/nova/wsgi.py", line 364, in __call__ > (nova.api.openstack): TRACE: result = method(**arg_dict) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/nova/api/openstack/servers.py", line 183, > in create > (nova.api.openstack): TRACE: injected_files=injected_files) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 268, in create > (nova.api.openstack): TRACE: "injected_files": injected_files}}) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/nova/rpc.py", line 415, in cast > (nova.api.openstack): TRACE: publisher.send(msg) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/carrot/messaging.py", line 765, in send > (nova.api.openstack): TRACE: serializer=serializer) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/carrot/messaging.py", line 690, in > create_message > (nova.api.openstack): TRACE: serializer=serializer) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/carrot/serialization.py", line 144, in > encode > (nova.api.openstack): TRACE: payload = encoder(data) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/anyjson/__init__.py", line 124, in > <lambda> > (nova.api.openstack): TRACE: serialize = lambda value: > implementation.serialize(value) > (nova.api.openstack): TRACE: File > "/usr/lib/python2.7/site-packages/anyjson/__init__.py", line 86, in > serialize > (nova.api.openstack): TRACE: raise TypeError(*exc.args) > (nova.api.openstack): TRACE: TypeError: datetime.datetime(2011, 5, 25, 17, > 19, 57) is not JSON serializable > (nova.api.openstack): TRACE: > > After commenting instance_type in RPC call it works fine: > rpc.cast(context, > FLAGS.scheduler_topic, > {"method": "run_instance", > "args": {"topic": FLAGS.compute_topic, > "instance_id": instance_id, > #"instance_type": instance_type, > "availability_zone": availability_zone, > "injected_files": injected_files}}) > > [root@cloud ~]# nova-manage --version > OpenStack Nova version: 2011.3-dev > (2011.3-nova:tarmac-20110524231040-0tt6rxdaf77re6es) > > To manage notifications about this bug go to: > https://bugs.launchpad.net/nova/+bug/788265/+subscriptions >
I can confirm I'm testing with custom instance types.
2011/6/22 Yuriy Taraday <email address hidden>
> This issue does appear only on custom created instance types, because they /bugs.launchpad .net/bugs/ 788265 datetime( 2011, 5, 25, 17, 19, 57) is not JSON serializable (HTTP python2. 7/site- packages/ nova/rpc. py:411 datetime( 2011, 5, 25, 17, 19, 57) is not JSON serializable openstack) : TRACE: Traceback (most recent call last): openstack) : TRACE: File python2. 7/site- packages/ nova/api/ openstack/ __init_ _.py", line 59, openstack) : TRACE: return req.get_ response( self.applicatio n) openstack) : TRACE: File python2. 7/site- packages/ webob/request. py", line 919, in openstack) : TRACE: application, catch_exc_ info=False) openstack) : TRACE: File python2. 7/site- packages/ webob/request. py", line 887, in openstack) : TRACE: app_iter = application( self.environ, openstack) : TRACE: File python2. 7/site- packages/ webob/dec. py", line 159, in __call__ openstack) : TRACE: return resp(environ, start_response) openstack) : TRACE: File python2. 7/site- packages/ webob/dec. py", line 159, in __call__ openstack) : TRACE: return resp(environ, start_response) openstack) : TRACE: File python2. 7/site- packages/ webob/dec. py", line 159, in __call__ openstack) : TRACE: return resp(environ, start_response) openstack) : TRACE: File python2. 7/site- packages/ routes/ middleware. py", line 131, in openstack) : TRACE: response = self.app(environ, openstack) : TRACE: File python2. 7/site- packages/ webob/dec. py", line 159, in __call__ openstack) : TRACE: return resp(environ, start_response) openstack) : TRACE: File python2. 7/site- packages/ webob/dec. py", line 147, in __call__ openstack) : TRACE: resp = self.call_func(req, *args, openstack) : TRACE: File python2. 7/site- packages/ webob/dec. py", line 208, in call_func openstack) : TRACE: return self.func(req, *args, **kwargs) openstack) : TRACE: File python2. 7/site- packages/ nova/wsgi. py", line 364, in __call__ openstack) : TRACE: result = method(**arg_dict) openstack) : TRACE: File python2. 7/site- packages/ nova/api/ openstack/ servers. py", line 183, openstack) : TRACE: injected_ files=injected_ files) openstack) : TRACE: File python2. 7/site- packages/ nova/compute/ api.py" , line 268, in create openstack) : TRACE: "injected_files": injected_files}}) openstack) : TRACE: File python2. 7/site- packages/ nova/rpc. py", line 415, in cast openstack) : TRACE: publisher.send(msg) openstack) : TRACE: File python2. 7/site- packages/ carrot/ messaging. py", line 765, in send openstack) : TRACE: serializer= serializer) openstack) : TRACE: File python2. 7/site- packages/ carrot/ messaging. py", line 690, in openstack) : TRACE: serializer= serializer) openstack) : TRACE: File python2. 7/site- packages/ carrot/ serialization. py", line 144, in openstack) : TRACE: payload = encoder(data) openstack) : TRACE: File python2. 7/site- packages/ anyjson/ __init_ _.py", line 124, in openstack) : TRACE: serialize = lambda value: serialize( value) openstack) : TRACE: File python2. 7/site- packages/ anyjson/ __init_ _.py", line 86, in openstack) : TRACE: raise TypeError( *exc.args) openstack) : TRACE: TypeError: datetime. datetime( 2011, 5, 25, 17, openstack) : TRACE: _topic, topic, zone": availability_zone, nova:tarmac- 20110524231040- 0tt6rxdaf77re6e s) /bugs.launchpad .net/nova/ +bug/788265/ +subscriptions
> have real time instead of None in created_at field.
> Built-in (EC2-like) instance types are not affected.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Can't boot instance because of instance_type wrong pass
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> [root@cloud ~]# nova boot --flavor 1 --image 365320335 mike
> datetime.
> 500)
>
> Trace in nova-api:
> 2011-05-25 21:52:36,949 DEBUG nova.rpc [-] Making asynchronous cast on
> scheduler... from (pid=4237) cast
> /usr/lib/
> 2011-05-25 21:52:36,994 ERROR nova.api.openstack [-] Caught error:
> datetime.
> (nova.api.
> (nova.api.
> "/usr/lib/
> in __call__
> (nova.api.
> (nova.api.
> "/usr/lib/
> get_response
> (nova.api.
> (nova.api.
> "/usr/lib/
> call_application
> (nova.api.
> start_response)
> (nova.api.
> "/usr/lib/
> (nova.api.
> (nova.api.
> "/usr/lib/
> (nova.api.
> (nova.api.
> "/usr/lib/
> (nova.api.
> (nova.api.
> "/usr/lib/
> __call__
> (nova.api.
> start_response)
> (nova.api.
> "/usr/lib/
> (nova.api.
> (nova.api.
> "/usr/lib/
> (nova.api.
> **self.kwargs)
> (nova.api.
> "/usr/lib/
> (nova.api.
> (nova.api.
> "/usr/lib/
> (nova.api.
> (nova.api.
> "/usr/lib/
> in create
> (nova.api.
> (nova.api.
> "/usr/lib/
> (nova.api.
> (nova.api.
> "/usr/lib/
> (nova.api.
> (nova.api.
> "/usr/lib/
> (nova.api.
> (nova.api.
> "/usr/lib/
> create_message
> (nova.api.
> (nova.api.
> "/usr/lib/
> encode
> (nova.api.
> (nova.api.
> "/usr/lib/
> <lambda>
> (nova.api.
> implementation.
> (nova.api.
> "/usr/lib/
> serialize
> (nova.api.
> (nova.api.
> 19, 57) is not JSON serializable
> (nova.api.
>
> After commenting instance_type in RPC call it works fine:
> rpc.cast(context,
> FLAGS.scheduler
> {"method": "run_instance",
> "args": {"topic": FLAGS.compute_
> "instance_id": instance_id,
> #"instance_type": instance_type,
> "availability_
> "injected_files": injected_files}})
>
> [root@cloud ~]# nova-manage --version
> OpenStack Nova version: 2011.3-dev
> (2011.3-
>
> To manage notifications about this bug go to:
> https:/
>