)]}'
{"nova/scheduler/chance.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"4155b0811939f8669dd2856ee0077066595bc9f4","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    def schedule(self, context, topic, method, *_args, **kwargs):"},{"line_number":61,"context_line":"        \"\"\"Picks a host that is up at random.\"\"\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        host \u003d self._schedule(context, topic, None, **kwargs)"},{"line_number":64,"context_line":"        driver.cast_to_host(context, topic, host, method, **kwargs)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def schedule_run_instance(self, context, request_spec, *_args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAACn%2F%2F9XE%3D","line":63,"updated":"2011-11-18 17:51:06.000000000","message":"I think you could change \u0027None\u0027 to: kwargs.pop(\u0027request_spec\u0027, None)  here and ditch the schedule_prep_resize below...  but I won\u0027t push for this change. :)","commit_id":"72fa94f72b361a6c097eaf071fe7f26b2ba4e924"}],"nova/scheduler/distributed_scheduler.py":[{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"cd5dcc092aed7f8159f61fee266b138efd361acc","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        unfiltered_hosts \u003d unfiltered_hosts_dict.items()"},{"line_number":316,"context_line":"        if excluded_host is not None:"},{"line_number":317,"context_line":"            unfiltered_hosts \u003d [(h, hi) for (h, hi) in unfiltered_hosts"},{"line_number":318,"context_line":"                                if h !\u003d excluded_host]"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        num_instances \u003d request_spec.get(\u0027num_instances\u0027, 1)"},{"line_number":321,"context_line":"        selected_hosts \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACn%2F%2F%2Bg8%3D","line":318,"updated":"2011-11-14 23:01:16.000000000","message":"Could this just be another filter rule applied in _filter_hosts.\n\nPart of me thinks that maybe instead of passing in excluded_hosts we should instead pass in \u0027is_migration\u0027.\n\nExcluding hosts is really a business rule (among possibly others).\n\nInstead, we pass in whether the scheduling pertains to a migration[1], and if so, we implement a default rule (which can be overridden by other providers) that excludes the current host.\n\n___\n\n[1] As an implementation detail, we may need to pass in the original_host as an argument; unlike excluded_hosts, though, this information is opaque: we can use it or not use it depending on vendor specific scheduling rules.","commit_id":"fad419e4fa1dc6a637707c18e95193d9e579dd6d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"c7646eda7c6811e8068cf199d39f929356735e2d","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        unfiltered_hosts \u003d unfiltered_hosts_dict.items()"},{"line_number":316,"context_line":"        if excluded_host is not None:"},{"line_number":317,"context_line":"            unfiltered_hosts \u003d [(h, hi) for (h, hi) in unfiltered_hosts"},{"line_number":318,"context_line":"                                if h !\u003d excluded_host]"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        num_instances \u003d request_spec.get(\u0027num_instances\u0027, 1)"},{"line_number":321,"context_line":"        selected_hosts \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACn%2F%2F%2BaQ%3D","line":318,"in_reply_to":"AAAACn%2F%2F%2Bdo%3D","updated":"2011-11-15 15:48:33.000000000","message":"Ah, but this is so interesting!  Still, we probably should discuss among others :)","commit_id":"fad419e4fa1dc6a637707c18e95193d9e579dd6d"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"0ef165967d58a9ee5ce513633a392999555408b7","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        unfiltered_hosts \u003d unfiltered_hosts_dict.items()"},{"line_number":316,"context_line":"        if excluded_host is not None:"},{"line_number":317,"context_line":"            unfiltered_hosts \u003d [(h, hi) for (h, hi) in unfiltered_hosts"},{"line_number":318,"context_line":"                                if h !\u003d excluded_host]"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        num_instances \u003d request_spec.get(\u0027num_instances\u0027, 1)"},{"line_number":321,"context_line":"        selected_hosts \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACn%2F%2F%2BgI%3D","line":318,"in_reply_to":"AAAACn%2F%2F%2Bg8%3D","updated":"2011-11-14 23:56:12.000000000","message":"I\u0027m not sure I get how excluding a host is any more or less a business rule than \"is_migration.\" In fact, I kind of like the proposal that we can filter out inappropriate hosts. This serves to minimize the scheduler being aware of specific cases, especially given that it appears the called method is really expected to set up a request_spec and just proxy it on to the base scheduler method.\n\nRegarding the rest, I originally had added code to one of the schedulers before that included a new filter type allowing one to explicitly exclude a list of hosts. The rationale was that the scheduler doesn\u0027t necessarily know why, but that it must obey. \n\nIt looks like, in the interim, the scheduler has taken a huge step backwards in flexibility. The way I would implement this, given sufficient time, would be to be able to pare down the list of hosts in an explicit scheduler instance (like schedule_prep_resize) and then let the parent logic take over ala WSGI.","commit_id":"fad419e4fa1dc6a637707c18e95193d9e579dd6d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"5bc782bc466acfa40fd936f19dd9d37181621b45","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        unfiltered_hosts \u003d unfiltered_hosts_dict.items()"},{"line_number":316,"context_line":"        if excluded_host is not None:"},{"line_number":317,"context_line":"            unfiltered_hosts \u003d [(h, hi) for (h, hi) in unfiltered_hosts"},{"line_number":318,"context_line":"                                if h !\u003d excluded_host]"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        num_instances \u003d request_spec.get(\u0027num_instances\u0027, 1)"},{"line_number":321,"context_line":"        selected_hosts \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACn%2F%2F%2Bgw%3D","line":318,"in_reply_to":"AAAACn%2F%2F%2Bg8%3D","updated":"2011-11-14 23:11:24.000000000","message":"Nope, it can\u0027t be another filter rule.  The problem is that this isn\u0027t business logic, this is an implementation restriction—a resized instance MUST be moved to a different host.  Therefore, this rule must be implemented by all the schedulers, and so just saying that it goes into _filter_hosts is insufficient.\n\nAs for the \u0027is_migration\u0027 suggestion—I don\u0027t see the point of including it, because, as I point out, resize implies migration, and so \u0027is_migration\u0027 would always be True.","commit_id":"fad419e4fa1dc6a637707c18e95193d9e579dd6d"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"2503358464d454f546131e33e624b56bc1c911b6","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        unfiltered_hosts \u003d unfiltered_hosts_dict.items()"},{"line_number":316,"context_line":"        if excluded_host is not None:"},{"line_number":317,"context_line":"            unfiltered_hosts \u003d [(h, hi) for (h, hi) in unfiltered_hosts"},{"line_number":318,"context_line":"                                if h !\u003d excluded_host]"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        num_instances \u003d request_spec.get(\u0027num_instances\u0027, 1)"},{"line_number":321,"context_line":"        selected_hosts \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACn%2F%2F%2Bdo%3D","line":318,"in_reply_to":"AAAACn%2F%2F%2BgI%3D","updated":"2011-11-15 03:18:51.000000000","message":"\u003e I\u0027m not sure I get how excluding a host is any more or less a business rule than \"is_migration.\"\n\n`is_migration` or `is_resize` is a fact, \u0027excluding a host\u0027 is one among many actions that we take given this fact.\n\nSince we already have a mechanism for filtering host given a set of facts (the filter rules), I\u0027d prefer that we just encoded the exclusion of hosts given is_migration or is_resize as a rule.\n\nThese concerns are really philosophical and certainly something we can discuss in a broader discussion of scheduler/rule responsibilities (and not necessarily something that has to be hashed out here :-)","commit_id":"fad419e4fa1dc6a637707c18e95193d9e579dd6d"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"0ef165967d58a9ee5ce513633a392999555408b7","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        unfiltered_hosts \u003d unfiltered_hosts_dict.items()"},{"line_number":316,"context_line":"        if excluded_host is not None:"},{"line_number":317,"context_line":"            unfiltered_hosts \u003d [(h, hi) for (h, hi) in unfiltered_hosts"},{"line_number":318,"context_line":"                                if h !\u003d excluded_host]"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        num_instances \u003d request_spec.get(\u0027num_instances\u0027, 1)"},{"line_number":321,"context_line":"        selected_hosts \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACn%2F%2F%2Bf8%3D","line":318,"in_reply_to":"AAAACn%2F%2F%2BgY%3D","updated":"2011-11-14 23:56:12.000000000","message":"I actually suspect that, looking at the request_spec, we may want to do something in there with the filter attribute in the dictionary. That seems like the kind of place to specify a mechanism for removing undesirable destination boxes.","commit_id":"fad419e4fa1dc6a637707c18e95193d9e579dd6d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"189340b6d69bfca0e169630ea9a35d5a7e45884b","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        unfiltered_hosts \u003d unfiltered_hosts_dict.items()"},{"line_number":316,"context_line":"        if excluded_host is not None:"},{"line_number":317,"context_line":"            unfiltered_hosts \u003d [(h, hi) for (h, hi) in unfiltered_hosts"},{"line_number":318,"context_line":"                                if h !\u003d excluded_host]"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        num_instances \u003d request_spec.get(\u0027num_instances\u0027, 1)"},{"line_number":321,"context_line":"        selected_hosts \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACn%2F%2F%2BgY%3D","line":318,"in_reply_to":"AAAACn%2F%2F%2Bgk%3D","updated":"2011-11-14 23:42:29.000000000","message":"If you look at the implementation of the prep_resize() method in compute/manager.py, you\u0027ll see that the first check is to ensure that resizes don\u0027t land on the same host.  The logic, as I understand it, is that determining whether the resized instance will fit on the current host is such a difficult problem that we don\u0027t bother doing so; we simply throw it on a different host and save ourselves the trouble.\n\n(Actually, Dietz was surprised to find out that none of this logic existed; he specifically remembers adding code to ensure that the current host is not assigned for the target of the resize, at least in the distributed scheduler.)","commit_id":"fad419e4fa1dc6a637707c18e95193d9e579dd6d"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"38d6f986275e6a0b50778e2fea43b97980d10296","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        unfiltered_hosts \u003d unfiltered_hosts_dict.items()"},{"line_number":316,"context_line":"        if excluded_host is not None:"},{"line_number":317,"context_line":"            unfiltered_hosts \u003d [(h, hi) for (h, hi) in unfiltered_hosts"},{"line_number":318,"context_line":"                                if h !\u003d excluded_host]"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        num_instances \u003d request_spec.get(\u0027num_instances\u0027, 1)"},{"line_number":321,"context_line":"        selected_hosts \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACn%2F%2F%2Bgk%3D","line":318,"in_reply_to":"AAAACn%2F%2F%2Bgw%3D","updated":"2011-11-14 23:34:08.000000000","message":"A *migration* must always reside on a new host; but, I don\u0027t see why a resize /necessarily/ needs to be on a new host. In fact, there could be lots of advantages (think COW snapshotting) for keeping a resize on the same host (size permitting, of course).\n\nAs to the is_migration flag, details aside, what I mean is that we should be passing in *intent* to the scheduler and letting the scheduler and rules sort out the rules to apply.","commit_id":"fad419e4fa1dc6a637707c18e95193d9e579dd6d"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"0ef165967d58a9ee5ce513633a392999555408b7","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        unfiltered_hosts \u003d unfiltered_hosts_dict.items()"},{"line_number":316,"context_line":"        if excluded_host is not None:"},{"line_number":317,"context_line":"            unfiltered_hosts \u003d [(h, hi) for (h, hi) in unfiltered_hosts"},{"line_number":318,"context_line":"                                if h !\u003d excluded_host]"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        num_instances \u003d request_spec.get(\u0027num_instances\u0027, 1)"},{"line_number":321,"context_line":"        selected_hosts \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACn%2F%2F%2BgA%3D","line":318,"in_reply_to":"AAAACn%2F%2F%2Bgw%3D","updated":"2011-11-14 23:56:12.000000000","message":"He means as an argument to the _schedule method. Other things besides schedule_prep_resize would call this with the argument set to/defaulting to False.","commit_id":"fad419e4fa1dc6a637707c18e95193d9e579dd6d"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"dd502ee2638c2aafff939dc486b079bc4726f2e2","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        instance_type \u003d db.instance_type_get(elevated, instance_type_id)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        # Now let\u0027s grab off some possibilities"},{"line_number":145,"context_line":"        hosts \u003d self._schedule(elevated, \u0027compute\u0027, request_spec,"},{"line_number":146,"context_line":"                               *args, **kwargs)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        # Forward off to the host"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAACn%2F%2F95g%3D","line":145,"updated":"2011-11-16 19:09:01.000000000","message":"Perhaps should be a test for no hosts so it can throw a NoValidHosts exception vs. an IndexError?","commit_id":"f570005ef12c0406532ddc0c273c1450e0723f4e"}]}
