)]}'
{"nova/compute/resource_tracker.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"36b108d7a19ad67250a3783bba5b4c6d31a095c6","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        values \u003d {\u0027host\u0027: self.host, \u0027node\u0027: self.nodename,"},{"line_number":223,"context_line":"                  \u0027launched_on\u0027: self.host,"},{"line_number":224,"context_line":"                  \u0027numa_topology\u0027: claimed_numa_topology}"},{"line_number":225,"context_line":"        self.conductor_api.instance_update(context, instance_ref[\u0027uuid\u0027],"},{"line_number":226,"context_line":"                                           **values)"},{"line_number":227,"context_line":"        instance_ref[\u0027host\u0027] \u003d self.host"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_4a477c4b","line":224,"updated":"2015-05-13 17:39:59.000000000","message":"The DB instance doesn\u0027t have a numa_topology, so this is not right. You can\u0027t pass a non-object here because you\u0027ll regress the DB, and you can\u0027t pass an object here because it will be deserialized on the other end, which won\u0027t properly serialize it for the database, even if it did know where to put it.","commit_id":"3bb1bf3d5aae75dafe2a1daf51f85713277aa944"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"e6e4009bf055abc1b2e2ce0cf0d4901d78a7c05c","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        # persist changes to the compute node:"},{"line_number":142,"context_line":"        self._update(elevated)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        # Save instance_ref][\u0027numa_topology\u0027] to DB while under"},{"line_number":145,"context_line":"        # COMPUTE_RESOURCE_SEMAPHORE so that the resource audit knows about"},{"line_number":146,"context_line":"        # any cpus we\u0027ve pinned.  Otherwise it we can end up with two"},{"line_number":147,"context_line":"        # instances pinning the same cpus."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_54c95b77","line":144,"updated":"2015-05-13 20:28:46.000000000","message":"typo, I know.  will fix","commit_id":"f510044003432e8f7a3ef7004767a680c2ef2152"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"bb4b5481fc0846f3c3d8b5ef4a01b05f6b98ce8f","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        numa_topology \u003d objects.InstanceNUMATopology.get_by_instance_uuid("},{"line_number":149,"context_line":"            context, instance_ref[\u0027uuid\u0027])"},{"line_number":150,"context_line":"        numa_topology.cells \u003d instance_ref[\u0027numa_topology\u0027].cells"},{"line_number":151,"context_line":"        # This is actually equivalent to tmp_numa_topo.save()"},{"line_number":152,"context_line":"        numa_topology.create()"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        LOG.debug(\u0027instance_claim: post claim. \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_3472674a","line":151,"updated":"2015-05-13 20:31:01.000000000","message":"another typo","commit_id":"f510044003432e8f7a3ef7004767a680c2ef2152"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b8258aee3ff14eaf250fda5b825873358b270c13","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            context, instance_ref[\u0027uuid\u0027])"},{"line_number":150,"context_line":"        numa_topology.cells \u003d instance_ref[\u0027numa_topology\u0027].cells"},{"line_number":151,"context_line":"        # This is actually equivalent to tmp_numa_topo.save()"},{"line_number":152,"context_line":"        numa_topology.create()"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        LOG.debug(\u0027instance_claim: post claim. \u0027"},{"line_number":155,"context_line":"                  \u0027vcpus\u003d%(vcpus)d, numa_topology\u003d\\n%(numa_topology)s\u0027 %"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_9427d311","line":152,"updated":"2015-05-13 20:37:54.000000000","message":"This is pretty broken because it doesn\u0027t actually do a create(). If you\u0027re going to do this, I think you should just do the full instance with only that attribute:\n\n inst \u003d objects.Instance(context\u003dcontext, uuid\u003dinstance_ref[\u0027uuid\u0027])\n inst.numa_topology.cells \u003d instance_ref[\u0027numa_topology\u0027].cells\n inst.save()\n\nThe middle line will lazy-load the object, equivalent to your query.\n\nAre you sure that instance_ref[\u0027numa_topology\u0027] is an object here? If so, then you can just do:\n\n inst.numa_topology \u003d instance_ref[\u0027numa_topology\u0027]\n\nand then the save to avoid the extra query, right?\n\nIf you\u0027re going to do this, please put a big fat FIXME above this explaining why you\u0027re doing this and why it should DIAF ASAP.","commit_id":"f510044003432e8f7a3ef7004767a680c2ef2152"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"e75869852dabea018b45b72a9985ec0be8789ae0","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            context, instance_ref[\u0027uuid\u0027])"},{"line_number":150,"context_line":"        numa_topology.cells \u003d instance_ref[\u0027numa_topology\u0027].cells"},{"line_number":151,"context_line":"        # This is actually equivalent to tmp_numa_topo.save()"},{"line_number":152,"context_line":"        numa_topology.create()"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        LOG.debug(\u0027instance_claim: post claim. \u0027"},{"line_number":155,"context_line":"                  \u0027vcpus\u003d%(vcpus)d, numa_topology\u003d\\n%(numa_topology)s\u0027 %"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_2fed72ef","line":152,"in_reply_to":"9a0c5dc1_9427d311","updated":"2015-05-13 21:00:42.000000000","message":"Ooh, very clever. I like it.  And yes, instance_ref[\u0027numa_topology\u0027] is an object.  Will go with your second option.  I confirmed it updates the DB as expected.","commit_id":"f510044003432e8f7a3ef7004767a680c2ef2152"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"df7216b4bac42902a7608857bf1a596f22fb9aa5","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # COMPUTE_RESOURCE_SEMAPHORE so that the resource audit knows about"},{"line_number":146,"context_line":"        # any cpus we\u0027ve pinned.  Otherwise we can end up with two"},{"line_number":147,"context_line":"        # instances pinning the same cpus."},{"line_number":148,"context_line":"        # TODO(cfriesen) we should analyze whether we can just call"},{"line_number":149,"context_line":"        # instance_ref.save() here."},{"line_number":150,"context_line":"        inst \u003d objects.Instance(context\u003dcontext, uuid\u003dinstance_ref[\u0027uuid\u0027])"},{"line_number":151,"context_line":"        inst.numa_topology \u003d instance_ref[\u0027numa_topology\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_0ba181a3","line":148,"updated":"2015-05-13 21:32:38.000000000","message":"We can\u0027t, so I\u0027d rather you not say this. Say that this is temporary until RT uses instance objects throughout.","commit_id":"5c620af741a89f5adb100983ca8e31a38a40bbb2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"df7216b4bac42902a7608857bf1a596f22fb9aa5","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        # TODO(cfriesen) we should analyze whether we can just call"},{"line_number":149,"context_line":"        # instance_ref.save() here."},{"line_number":150,"context_line":"        inst \u003d objects.Instance(context\u003dcontext, uuid\u003dinstance_ref[\u0027uuid\u0027])"},{"line_number":151,"context_line":"        inst.numa_topology \u003d instance_ref[\u0027numa_topology\u0027]"},{"line_number":152,"context_line":"        inst.save()"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        LOG.debug(\u0027instance_claim: post claim. \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_cb892928","line":151,"updated":"2015-05-13 21:32:38.000000000","message":"Need to reset the uuid field so it doesn\u0027t get saved.","commit_id":"5c620af741a89f5adb100983ca8e31a38a40bbb2"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"689d48e2900370f6801558ba4348b072caeea8eb","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        instance.host \u003d self.host"},{"line_number":222,"context_line":"        instance.launched_on \u003d self.host"},{"line_number":223,"context_line":"        instance.node \u003d self.nodename"},{"line_number":224,"context_line":"        instance.save()"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":227,"context_line":"    def abort_instance_claim(self, context, instance):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_0652fadd","line":224,"updated":"2015-05-13 23:07:24.000000000","message":"for what it\u0027s worth, I checked instance.obj_get_changes() right before the save() call and in addition to host/launched_on/node/numa_topology it\u0027s also saving the flavor, which seems like it should be safe.","commit_id":"fdf521924bcb900f71e6627c7f7391ae4104fbf7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"92e3be839156d83c807e7cc63f01ab938eb0947b","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        instance.host \u003d self.host"},{"line_number":222,"context_line":"        instance.launched_on \u003d self.host"},{"line_number":223,"context_line":"        instance.node \u003d self.nodename"},{"line_number":224,"context_line":"        instance.save()"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":227,"context_line":"    def abort_instance_claim(self, context, instance):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_66208e4a","line":224,"in_reply_to":"7a016987_0652fadd","updated":"2015-05-13 23:10:26.000000000","message":"Hmm, I\u0027m not sure why it would be dirty at that point, which might mean we could optimize further up the stack somewhere. But yeah, agree that it\u0027s fine.","commit_id":"fdf521924bcb900f71e6627c7f7391ae4104fbf7"}],"nova/conductor/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"36b108d7a19ad67250a3783bba5b4c6d31a095c6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                   \u0027instance_type_id\u0027, \u0027root_device_name\u0027, \u0027launched_on\u0027,"},{"line_number":59,"context_line":"                   \u0027progress\u0027, \u0027vm_mode\u0027, \u0027default_ephemeral_device\u0027,"},{"line_number":60,"context_line":"                   \u0027default_swap_device\u0027, \u0027root_device_name\u0027,"},{"line_number":61,"context_line":"                   \u0027system_metadata\u0027, \u0027updated_at\u0027, \u0027numa_topology\u0027"},{"line_number":62,"context_line":"                   ]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"# Fields that we want to convert back into a datetime object."}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_8a6454e5","line":61,"range":{"start_line":61,"start_character":51,"end_line":61,"end_character":67},"updated":"2015-05-13 17:39:59.000000000","message":"This is not an instance property and can\u0027t be handled properly by this interface anyway.","commit_id":"3bb1bf3d5aae75dafe2a1daf51f85713277aa944"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"29dc00e169dc8ad26143070d5e2659b8aa531f3a","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        self._numa_topologies[instance_uuid] \u003d extra"},{"line_number":385,"context_line":"        return instance"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def _fake_instance_obj(self, stash\u003dTrue, flavor\u003dNone, **kwargs):"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"        # Default to an instance ready to resize to or from the same"},{"line_number":390,"context_line":"        # instance_type"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_984f3092","line":387,"updated":"2015-05-15 09:38:33.000000000","message":"This feels wrong to me but I do think that this will result in a more easily managable backport.\n\nWe should really convert all these to use only objects ASAP.","commit_id":"2427d288bc017a5b91430ffe16419d47703d2060"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0b977e2d05f714a70e3f4602aa02e4a6576bc39c","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        self._numa_topologies[instance_uuid] \u003d extra"},{"line_number":385,"context_line":"        return instance"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def _fake_instance_obj(self, stash\u003dTrue, flavor\u003dNone, **kwargs):"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"        # Default to an instance ready to resize to or from the same"},{"line_number":390,"context_line":"        # instance_type"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_71423440","line":387,"in_reply_to":"7a016987_984f3092","updated":"2015-05-15 23:04:14.000000000","message":"Yep, I opted for it for that reason. Agree that it\u0027s scary that we\u0027re this out of date in this file.","commit_id":"2427d288bc017a5b91430ffe16419d47703d2060"}]}
