AttributeError: lswitch is None

Bug #1580084 reported by Li Ma
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DragonFlow
Fix Released
High
duankebo

Bug Description

2016-05-10 06:31:15.969 22733 INFO dragonflow.db.api_nb [-] Pushing Update to Queue: Action:delete, Table:lswitch, Key:0c615b33-d58f-4f19-8c29-e40289a3578a Value:None Topic:D
2016-05-10 06:31:15.969 22733 DEBUG dragonflow.db.api_nb [-] Event update: Action:delete, Table:lswitch, Key:0c615b33-d58f-4f19-8c29-e40289a3578a Value:None Topic:D _read_db_changes_from_queue /opt/stack/new/dragonflow/dragonflow/db/api_nb.py:163
2016-05-10 06:31:15.969 22733 INFO dragonflow.controller.df_local_controller [-] Removing Logical Switch = {u'topic': u'2e78560195214d5b91579fb928e52f74', u'router_external': False, u'external_ids': {u'neutron:network_name': u'mynetwork1'}, u'name': u'0c615b33-d58f-4f19-8c29-e40289a3578a', u'subnets': []}
2016-05-10 06:31:15.984 22733 INFO dragonflow.db.api_nb [-] Pushing Update to Queue: Action:delete, Table:lswitch, Key:0c615b33-d58f-4f19-8c29-e40289a3578a Value:None Topic:D
2016-05-10 06:31:15.985 22733 DEBUG dragonflow.db.api_nb [-] Event update: Action:delete, Table:lswitch, Key:0c615b33-d58f-4f19-8c29-e40289a3578a Value:None Topic:D _read_db_changes_from_queue /opt/stack/new/dragonflow/dragonflow/db/api_nb.py:163
2016-05-10 06:31:15.985 22733 INFO dragonflow.controller.df_local_controller [-] Removing Logical Switch = None
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb [-] 'NoneType' object has no attribute 'get_id'
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb Traceback (most recent call last):
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/db/api_nb.py", line 175, in _read_db_changes_from_queue
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb value)
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/db/api_nb.py", line 227, in apply_db_change
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb self.controller.logical_switch_deleted(lswitch_id)
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/controller/df_local_controller.py", line 187, in logical_switch_deleted
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb self.open_flow_app.notify_remove_logical_switch(lswitch)
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/controller/ryu_base_app.py", line 84, in notify_remove_logical_switch
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb self.dispatcher.dispatch('remove_logical_switch', lswitch=lswitch)
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/controller/dispatcher.py", line 43, in dispatch
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb handler(*args, **kwargs)
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/controller/l2_app.py", line 327, in remove_logical_switch
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb lswitch.get_id(),
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb AttributeError: 'NoneType' object has no attribute 'get_id'
2016-05-10 06:31:15.985 22733 ERROR dragonflow.db.api_nb

http://logs.openstack.org/02/306702/3/check/gate-dragonflow-dsvm-fullstack-nv/aaed8c8/logs/screen-df-controller.txt.gz

Li Ma (nick-ma-z)
Changed in dragonflow:
importance: Undecided → High
summary: - AttributeError: lswitch id is None
+ AttributeError: lswitch is None
Revision history for this message
Li Ma (nick-ma-z) wrote :

It has something related with db consistency. The local cache of lswitch is None when we want to read it.

Revision history for this message
Li Ma (nick-ma-z) wrote :
Download full text (4.0 KiB)

I noticed in one fullstack logs:

2016-05-10 09:51:26.032 22557 DEBUG etcd.client [-] Issuing read for key /lrouter with args {} read /usr/local/lib/python2.7/dist-packages/etcd/client.py:521
2016-05-10 09:51:26.034 22557 DEBUG etcd.client [-] Issuing read for key /floatingip with args {} read /usr/local/lib/python2.7/dist-packages/etcd/client.py:521
2016-05-10 09:51:26.038 22557 DEBUG dragonflow.db.api_nb [-] Event update: Action:delete, Table:lport, Key:02d51a35-30cd-4760-ad09-e246d309b3eb Value:None Topic:D _read_db_changes_from_queue /opt/stack/new/dragonflow/dragonflow/db/api_nb.py:162
2016-05-10 09:51:26.040 22557 DEBUG dragonflow.db.api_nb [-] Event update: Action:delete, Table:lport, Key:02d51a35-30cd-4760-ad09-e246d309b3eb Value:None Topic:D _read_db_changes_from_queue /opt/stack/new/dragonflow/dragonflow/db/api_nb.py:162
2016-05-10 09:51:26.040 22557 DEBUG dragonflow.db.api_nb [-] Event update: Action:delete, Table:lswitch, Key:9c519e37-e5fe-4de5-a761-8124fc87fd51 Value:None Topic:D _read_db_changes_from_queue /opt/stack/new/dragonflow/dragonflow/db/api_nb.py:162
2016-05-10 09:51:26.040 22557 INFO dragonflow.controller.df_local_controller [-] Removing Logical Switch = {u'topic': u'22279c0d7dd4445b927e541ca1c1d035', u'router_external': False, u'external_ids': {u'neutron:network_name': u'mynetwork1'}, u'name': u'9c519e37-e5fe-4de5-a761-8124fc87fd51', u'subnets': []}
2016-05-10 09:51:26.041 22557 DEBUG dragonflow.db.api_nb [-] Event update: Action:delete, Table:lswitch, Key:9c519e37-e5fe-4de5-a761-8124fc87fd51 Value:None Topic:D _read_db_changes_from_queue /opt/stack/new/dragonflow/dragonflow/db/api_nb.py:162
2016-05-10 09:51:26.042 22557 INFO dragonflow.controller.df_local_controller [-] Removing Logical Switch = None
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb [-] 'NoneType' object has no attribute 'get_id'
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb Traceback (most recent call last):
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/db/api_nb.py", line 174, in _read_db_changes_from_queue
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb value)
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/db/api_nb.py", line 226, in apply_db_change
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb self.controller.logical_switch_deleted(lswitch_id)
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/controller/df_local_controller.py", line 187, in logical_switch_deleted
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb self.open_flow_app.notify_remove_logical_switch(lswitch)
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/controller/ryu_base_app.py", line 84, in notify_remove_logical_switch
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb self.dispatcher.dispatch('remove_logical_switch', lswitch=lswitch)
2016-05-10 09:51:26.042 22557 ERROR dragonflow.db.api_nb File "/opt/stack/new/dragonflow/dragonflow/controller/dispatcher.py", line 43, in dispatch
2016-05-10 09:51:26.0...

Read more...

Revision history for this message
Li Ma (nick-ma-z) wrote :
Revision history for this message
Li Ma (nick-ma-z) wrote :
Changed in dragonflow:
status: New → Fix Committed
duankebo (duankebo)
Changed in dragonflow:
assignee: nobody → duankebo (duankebo-h)
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.