yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #54950
[Bug 1582589] Re: ComputeCapacityFilter always reject irrelevant, self-defined specs
Reviewed: https://review.openstack.org/317306
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=83b59ea6035df173fb206167a4911f512fe22e64
Submitter: Jenkins
Branch: master
commit 83b59ea6035df173fb206167a4911f512fe22e64
Author: OctopusZhang <zhang.yufei@xxxxxxxxxxx>
Date: Tue May 17 08:05:19 2016 +0000
Allow irrelevant,self-defined specs in ComputeCapacityFilter
For backward compatibility, ComputeCapacityFilter treats extra spec
keys which contain no colons like 'x' the same as 'capabilities:x',
because hoststate doesn't contain attribute like x, this filter always
return False. So it causes conflict with
AggregateInstanceExtraSpecsFilter, and limits user to define extra spec
keys without colons.
This patch solves the conflict and keep it backward compatible.
This patch also joins two lines into one in method host_passes.
Change-Id: Ia9e7c882bcee131e106e67dc46ed9ce1224e4c67
Closes-Bug: #1582589
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1582589
Title:
ComputeCapacityFilter always reject irrelevant,self-defined specs
Status in OpenStack Compute (nova):
Fix Released
Bug description:
Master branch 2016.5.17
When I enabe ComputeCapacityFilter:
If I define a irrelevant specs in flavor like key='x' value='y'
ComputeCapacityFilter will return flase,I can't create instances.
If I define a irrelevant specs like key='mykey:x' value='y'
ComputeCapacityFilter will return True
This means if I don't add a head string and a colon before my real
key, ComputeCapacityFilter doesn't permit me to use it.
If this kind of specs is not allowed,I believe this should be refused
in horizon or api,not in filter.
But when i read test_compute_capabilities_filters.py, I find it is
permitted,but only for ComputeCapacityFilter's specs.
code:
def test_compute_filter_pass_extra_specs_same_as_scope(self):
# Make sure this still works even if the key is the same as the scope
self._do_test_compute_filter_extra_specs(
ecaps={'capabilities': 1},
especs={'capabilities': '1'},
passes=True)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1582589/+subscriptions
References