Possible usage of undefined variable in oslo.messaging

Bug #1465300 reported by Denis Meltsaykin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
Medium
Denis Meltsaykin
6.0.x
Fix Released
Medium
Denis Meltsaykin

Bug Description

This code has been found during examination of oslo.messaing's code:
impl_rabbit.py line number ~646

            except Exception as ex:
                # NOTE(comstud): Unfortunately it's possible for amqplib
                # to return an error not covered by its transport
                # connection_errors in the case of a timeout waiting for
                # a protocol response. (See paste link in LP888621)
                # So, we check all exceptions for 'timeout' in them
                # and try to reconnect in this case.
                if 'timeout' not in six.text_type(e):
                    raise
                e = ex

There is possible an error: e = ex comes after if-section, this makes if useless and always to raise an exception.

Also the bug in upstream has been filed: https://bugs.launchpad.net/oslo.messaging/+bug/1465314

Alexey Khivin (akhivin)
Changed in mos:
assignee: nobody → Denis Meltsaykin (dmeltsaykin)
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/oslo.messaging (openstack-ci/fuel-6.1/2014.2)

Fix proposed to branch: openstack-ci/fuel-6.1/2014.2
Change author: Denis V. Meltsaykin <email address hidden>
Review: https://review.fuel-infra.org/7848

Alexey Khivin (akhivin)
Changed in mos:
status: New → In Progress
milestone: none → 6.1
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/oslo.messaging (openstack-ci/fuel-6.1/2014.2)

Reviewed: https://review.fuel-infra.org/7848
Submitter: Oleksii Zamiatin <email address hidden>
Branch: openstack-ci/fuel-6.1/2014.2

Commit: 4e11d9d036cae1aff0317b27282b495a9dc1ae09
Author: Denis V. Meltsaykin <email address hidden>
Date: Mon Jun 15 15:48:37 2015

Fix possible usage of undefined variable

Fix variable defenition in Connection.reconnect() as this could lead
to undefined behavior.

Change-Id: Ifb22d6884964faa5d8a76dcaafef5c79b6e9ee47
Closes-Bug: #1465300

Changed in mos:
status: In Progress → Fix Committed
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/oslo.messaging (openstack-ci/fuel-6.0-updates/2014.2)

Fix proposed to branch: openstack-ci/fuel-6.0-updates/2014.2
Change author: Denis V. Meltsaykin <email address hidden>
Review: https://review.fuel-infra.org/7860

description: updated
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/oslo.messaging (openstack-ci/fuel-6.0-updates/2014.2)

Reviewed: https://review.fuel-infra.org/7860
Submitter: mos-infra-ci <>
Branch: openstack-ci/fuel-6.0-updates/2014.2

Commit: 1015995820a07f164f0c2cbe3abab955399abb50
Author: Denis V. Meltsaykin <email address hidden>
Date: Mon Jun 15 16:49:10 2015

Fix possible usage of undefined variable

Fix variable defenition in Connection.reconnect() as this could lead
to undefined behavior.

Change-Id: Ifb22d6884964faa5d8a76dcaafef5c79b6e9ee47
Closes-Bug: #1465300
(cherry picked from commit 4e11d9d036cae1aff0317b27282b495a9dc1ae09)

Changed in mos:
importance: Undecided → Medium
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/oslo.messaging (openstack-ci/fuel-7.0/2015.1.0)

Fix proposed to branch: openstack-ci/fuel-7.0/2015.1.0
Change author: Denis V. Meltsaykin <email address hidden>
Review: https://review.fuel-infra.org/8286

tags: added: done release-notes
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/oslo.messaging (openstack-ci/fuel-7.0/2015.1.0)

Change abandoned by Victor Sergeyev <email address hidden> on branch: openstack-ci/fuel-7.0/2015.1.0
Review: https://review.fuel-infra.org/8286
Reason: This code was refactored during the Kilo release cycle

Roman Rufanov (rrufanov)
tags: added: customer-found support
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

Roman, could you please explain why you added customer-found tag? I haven't ever heard that some one has faced the issue. We don't even know what is the real impact.

Changed in mos:
status: Fix Committed → Fix Released
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.