[openstack-dev] [Neutron][LBaaS] Error at context exit for subnet in unit test case

2014-08-20 Thread Vijay Venkatachalam
Hi, I am writing a unit testcase with context as subnet, code here [1]. When the context exits a delete of subnet is attempted and I am getting a MismatchError . Traceback posted here [2]. What could be going wrong here? Testcase is written like the following -- with

Re: [openstack-dev] [Neutron][LBaaS] Error at context exit for subnet in unit test case

2014-08-20 Thread Ihar Hrachyshka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 20/08/14 15:42, Vijay Venkatachalam wrote: Hi, I am writing a unit testcase with context as subnet, code here [1]. When the context exits a delete of subnet is attempted and I am getting a MismatchError . Traceback posted here [2]. What

Re: [openstack-dev] [Neutron][LBaaS] Error at context exit for subnet in unit test case

2014-08-20 Thread Vijay Venkatachalam
I observed the following text as well One or more ports have an IP allocation from this subnet. Looks like loadbalancer context exit at blah2 is not cleaning up the port that was created. This ultimately resulted in failure of delete subnet at blah3. -- with self.subnet()

Re: [openstack-dev] [Neutron][LBaaS] Error at context exit for subnet in unit test case

2014-08-20 Thread Brandon Logan
Hey Vijay, Figured out the issue you are having. In that particular test you are creating the same subnet twice. The first time you create it is in the contextlib.nested, the second time is the self.loadbalancer method that will create a subnet if you do not pass it. So you should pass

Re: [openstack-dev] [Neutron][LBaaS] Error at context exit for subnet in unit test case

2014-08-20 Thread Vijay Venkatachalam
Hey Brandon, Thanks for looking into it. Yes I figured this out too and passed the pre-created subnet to loadbalancer method. Issue here is slightly different, please have a look at the review https://review.openstack.org/#/c/114173/ Inorder to make it work; I have made network, subnet and