Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 596162 Details for
Bug 836658
CVE-2012-3371 OpenStack-Nova: Scheduler denial of service through scheduler_hints
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Upstream patch for Essex
essex.diff (text/plain), 1.92 KB, created by
Tomas Hoger
on 2012-07-04 07:44:53 UTC
(
hide
)
Description:
Upstream patch for Essex
Filename:
MIME Type:
Creator:
Tomas Hoger
Created:
2012-07-04 07:44:53 UTC
Size:
1.92 KB
patch
obsolete
>diff --git a/nova/scheduler/filters/affinity_filter.py b/nova/scheduler/filters/affinity_filter.py >index e6e7a11..652babc 100644 >--- a/nova/scheduler/filters/affinity_filter.py >+++ b/nova/scheduler/filters/affinity_filter.py >@@ -26,8 +26,11 @@ class AffinityFilter(filters.BaseHostFilter): > def __init__(self): > self.compute_api = compute.API() > >- def _affinity_host(self, context, instance_id): >- return self.compute_api.get(context, instance_id)['host'] >+ def _all_hosts(self, context): >+ all_hosts = {} >+ for instance in self.compute_api.get_all(context): >+ all_hosts[instance['uuid']] = instance['host'] >+ return all_hosts > > > class DifferentHostFilter(AffinityFilter): >@@ -38,11 +41,11 @@ class DifferentHostFilter(AffinityFilter): > scheduler_hints = filter_properties['scheduler_hints'] > me = host_state.host > >+ all_hosts = self._all_hosts(context) > affinity_uuids = scheduler_hints.get('different_host', []) > if affinity_uuids: >- return not any([i for i >- in affinity_uuids >- if self._affinity_host(context, i) == me]) >+ return not any([i for i in affinity_uuids >+ if all_hosts.get(i) == me]) > # With no different_host key > return True > >@@ -57,11 +60,11 @@ class SameHostFilter(AffinityFilter): > scheduler_hints = filter_properties['scheduler_hints'] > me = host_state.host > >+ all_hosts = self._all_hosts(context) > affinity_uuids = scheduler_hints.get('same_host', []) > if affinity_uuids: >- return any([i for i >- in affinity_uuids >- if self._affinity_host(context, i) == me]) >+ return any([i for i in affinity_uuids >+ if all_hosts.get(i) == me]) > # With no same_host key > return True >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 836658
: 596162 |
596163