midonet_lib.py contains a typo'd format parameter

Bug #1404755 reported by Angus Lees
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Angus Lees

Bug Description

In add_static_nat(...):

        LOG.debug("MidoClient.add_static_nat called: "
                  "tenant_id=%(tenant_id)s, chain_name=%(chain_name)s, "
                  "from_ip=%(from_ip)s, to_ip=%(to_ip)s, "
                  "port_id=%(port_id)s, nat_type=%(nat_type)s",
                  {'tenant_id': tenant_id, 'chain_name': chain_name,
                   'from_ip': from_ip, 'to_ip': to_ip,
                   'portid': port_id, 'nat_type': nat_type})

Note port_id vs portid. This line of code will raise a KeyError if debug logging is enabled.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
assignee: nobody → Angus Lees (gus)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/143334
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a9571b5d8ecc2db8f2d0808eb444bab4baf348c3
Submitter: Jenkins
Branch: master

commit a9571b5d8ecc2db8f2d0808eb444bab4baf348c3
Author: Angus Lees <email address hidden>
Date: Mon Dec 22 10:25:58 2014 +1100

    Fix typo'd format parameter in midonet_lib.py

    In add_static_nat(...):

            LOG.debug("MidoClient.add_static_nat called: "
                      "tenant_id=%(tenant_id)s, chain_name=%(chain_name)s, "
                      "from_ip=%(from_ip)s, to_ip=%(to_ip)s, "
                      "port_id=%(port_id)s, nat_type=%(nat_type)s",
                      {'tenant_id': tenant_id, 'chain_name': chain_name,
                       'from_ip': from_ip, 'to_ip': to_ip,
                       'portid': port_id, 'nat_type': nat_type})

    Note port_id vs portid. This line of code raises a KeyError if debug
    logging is enabled.

    (Found via pylint)

    Change-Id: I4d76255a559489f2f0e074b4489cfa5f33f1dddf
    Closes-Bug: #1404755

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-2 → 2015.1.0
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.