)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"927c355eaacc4c4ed9e8f2e03ef8964b6fe592a2","unresolved":false,"context_lines":[{"line_number":3732,"context_line":"                # FIXME(danms): Pass instance as a dict until"},{"line_number":3733,"context_line":"                # compute_confirm_resize is object-ready"},{"line_number":3734,"context_line":"                self.conductor_api.compute_confirm_resize("},{"line_number":3735,"context_line":"                    context, dict(instance.items()), migration_ref\u003dmigration)"},{"line_number":3736,"context_line":"            except Exception as e:"},{"line_number":3737,"context_line":"                LOG.error(_(\"Error auto-confirming resize: %s. \""},{"line_number":3738,"context_line":"                            \"Will retry later.\") % e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F3CA%3D","line":3735,"updated":"2013-06-19 16:23:43.000000000","message":"Any reason not to do this on the conductor manager side in a generic way for all methods which need to continue supporting dict style instances for backwards compat?\n\nJust not loving the idea of a lot of these dict conversions being littered about\n\nHave you done similar elsewhere already?","commit_id":"758705ad9f520cba0b1eda141c5dd682f5ef1eda"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"01f34e920561094f42af6659b31abdb013108c33","unresolved":false,"context_lines":[{"line_number":3732,"context_line":"                # FIXME(danms): Pass instance as a dict until"},{"line_number":3733,"context_line":"                # compute_confirm_resize is object-ready"},{"line_number":3734,"context_line":"                self.conductor_api.compute_confirm_resize("},{"line_number":3735,"context_line":"                    context, dict(instance.items()), migration_ref\u003dmigration)"},{"line_number":3736,"context_line":"            except Exception as e:"},{"line_number":3737,"context_line":"                LOG.error(_(\"Error auto-confirming resize: %s. \""},{"line_number":3738,"context_line":"                            \"Will retry later.\") % e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F11M%3D","line":3735,"in_reply_to":"AAAAPn%2F%2F1%2Fs%3D","updated":"2013-06-20 00:12:01.000000000","message":"It\u0027s not conductor\u0027s confirm_resize(), it\u0027s conductor\u0027s compute_confirm_resize(). This method in conductor simply provides indirection for compute manager to call into compute_api from conductor\u0027s service instead of its own. Since compute/manager cannot hit the database (yet compute_api.confirm_resize() does), it is just asking conductor to run that method for us as itself (conductor _can_ hit the database).\n\nOnce objects are in place, we can call directly into compute_api.confirm_resize() from compute/manager, because we\u0027ll pass it an object which it will take action on (just updating a few fields) and that action will, if we\u0027re calling from compute/manager, happen over RPC instead of directly to the database.\n\nThis sort of thing is exactly why the magic rpc-or-direct behavior of objects is so desirable for us. Things in compute_api that want to talk to the database should do so when that is allowed, and should go over RPC when it is not. Having the caller be required to know it can\u0027t call a particular method because that method will hit the database just sucks...","commit_id":"758705ad9f520cba0b1eda141c5dd682f5ef1eda"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"7f0845b085197994586b773928ec4b7de5850cfe","unresolved":false,"context_lines":[{"line_number":3732,"context_line":"                # FIXME(danms): Pass instance as a dict until"},{"line_number":3733,"context_line":"                # compute_confirm_resize is object-ready"},{"line_number":3734,"context_line":"                self.conductor_api.compute_confirm_resize("},{"line_number":3735,"context_line":"                    context, dict(instance.items()), migration_ref\u003dmigration)"},{"line_number":3736,"context_line":"            except Exception as e:"},{"line_number":3737,"context_line":"                LOG.error(_(\"Error auto-confirming resize: %s. \""},{"line_number":3738,"context_line":"                            \"Will retry later.\") % e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F1%2Fs%3D","line":3735,"in_reply_to":"AAAAPn%2F%2F2%2Fs%3D","updated":"2013-06-19 22:32:29.000000000","message":"Hmm, I\u0027m trying hard to understand why conductor\u0027s confirm_resize() goes away ...\n\nTake the part where it sets the migration status in the DB to \u0027confirming\u0027 - by object-aware, do you mean we\u0027d have a migration object in compute manager and by setting its status field, we\u0027d automatically propagate that update via conductor?\n\nI\u0027m also struggling to understand how isolated this example is - is it a one-off thing or are we going to see lots of this \"convert object to dict\" stuff about?\n\nMaybe I\u0027d be just as happy if we did the convert-to-dict thing on the client side of the call to conductor","commit_id":"758705ad9f520cba0b1eda141c5dd682f5ef1eda"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"632cfb128d468f52d56c4671474775be044a25c5","unresolved":false,"context_lines":[{"line_number":3732,"context_line":"                # FIXME(danms): Pass instance as a dict until"},{"line_number":3733,"context_line":"                # compute_confirm_resize is object-ready"},{"line_number":3734,"context_line":"                self.conductor_api.compute_confirm_resize("},{"line_number":3735,"context_line":"                    context, dict(instance.items()), migration_ref\u003dmigration)"},{"line_number":3736,"context_line":"            except Exception as e:"},{"line_number":3737,"context_line":"                LOG.error(_(\"Error auto-confirming resize: %s. \""},{"line_number":3738,"context_line":"                            \"Will retry later.\") % e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F2%2Fs%3D","line":3735,"in_reply_to":"AAAAPn%2F%2F3BU%3D","updated":"2013-06-19 16:36:25.000000000","message":"So, after thinking about this a bit, there\u0027s another thing to consider.\n\nRight now, we call the compute_api through conductor because compute isn\u0027t allowed to hit the database. However, once compute_api is object-aware, this won\u0027t matter since the things we\u0027re passing to it can be acted upon in a service-aware way. So, conductor\u0027s compute_confirm_resize() will go away anyway, and this will change to a direct compute_api call, as it once was.\n\nNow, this method only has a single caller, which makes it easy to convert in this case without affecting others, but it\u0027s probably just worth noting.","commit_id":"758705ad9f520cba0b1eda141c5dd682f5ef1eda"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8e6a0f3a11fd7f703140ee5245ba6474a07ddec6","unresolved":false,"context_lines":[{"line_number":3732,"context_line":"                # FIXME(danms): Pass instance as a dict until"},{"line_number":3733,"context_line":"                # compute_confirm_resize is object-ready"},{"line_number":3734,"context_line":"                self.conductor_api.compute_confirm_resize("},{"line_number":3735,"context_line":"                    context, dict(instance.items()), migration_ref\u003dmigration)"},{"line_number":3736,"context_line":"            except Exception as e:"},{"line_number":3737,"context_line":"                LOG.error(_(\"Error auto-confirming resize: %s. \""},{"line_number":3738,"context_line":"                            \"Will retry later.\") % e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F3BU%3D","line":3735,"in_reply_to":"AAAAPn%2F%2F3CA%3D","updated":"2013-06-19 16:28:23.000000000","message":"Only because I chose to start on converting these periodic tasks as real tests of the functionality without getting too broad too quickly. However, I can definitely make a change to the conductor manager underneath this to avoid the hack, sure.\n\nIn order to keep the changes incremental, there\u0027s going to have to be some of this temporary-ness I think over the process. However, this is probably a bad example of this as it should be easy to make conductor graceful about this first :)","commit_id":"758705ad9f520cba0b1eda141c5dd682f5ef1eda"}],"nova/conductor/manager.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"559cfd1d567a7f0d9e338a5ce21a1419fc65bb53","unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def compute_confirm_resize(self, context, instance, migration_ref):"},{"line_number":483,"context_line":"        if isinstance(instance, nova_object.NovaObject):"},{"line_number":484,"context_line":"            # NOTE(danms): Remove this at RPC API v2.0"},{"line_number":485,"context_line":"            instance \u003d dict(instance.items())"},{"line_number":486,"context_line":"        self.compute_api.confirm_resize(context, instance, migration_ref)"},{"line_number":487,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2F1%2B0%3D","line":484,"updated":"2013-06-19 22:35:04.000000000","message":"Well, it\u0027s more remove the check in 2.0 rather than the conversion .. i.e. you\u0027ll be removing support for dicts\n\nbut, yeah ...","commit_id":"1a13869a55f3fd94fc042839b98129cad679a38d"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"144e8a4d4365f5232024260b5c56cbec32191bb8","unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def compute_confirm_resize(self, context, instance, migration_ref):"},{"line_number":483,"context_line":"        if isinstance(instance, nova_object.NovaObject):"},{"line_number":484,"context_line":"            # NOTE(danms): Remove this at RPC API v2.0"},{"line_number":485,"context_line":"            instance \u003d dict(instance.items())"},{"line_number":486,"context_line":"        self.compute_api.confirm_resize(context, instance, migration_ref)"},{"line_number":487,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fz44%3D","line":484,"in_reply_to":"AAAAPn%2F%2F1%2B0%3D","updated":"2013-06-20 17:03:52.000000000","message":"This check will change slightly when compute_api.confirm_resize supports object.","commit_id":"1a13869a55f3fd94fc042839b98129cad679a38d"}]}
