Attribute validation errors are logged twice

Bug #1397310 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Sandhya Dasu

Bug Description

In neutron/api/v2/attributes.py, all validation functions debug-log any errors that occur inside them, and return the error message back to caller. In the end, those messages get into _validate_dict() function that also logs those messages, if any. Meaning, we'll get duplicate validation errors in debug logs for every validation failure.

Validation functions should not report those messages themselves, instead relying on caller to handle returned error messages as it sees fit.

Changed in neutron:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
tags: added: low-hanging-fruit
Changed in neutron:
importance: Undecided → Low
status: New → Confirmed
Changed in neutron:
assignee: Ihar Hrachyshka (ihar-hrachyshka) → Sanjay Kumar Singh (sanjay6-singh)
status: Confirmed → In Progress
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/149853

Changed in neutron:
assignee: Sanjay Kumar Singh (sanjay6-singh) → Sandhya Dasu (sadasu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 87f26929ee8e17d132c6d8c719e97e6795675caf
Author: Sandhya Dasu <email address hidden>
Date: Fri Jan 30 15:46:55 2015 -0500

    Remove duplicate logging of attribute validation errors

    Removed logging at top level function _validate_dict() and
    added logging at the lower level functions wherever necessary.

    Change-Id: I09ec62ef5998aea5735ff641166cbc5b469775e9
    Closes-bug: #1397310

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.