)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"97fd48f015d139fdd8370976309e281e76374dc4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a nova-compute service dies that is one of several ironic based"},{"line_number":10,"context_line":"nova-compute services running, a node rebalance occurs to ensure there"},{"line_number":11,"context_line":"is still an active nova-compute services dealing with requests for the"},{"line_number":12,"context_line":"given instance that is running."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Today, when this occurs, we create a new ComputeNode entry. This change"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7f515b1d_cc55d5fb","line":11,"range":{"start_line":11,"start_character":32,"end_line":11,"end_character":40},"updated":"2017-09-29 16:40:14.000000000","message":"service","commit_id":"ee0a5310c7fbfde58947a9d820c8fcad3147f8f9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8e47dc1d4390347c4885fb9cb7b324be26cccd1a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"is still an active nova-compute services dealing with requests for the"},{"line_number":12,"context_line":"given instance that is running."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Today, when this occurs, we create a new ComputeNode entry. This change"},{"line_number":15,"context_line":"alters that logic to detect the case of the ironic node rebalance and in"},{"line_number":16,"context_line":"that case we re-use the existing ComputeNode entry, simply updating the"},{"line_number":17,"context_line":"host field to match the new host it has been rebalanced onto."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7f515b1d_62b36fea","line":14,"range":{"start_line":14,"start_character":25,"end_line":14,"end_character":59},"updated":"2017-10-02 14:20:38.000000000","message":"I have no idea why we currently do this. Even *without* placement, it makes little sense to do this...","commit_id":"ee0a5310c7fbfde58947a9d820c8fcad3147f8f9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"97fd48f015d139fdd8370976309e281e76374dc4","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Previously we hit problems with placement when we get a new"},{"line_number":20,"context_line":"ComputeNode.uuid for the same ironic_node.uuid. This reusing of the"},{"line_number":21,"context_line":"exiting entry keeps the ComputeNode.uuid the same when the rebalance of"},{"line_number":22,"context_line":"the ComputeNode occurs."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Without keeping the same ComputeNode.uuid placement error out with a 409"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7f515b1d_6c3ee1b8","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":7},"updated":"2017-09-29 16:40:14.000000000","message":"existing","commit_id":"ee0a5310c7fbfde58947a9d820c8fcad3147f8f9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"97fd48f015d139fdd8370976309e281e76374dc4","unresolved":false,"context_lines":[{"line_number":21,"context_line":"exiting entry keeps the ComputeNode.uuid the same when the rebalance of"},{"line_number":22,"context_line":"the ComputeNode occurs."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Without keeping the same ComputeNode.uuid placement error out with a 409"},{"line_number":25,"context_line":"because we attempt to create a ResourceProvider that has the same name"},{"line_number":26,"context_line":"as an existing ResourceProvdier. Had that worked, we would have noticed"},{"line_number":27,"context_line":"the race that occurs after we create the ResourceProvider but before we"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7f515b1d_2c446946","line":24,"range":{"start_line":24,"start_character":52,"end_line":24,"end_character":57},"updated":"2017-09-29 16:40:14.000000000","message":"errors","commit_id":"ee0a5310c7fbfde58947a9d820c8fcad3147f8f9"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"97fd48f015d139fdd8370976309e281e76374dc4","unresolved":false,"context_lines":[{"line_number":557,"context_line":"            self._update(context, cn)"},{"line_number":558,"context_line":"            return"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"        # Its possible ironic just did a node re-balance, so lets"},{"line_number":561,"context_line":"        # check if there is a compute node that already has the correct"},{"line_number":562,"context_line":"        # hypervisor_hostname. We can re-use that rather than create a"},{"line_number":563,"context_line":"        # new one and have to move existing placement allocations"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_cc6ef5c7","line":560,"range":{"start_line":560,"start_character":61,"end_line":560,"end_character":65},"updated":"2017-09-29 16:40:14.000000000","message":"let\u0027s","commit_id":"ee0a5310c7fbfde58947a9d820c8fcad3147f8f9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8e47dc1d4390347c4885fb9cb7b324be26cccd1a","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        # hypervisor_hostname. We can re-use that rather than create a"},{"line_number":563,"context_line":"        # new one and have to move existing placement allocations"},{"line_number":564,"context_line":"        try:"},{"line_number":565,"context_line":"            cn_candidates \u003d objects.ComputeNodeList.get_all_by_nodename("},{"line_number":566,"context_line":"                context, nodename)"},{"line_number":567,"context_line":"        except exception.NotFound:"},{"line_number":568,"context_line":"            cn_candidates \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_a2f5e758","line":565,"range":{"start_line":565,"start_character":13,"end_line":565,"end_character":72},"updated":"2017-10-02 14:20:38.000000000","message":"Note to reviewers: the difference between here and the _get_compute_node() call above on line 552 is that we pass the RT\u0027s host attribute in the _get_compute_node() method.","commit_id":"ee0a5310c7fbfde58947a9d820c8fcad3147f8f9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8e47dc1d4390347c4885fb9cb7b324be26cccd1a","unresolved":false,"context_lines":[{"line_number":575,"context_line":"            self.compute_nodes[nodename] \u003d cn"},{"line_number":576,"context_line":"            self._copy_resources(cn, resources)"},{"line_number":577,"context_line":"            self._setup_pci_tracker(context, cn, resources)"},{"line_number":578,"context_line":"            self._update(context, cn)"},{"line_number":579,"context_line":"            return"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        if len(cn_candidates) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_62d24fd3","line":578,"range":{"start_line":578,"start_character":12,"end_line":578,"end_character":37},"updated":"2017-10-02 14:20:38.000000000","message":"Note to reviewers: this block saves the new host attribute of the compute node to the DB.","commit_id":"ee0a5310c7fbfde58947a9d820c8fcad3147f8f9"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"9a2e32a9b5425ec5d8aa6183960f281dcce6065b","unresolved":false,"context_lines":[{"line_number":568,"context_line":"            cn \u003d cn_candidates[0]"},{"line_number":569,"context_line":"            LOG.info(\"ComputeNode %(name)s moving from %(old)s to %(new)s\","},{"line_number":570,"context_line":"                     {\"name\": nodename, \"old\": cn.host, \"new\": self.host})"},{"line_number":571,"context_line":"            cn.host \u003d self.host"},{"line_number":572,"context_line":"            self.compute_nodes[nodename] \u003d cn"},{"line_number":573,"context_line":"            self._copy_resources(cn, resources)"},{"line_number":574,"context_line":"            self._setup_pci_tracker(context, cn, resources)"},{"line_number":575,"context_line":"            self._update(context, cn)"},{"line_number":576,"context_line":"            return"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        if len(cn_candidates) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_1edfda0d","line":575,"range":{"start_line":571,"start_character":12,"end_line":575,"end_character":37},"updated":"2017-10-24 03:10:21.000000000","message":"jenkins functional test fail seems valid \n\nI have following result in my local env, guess we should provide a chance to line 588 in order to create compute node record?\n\n2017-10-20 02:41:39,443 WARNING [nova.compute.manager] No compute node record found for host host2. If this is the first time this service is starting on this host, then you can ignore this warning.\n2017-10-20 02:41:39,447 WARNING [nova.compute.resource_tracker] No compute node record for host2:fake-mini\n2017-10-20 02:41:39,451 INFO [nova.compute.resource_tracker] ComputeNode fake-mini moving from compute to host2","commit_id":"b5e2760faee3f079cd51f0ddeb0fc900a7bcb259"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"82e69be71edd3a92bb1fcbe32f28443c72d9a9a1","unresolved":false,"context_lines":[{"line_number":545,"context_line":"            self._update(context, cn)"},{"line_number":546,"context_line":"            return"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"        if len(cn_candidates) \u003e 1:"},{"line_number":549,"context_line":"            LOG.error("},{"line_number":550,"context_line":"                \"Found more than one ComputeNode for nodename %s. \""},{"line_number":551,"context_line":"                \"Please clean up the orphaned ComputeNode records in your DB. \""}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_4a442c47","line":548,"updated":"2017-12-11 17:08:39.000000000","message":"elif?","commit_id":"5e766581147a5c6fb5f3dc2ea84be93a251ecda3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"117a098bcbed98eae6531612414ad23ea1fcf0ba","unresolved":false,"context_lines":[{"line_number":545,"context_line":"            self._update(context, cn)"},{"line_number":546,"context_line":"            return"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"        if len(cn_candidates) \u003e 1:"},{"line_number":549,"context_line":"            LOG.error("},{"line_number":550,"context_line":"                \"Found more than one ComputeNode for nodename %s. \""},{"line_number":551,"context_line":"                \"Please clean up the orphaned ComputeNode records in your DB. \""}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_25d31a06","line":548,"in_reply_to":"df87a7cf_4a442c47","updated":"2017-12-11 18:18:14.000000000","message":"Done","commit_id":"5e766581147a5c6fb5f3dc2ea84be93a251ecda3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"861494be7b8abaa43c12834e169f5166c4ddd0fa","unresolved":false,"context_lines":[{"line_number":549,"context_line":"            LOG.error("},{"line_number":550,"context_line":"                \"Found more than one ComputeNode for nodename %s. \""},{"line_number":551,"context_line":"                \"Please clean up the orphaned ComputeNode records in your DB. \""},{"line_number":552,"context_line":"                \"Unable to auto-recover from ironic node re-balance.\","},{"line_number":553,"context_line":"                nodename)"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"        # there was no local copy and none in the database"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_aaf13803","line":552,"range":{"start_line":552,"start_character":17,"end_line":552,"end_character":67},"updated":"2017-12-11 17:07:14.000000000","message":"How do you know that\u0027s how we got here? I\u0027m a bit uncomfortable with the global nature of this change in the resource tracker. Can we somehow scope this to just something that would run if you\u0027re using the ironic driver, sort of like what we did with the \"requires_allocation_refresh\" flag?","commit_id":"5e766581147a5c6fb5f3dc2ea84be93a251ecda3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"117a098bcbed98eae6531612414ad23ea1fcf0ba","unresolved":false,"context_lines":[{"line_number":549,"context_line":"            LOG.error("},{"line_number":550,"context_line":"                \"Found more than one ComputeNode for nodename %s. \""},{"line_number":551,"context_line":"                \"Please clean up the orphaned ComputeNode records in your DB. \""},{"line_number":552,"context_line":"                \"Unable to auto-recover from ironic node re-balance.\","},{"line_number":553,"context_line":"                nodename)"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"        # there was no local copy and none in the database"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_e5d8d21e","line":552,"range":{"start_line":552,"start_character":17,"end_line":552,"end_character":67},"in_reply_to":"df87a7cf_aaf13803","updated":"2017-12-11 18:18:14.000000000","message":"Done","commit_id":"5e766581147a5c6fb5f3dc2ea84be93a251ecda3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"82e69be71edd3a92bb1fcbe32f28443c72d9a9a1","unresolved":false,"context_lines":[{"line_number":550,"context_line":"                \"Found more than one ComputeNode for nodename %s. \""},{"line_number":551,"context_line":"                \"Please clean up the orphaned ComputeNode records in your DB. \""},{"line_number":552,"context_line":"                \"Unable to auto-recover from ironic node re-balance.\","},{"line_number":553,"context_line":"                nodename)"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"        # there was no local copy and none in the database"},{"line_number":556,"context_line":"        # so we need to create a new compute node. This needs"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_aa5858f9","line":553,"updated":"2017-12-11 17:08:39.000000000","message":"This is a really ironic-specific error, for a situation that is possibly not ironic-related right? if I have a hypervisor driver that causes overlap of node names or something we\u0027ll echo this thing about ironic. I haven\u0027t surveyed all the virt drivers in tree to see if any could have this happen, but .. this is the RT, and it really should avoid making assumptions like this, IMHO.\n\nEither we don\u0027t log anything here (since it\u0027s not necessarily an error), or make it universal.","commit_id":"5e766581147a5c6fb5f3dc2ea84be93a251ecda3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"117a098bcbed98eae6531612414ad23ea1fcf0ba","unresolved":false,"context_lines":[{"line_number":550,"context_line":"                \"Found more than one ComputeNode for nodename %s. \""},{"line_number":551,"context_line":"                \"Please clean up the orphaned ComputeNode records in your DB. \""},{"line_number":552,"context_line":"                \"Unable to auto-recover from ironic node re-balance.\","},{"line_number":553,"context_line":"                nodename)"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"        # there was no local copy and none in the database"},{"line_number":556,"context_line":"        # so we need to create a new compute node. This needs"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_05d4d6e7","line":553,"in_reply_to":"df87a7cf_aa5858f9","updated":"2017-12-11 18:18:14.000000000","message":"Done","commit_id":"5e766581147a5c6fb5f3dc2ea84be93a251ecda3"}],"nova/objects/compute_node.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8e47dc1d4390347c4885fb9cb7b324be26cccd1a","unresolved":false,"context_lines":[{"line_number":442,"context_line":"    @db.select_db_reader_mode"},{"line_number":443,"context_line":"    def _db_compute_node_get_all_by_nodename(context, nodename,"},{"line_number":444,"context_line":"                                             use_slave\u003dFalse):"},{"line_number":445,"context_line":"        return db.compute_node_get_all_by_nodename(context, nodename)"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"    @base.remotable_classmethod"},{"line_number":448,"context_line":"    def get_all_by_nodename(cls, context, nodename, use_slave\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_428bd3c1","line":445,"range":{"start_line":445,"start_character":15,"end_line":445,"end_character":50},"updated":"2017-10-02 14:20:38.000000000","message":"We haven\u0027t been adding new methods to nova/db/api.py for quite some time now. Instead, we directly call the DB via SQLAlchemy queries, as is done below on line 456.","commit_id":"ee0a5310c7fbfde58947a9d820c8fcad3147f8f9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"acadb811ad8fc745c1315a1fe0e3deffac5003b6","unresolved":false,"context_lines":[{"line_number":442,"context_line":"    @db.select_db_reader_mode"},{"line_number":443,"context_line":"    def _db_compute_node_get_all_by_nodename(context, nodename,"},{"line_number":444,"context_line":"                                             use_slave\u003dFalse):"},{"line_number":445,"context_line":"        return db.compute_node_get_all_by_nodename(context, nodename)"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"    @base.remotable_classmethod"},{"line_number":448,"context_line":"    def get_all_by_nodename(cls, context, nodename, use_slave\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_3dcebc59","line":445,"range":{"start_line":445,"start_character":15,"end_line":445,"end_character":50},"in_reply_to":"7f515b1d_428bd3c1","updated":"2017-10-03 13:26:16.000000000","message":"I thought we were only doing that for the new stuff, so I went for locally consistent, this is more of a me too method.\n\nI somehow missed 456, my bad!\n\nWill fix that up.","commit_id":"ee0a5310c7fbfde58947a9d820c8fcad3147f8f9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cc167cfda3cfe174d13f2c5a22bb97b033cdfd38","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    @staticmethod"},{"line_number":443,"context_line":"    @db.select_db_reader_mode"},{"line_number":444,"context_line":"    def _db_compute_node_get_all_by_nodename(context, nodename,"},{"line_number":445,"context_line":"                                             use_slave\u003dFalse):"},{"line_number":446,"context_line":"        db_computes \u003d context.session.query(models.ComputeNode).filter("},{"line_number":447,"context_line":"            models.ComputeNode.hypervisor_hostname \u003d\u003d nodename).all()"},{"line_number":448,"context_line":"        return db_computes"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_4963e5b2","line":445,"range":{"start_line":444,"start_character":62,"end_line":445,"end_character":60},"updated":"2017-10-03 13:34:08.000000000","message":"You can remove this kwarg, it\u0027s unused..","commit_id":"3e7590b1e6670549961d3ac0136680c3d184d0b7"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0d1ce64ba6fb03dc943465b96796cc212c67942e","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    @staticmethod"},{"line_number":443,"context_line":"    @db.select_db_reader_mode"},{"line_number":444,"context_line":"    def _db_compute_node_get_all_by_nodename(context, nodename,"},{"line_number":445,"context_line":"                                             use_slave\u003dFalse):"},{"line_number":446,"context_line":"        db_computes \u003d context.session.query(models.ComputeNode).filter("},{"line_number":447,"context_line":"            models.ComputeNode.hypervisor_hostname \u003d\u003d nodename).all()"},{"line_number":448,"context_line":"        return db_computes"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_498d2530","line":445,"range":{"start_line":444,"start_character":62,"end_line":445,"end_character":60},"in_reply_to":"7f515b1d_4963e5b2","updated":"2017-10-03 13:41:13.000000000","message":"yeah, I meant to do that, but I screwed up line 453, then forgot. lemme try that again!","commit_id":"3e7590b1e6670549961d3ac0136680c3d184d0b7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"82e69be71edd3a92bb1fcbe32f28443c72d9a9a1","unresolved":false,"context_lines":[{"line_number":447,"context_line":"        return db_computes"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"    @base.remotable_classmethod"},{"line_number":450,"context_line":"    def get_all_by_nodename(cls, context, nodename):"},{"line_number":451,"context_line":"        db_computes \u003d cls._db_compute_node_get_all_by_nodename(context,"},{"line_number":452,"context_line":"                                                               nodename)"},{"line_number":453,"context_line":"        return base.obj_make_list(context, cls(context), objects.ComputeNode,"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_0f52b63b","line":450,"updated":"2017-12-11 17:08:39.000000000","message":"I was going to say that this doesn\u0027t make much sense to be on ComputeNodeList, but I guess our UC is across (host,hypervisor_hostname) which means we could have duplicate nodes if they\u0027re on different hosts. Not sure that makes sense, but that\u0027s a different problem.","commit_id":"5e766581147a5c6fb5f3dc2ea84be93a251ecda3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b49a8bb04990373480578d79649b28860eb21c7","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        return base.obj_make_list(context, cls(context), objects.ComputeNode,"},{"line_number":407,"context_line":"                                  db_computes)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    @base.remotable_classmethod"},{"line_number":410,"context_line":"    def get_by_hypervisor(cls, context, hypervisor_match):"},{"line_number":411,"context_line":"        db_computes \u003d db.compute_node_search_by_hypervisor(context,"},{"line_number":412,"context_line":"                                                           hypervisor_match)"},{"line_number":413,"context_line":"        return base.obj_make_list(context, cls(context), objects.ComputeNode,"},{"line_number":414,"context_line":"                                  db_computes)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    # NOTE(hanlind): This is deprecated and should be removed on the next"},{"line_number":417,"context_line":"    # major version bump"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_b92d13ff","line":414,"range":{"start_line":409,"start_character":4,"end_line":414,"end_character":46},"updated":"2017-12-11 20:56:27.000000000","message":"Can\u0027t we just re-use this and avoid adding a new method? This is basically the same thing except it\u0027s a fuzzy match on the nodename, which for Ironic should be OK since we probably aren\u0027t going to hit a fuzzy match with UUIDs for the nodename, right?","commit_id":"122bcc875e39115942ad9720e65adb25471c98cd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"033881251331ba382162d87fd66a7872292646e8","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        return base.obj_make_list(context, cls(context), objects.ComputeNode,"},{"line_number":407,"context_line":"                                  db_computes)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    @base.remotable_classmethod"},{"line_number":410,"context_line":"    def get_by_hypervisor(cls, context, hypervisor_match):"},{"line_number":411,"context_line":"        db_computes \u003d db.compute_node_search_by_hypervisor(context,"},{"line_number":412,"context_line":"                                                           hypervisor_match)"},{"line_number":413,"context_line":"        return base.obj_make_list(context, cls(context), objects.ComputeNode,"},{"line_number":414,"context_line":"                                  db_computes)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    # NOTE(hanlind): This is deprecated and should be removed on the next"},{"line_number":417,"context_line":"    # major version bump"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_b99753ec","line":414,"range":{"start_line":409,"start_character":4,"end_line":414,"end_character":46},"in_reply_to":"df87a7cf_b92d13ff","updated":"2017-12-11 21:00:07.000000000","message":"Yeah, probably so.","commit_id":"122bcc875e39115942ad9720e65adb25471c98cd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b49a8bb04990373480578d79649b28860eb21c7","unresolved":false,"context_lines":[{"line_number":447,"context_line":"        return db_computes"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"    @base.remotable_classmethod"},{"line_number":450,"context_line":"    def get_all_by_nodename(cls, context, nodename):"},{"line_number":451,"context_line":"        db_computes \u003d cls._db_compute_node_get_all_by_nodename(context,"},{"line_number":452,"context_line":"                                                               nodename)"},{"line_number":453,"context_line":"        return base.obj_make_list(context, cls(context), objects.ComputeNode,"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_d9e257d5","line":450,"updated":"2017-12-11 20:56:27.000000000","message":"As noted earlier in review, the unique constraint on the compute_nodes table is:\n\nschema.UniqueConstraint(\n            \u0027host\u0027, \u0027hypervisor_hostname\u0027, \u0027deleted\u0027,\n            name\u003d\"uniq_compute_nodes0host0hypervisor_hostname0deleted\")\n\nSo we could have \u003e1 compute node with the same nodename on different hosts...which would be bonkers but it\u0027s possible with our schema.","commit_id":"122bcc875e39115942ad9720e65adb25471c98cd"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b49a8bb04990373480578d79649b28860eb21c7","unresolved":false,"context_lines":[{"line_number":1020,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027)"},{"line_number":1021,"context_line":"    @mock.patch(\u0027nova.compute.resource_tracker.ResourceTracker.\u0027"},{"line_number":1022,"context_line":"                \u0027_update\u0027)"},{"line_number":1023,"context_line":"    def test_compute_node_adopted(self, update_mock, get_mock, create_mock,"},{"line_number":1024,"context_line":"                                  pci_mock, all_by_nodename_mock):"},{"line_number":1025,"context_line":"        self._setup_rt()"},{"line_number":1026,"context_line":"        self.driver_mock.rebalances_nodes \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_593c072e","line":1023,"range":{"start_line":1023,"start_character":26,"end_line":1023,"end_character":33},"updated":"2017-12-11 20:56:27.000000000","message":"rebalanced?","commit_id":"122bcc875e39115942ad9720e65adb25471c98cd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b49a8bb04990373480578d79649b28860eb21c7","unresolved":false,"context_lines":[{"line_number":1040,"context_line":"                                         _NODENAME)"},{"line_number":1041,"context_line":"        all_by_nodename_mock.assert_called_once_with(mock.sentinel.ctx,"},{"line_number":1042,"context_line":"                                                     _NODENAME)"},{"line_number":1043,"context_line":"        self.assertFalse(create_mock.called)"},{"line_number":1044,"context_line":"        self.assertTrue(update_mock.called)"},{"line_number":1045,"context_line":""},{"line_number":1046,"context_line":"        self.assertEqual(_HOSTNAME, self.rt.compute_nodes[_NODENAME].host)"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_790c6b93","line":1043,"range":{"start_line":1043,"start_character":8,"end_line":1043,"end_character":44},"updated":"2017-12-11 20:56:27.000000000","message":"nit: create_mock.assert_not_called() would give a better error message if this fails.","commit_id":"122bcc875e39115942ad9720e65adb25471c98cd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b49a8bb04990373480578d79649b28860eb21c7","unresolved":false,"context_lines":[{"line_number":1041,"context_line":"        all_by_nodename_mock.assert_called_once_with(mock.sentinel.ctx,"},{"line_number":1042,"context_line":"                                                     _NODENAME)"},{"line_number":1043,"context_line":"        self.assertFalse(create_mock.called)"},{"line_number":1044,"context_line":"        self.assertTrue(update_mock.called)"},{"line_number":1045,"context_line":""},{"line_number":1046,"context_line":"        self.assertEqual(_HOSTNAME, self.rt.compute_nodes[_NODENAME].host)"},{"line_number":1047,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_5925e707","line":1044,"range":{"start_line":1044,"start_character":8,"end_line":1044,"end_character":43},"updated":"2017-12-11 20:56:27.000000000","message":"update_mock.assert_called_once_with()?","commit_id":"122bcc875e39115942ad9720e65adb25471c98cd"}],"nova/virt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b49a8bb04990373480578d79649b28860eb21c7","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    requires_allocation_refresh \u003d False"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    rebalances_nodes \u003d False"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __init__(self, virtapi):"},{"line_number":140,"context_line":"        self.virtapi \u003d virtapi"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_b9baf3bd","line":137,"updated":"2017-12-11 20:56:27.000000000","message":"nit: would be good to have a description of what this means and what it\u0027s used for, but that could be a follow up change.","commit_id":"122bcc875e39115942ad9720e65adb25471c98cd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"033881251331ba382162d87fd66a7872292646e8","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    requires_allocation_refresh \u003d False"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    rebalances_nodes \u003d False"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __init__(self, virtapi):"},{"line_number":140,"context_line":"        self.virtapi \u003d virtapi"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_398b43c3","line":137,"in_reply_to":"df87a7cf_b9baf3bd","updated":"2017-12-11 21:00:07.000000000","message":"And also maybe a \"Don\u0027t use this. Just don\u0027t.\" comment.","commit_id":"122bcc875e39115942ad9720e65adb25471c98cd"}]}
