Fix logic in test_db_loadbalancer

Bug #1180113 reported by Eugene Nikanorov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Eugene Nikanorov

Bug Description

Several methods in test_db_loadbalancer have incorrect logic like the following piece of code:

res = self._create_vip(fmt,
                                       name,
                                       pool_id,
                                       protocol,
                                       protocol_port,
                                       admin_state_up,
                                       subnet_id=tmp_subnet['subnet']['id'],
                                       **kwargs)
vip = self.deserialize(fmt or self.fmt, res)
if res.status_int >= 400:
       raise webob.exc.HTTPClientError(code=res.status_int)

In case of res.status_int >= 400 code tries to deserialize malformed body and it throws an exception masking real cause of failure.

Tags: lbaas unittest
description: updated
tags: added: lbaas unittest
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/29147

Changed in quantum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/29147
Committed: http://github.com/openstack/quantum/commit/2648314b4cb884fe317e246fd418d2674fc0192e
Submitter: Jenkins
Branch: master

commit 2648314b4cb884fe317e246fd418d2674fc0192e
Author: Eugene Nikanorov <email address hidden>
Date: Wed May 15 01:14:30 2013 +0400

    Fix logic in test_db_loadbalancer

    Fix code to check HTTP error code before attempt to deserialize body

    fixes bug 1180113

    Change-Id: I1d75e0fe739dfa70ef415602e669319797af026f

Changed in quantum:
status: In Progress → Fix Committed
tags: added: grizzly-backport-potential
Changed in quantum:
milestone: none → havana-1
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-1 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.