Catch wrong exception due to oslo's change.

Bug #1206013 reported by Ya Hong Du
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Triaged
Low
ZhiQiang Fan

Bug Description

In neutron/agent/linux/ip_lib.py, if option 'ip_lib_force_root' is not registered, 'NoSuchOptError' will be catched.
But now, oslo.config changed.
According to below commit, '__getattr__' will raise 'AttributeError' if any exception happens.
https://review.openstack.org/#/c/37276/

We didn't handle 'AttributeError' in above file so that neutron-dhcp-agent can't start successfully.

ZhiQiang Fan (aji-zqfan)
Changed in neutron:
assignee: nobody → Zhiqiang Fan (aji-zqfan)
tags: added: low-hanging-fruit
Revision history for this message
Mark McClain (markmcclain) wrote :

The fix should work with latest and the previous release of the config library

Changed in neutron:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

according to the oslo source code, i notice that the NoSuchOptError inherits from AttributeError (actually is multiple inherit). So i think just catch AttrbuteError will be fine, however, i will read more carefully and test it.

Revision history for this message
Kyle Mestery (mestery) wrote :

This fixed this for me, looks to be an oslo dependency issue of some sort:

cd /usr/local/lib/python2.7/dist-packages
sudo rm -rf oslo*
sudo pip install --upgrade http://tarballs.openstack.org/oslo.config/oslo.config-1.2.0a3.tar.gz#egg=oslo.config-1.2.0a3

Revision history for this message
Matt Riedemann (mriedem) wrote :
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.