[configdb] need to limit queries for resource definitions to current environment

Bug #1583074 reported by Yuriy Taraday
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
High
Config DB

Bug Description

Otherwise user can get error like this: http://pastebin.com/Nr9zTwCW

If there are several components with resources with same names:

In [123]: with app.app_context(): astute_res = db.ResourceDefinition.query.filter_by(name='astute').all()

In [124]: astute_res
Out[124]:
[ResourceDefinition(id=13,name=u'astute',component=Component(id=1,name=u'fuel9.0'),content=None),
 ResourceDefinition(id=27,name=u'astute',component=Component(id=2,name=u'fuel8.0'),content=None),
 ResourceDefinition(id=41,name=u'astute',component=Component(id=3,name=u'fuel7.0'),content=None)]

Places to fix are marked with "TODO" in app.py.

Changed in fuel:
assignee: nobody → Config DB (configdb)
description: updated
Changed in fuel:
importance: Undecided → High
status: New → Confirmed
milestone: none → 10.0
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 10.0 → 10.1
Revision history for this message
Alexander Kislitsky (akislitsky) wrote :

Not actual after performance optimisations and logic refactoring in the tuning-box.

Changed in fuel:
status: Confirmed → Invalid
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.