get topology with wrong filter returns 404
Bug #1582141 reported by
Ifat Afek
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Vitrage |
Fix Released
|
Medium
|
dongwenjuan |
Bug Description
The following cli returns `Unknown Error (HTTP 404)'
vitrage topology show --filter '{"and": [{"==": {"category": "RESOURCE"}},{"==": {"is_deleted": "False"}}]}' --graph-type tree
This query is erroneous and should be changed to:
vitrage topology show --filter '{"and": [{"==": {"category": "RESOURCE"}},{"==": {"is_deleted": false}}]}' --graph-type tree
(use false with lower case 'f' and no parenthesis, instead of "False") .
Erroneous queries should not result in 404 error. We need to fix it.
Changed in vitrage: | |
importance: | Undecided → Medium |
Changed in vitrage: | |
assignee: | nobody → dongwenjuan (dong-wenjuan) |
To post a comment you must log in.
I fixed the erroneous query: False->false
vitrage topology show --filter '{"and": [{"==": {"category": "RESOURCE"}},{"==": {"is_deleted": "false"}},{"==": {"is_placeholder": false}}]}'
Unknown Error (HTTP 404)
It still returns the HTTP 404.
But it seems that the openstack.cluster root_data is matched the query condition.
I don't know why...
The error log: _drivers. amqpdriver [-] received message msg_id: 466a65fccb7c491 988b6766855893f 64 reply to reply_1664bae4e d4247cab2491515 607c0f39 __call__ /usr/local/ lib/python2. 7/dist- packages/ oslo_messaging/ _drivers/ amqpdriver. py:201 entity_ graph.api_ handler. entity_ graph_api [-] EntityGraphApis get_topology root:None get_topology /opt/stack/ vitrage/ vitrage/ entity_ graph/api_ handler/ entity_ graph_api. py:98 predicate: :((item. get('category' )== 'RESOURCE') and (item.get( 'is_deleted' )== 'false') and (item.get( 'is_placeholder ')== False)) create_predicate /opt/stack/ vitrage/ vitrage/ graph/query. py:69 graph.algo_ driver. networkx_ algorithm [-] graph_query_ vertices: root RESOURCE: openstack. cluster does not match filter {u'and': [{u'==': {u'category': u'RESOURCE'}}, {u'==': {u'is_deleted': u'false'}}, {u'==': {u'is_placeholder': False}}]} rpc.dispatcher [-] Exception during message handling: 'NoneType' object has no attribute 'output_graph'
2016-05-17 11:47:23.753 10470 DEBUG oslo_messaging.
2016-05-17 11:47:23.756 10470 DEBUG vitrage.
2016-05-17 11:47:23.756 10470 DEBUG vitrage.graph.query [-] create_
2016-05-17 11:47:23.757 10470 INFO vitrage.
2016-05-17 11:47:23.757 10470 ERROR oslo_messaging.