Re: [openstack-dev] [neutron] InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction.

2016-01-12 Thread Koteswar
I tried rollback but still it didn't work. This issue is reproduced sometimes only when 1. neutron port created 2. enable fixed looping in conf, stop neutron and start 3. delete neutron port and looping interval is very lesss say 20 secs. source code where it fails: ---

Re: [openstack-dev] [neutron] InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction.

2016-01-11 Thread Koteswar
thanks a lot. I will try this. On Mon, Jan 11, 2016 at 7:26 PM, Mike Bayer wrote: > > > On 01/11/2016 03:58 AM, Koteswar wrote: > > Hi All, > > > > > > > > In my mechanism driver, I am reading/writing into sql db in a fixed > > interval looping call. Sometimes I get the following error when I st

Re: [openstack-dev] [neutron] InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction.

2016-01-11 Thread Mike Bayer
On 01/11/2016 03:58 AM, Koteswar wrote: > Hi All, > > > > In my mechanism driver, I am reading/writing into sql db in a fixed > interval looping call. Sometimes I get the following error when I stop > and start neutron server > > InvalidRequestError: This session is in 'prepared' state; no f

Re: [openstack-dev] [neutron] InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction.

2016-01-11 Thread Kevin Benton
Is 'self.context' used to handle other requests as well? I would suggest generating a new context (neutron.context.get_admin_context()) for each fixed interval looping call to ensure you aren't sharing a DB session with another thread. On Mon, Jan 11, 2016 at 2:26 AM, Koteswar wrote: > vendor sp

Re: [openstack-dev] [neutron] InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction.

2016-01-11 Thread Koteswar
vendor specific mech driver code, where I am doing some read/write to sql. def _create_port(self, port): switchports = port['port']['switchports'] LOG.debug(_LE("_create_port switch: %s"), port) network_id = port['port'][' network_id'] subnets = db.get_subnets_by_network(self.context, network_id)

Re: [openstack-dev] [neutron] InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction.

2016-01-11 Thread Anna Kamyshnikova
Hi! Can you point what mechanism driver is this or the piece of code that give this error? On Mon, Jan 11, 2016 at 11:58 AM, Koteswar wrote: > Hi All, > > > > In my mechanism driver, I am reading/writing into sql db in a fixed > interval looping call. Sometimes I get the following error when I

[openstack-dev] [neutron] InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction.

2016-01-11 Thread Koteswar
Hi All, In my mechanism driver, I am reading/writing into sql db in a fixed interval looping call. Sometimes I get the following error when I stop and start neutron server InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction. I am us