)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"20559cc21d2c8a5df5a8f17428e4782e1edaba4a","unresolved":false,"context_lines":[{"line_number":9192,"context_line":"        :param startup: True if this is being called when the nova-compute"},{"line_number":9193,"context_line":"            service is starting, False otherwise."},{"line_number":9194,"context_line":"        \"\"\""},{"line_number":9195,"context_line":"        try:"},{"line_number":9196,"context_line":"            nodenames \u003d set(self.driver.get_available_nodes())"},{"line_number":9197,"context_line":"        except exception.VirtDriverNotReady:"},{"line_number":9198,"context_line":"            LOG.warning(\"Virt driver is not ready.\")"},{"line_number":9199,"context_line":"            return"},{"line_number":9200,"context_line":""},{"line_number":9201,"context_line":"        compute_nodes_in_db \u003d self._get_compute_nodes_in_db(context,"},{"line_number":9202,"context_line":"                                                            nodenames,"},{"line_number":9203,"context_line":"                                                            use_slave\u003dTrue,"},{"line_number":9204,"context_line":"                                                            startup\u003dstartup)"},{"line_number":9205,"context_line":""},{"line_number":9206,"context_line":"        # Delete orphan compute node not reported by driver but still in db"},{"line_number":9207,"context_line":"        for cn in compute_nodes_in_db:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_398a901a","line":9204,"range":{"start_line":9195,"start_character":0,"end_line":9204,"end_character":76},"updated":"2019-11-21 15:38:10.000000000","message":"I guess this could subtly change the race conditions we have to deal with.","commit_id":"49964bdc649bab88813fdcd34a2e54616057ac8d"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"a662a1f51fd3bed98303d5ed8c9ce6aa99273aa3","unresolved":false,"context_lines":[{"line_number":9192,"context_line":"        :param startup: True if this is being called when the nova-compute"},{"line_number":9193,"context_line":"            service is starting, False otherwise."},{"line_number":9194,"context_line":"        \"\"\""},{"line_number":9195,"context_line":"        try:"},{"line_number":9196,"context_line":"            nodenames \u003d set(self.driver.get_available_nodes())"},{"line_number":9197,"context_line":"        except exception.VirtDriverNotReady:"},{"line_number":9198,"context_line":"            LOG.warning(\"Virt driver is not ready.\")"},{"line_number":9199,"context_line":"            return"},{"line_number":9200,"context_line":""},{"line_number":9201,"context_line":"        compute_nodes_in_db \u003d self._get_compute_nodes_in_db(context,"},{"line_number":9202,"context_line":"                                                            nodenames,"},{"line_number":9203,"context_line":"                                                            use_slave\u003dTrue,"},{"line_number":9204,"context_line":"                                                            startup\u003dstartup)"},{"line_number":9205,"context_line":""},{"line_number":9206,"context_line":"        # Delete orphan compute node not reported by driver but still in db"},{"line_number":9207,"context_line":"        for cn in compute_nodes_in_db:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_49c1ac2e","line":9204,"range":{"start_line":9195,"start_character":0,"end_line":9204,"end_character":76},"in_reply_to":"3fa7e38b_2ea7a152","updated":"2019-11-22 13:34:41.000000000","message":"The main race that triggered my recent patch chain goes like this:\n\n* host1 gets nodes from DB, including an orphan\n* host2 takes over node in RT (sets node.host)\n* host1 deletes \"orphan\" which now belongs to host2\n\nI think in that case the race could still happen, this just changes the timing a little.","commit_id":"49964bdc649bab88813fdcd34a2e54616057ac8d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bb06ce52207bb07ba20d7b065dcb2b48643e4fbb","unresolved":false,"context_lines":[{"line_number":9192,"context_line":"        :param startup: True if this is being called when the nova-compute"},{"line_number":9193,"context_line":"            service is starting, False otherwise."},{"line_number":9194,"context_line":"        \"\"\""},{"line_number":9195,"context_line":"        try:"},{"line_number":9196,"context_line":"            nodenames \u003d set(self.driver.get_available_nodes())"},{"line_number":9197,"context_line":"        except exception.VirtDriverNotReady:"},{"line_number":9198,"context_line":"            LOG.warning(\"Virt driver is not ready.\")"},{"line_number":9199,"context_line":"            return"},{"line_number":9200,"context_line":""},{"line_number":9201,"context_line":"        compute_nodes_in_db \u003d self._get_compute_nodes_in_db(context,"},{"line_number":9202,"context_line":"                                                            nodenames,"},{"line_number":9203,"context_line":"                                                            use_slave\u003dTrue,"},{"line_number":9204,"context_line":"                                                            startup\u003dstartup)"},{"line_number":9205,"context_line":""},{"line_number":9206,"context_line":"        # Delete orphan compute node not reported by driver but still in db"},{"line_number":9207,"context_line":"        for cn in compute_nodes_in_db:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_2ea7a152","line":9204,"range":{"start_line":9195,"start_character":0,"end_line":9204,"end_character":76},"in_reply_to":"3fa7e38b_398a901a","updated":"2019-11-21 19:19:50.000000000","message":"As in what the driver reports vs what compute nodes are in the DB? For what _get_compute_nodes_in_db is using that shouldn\u0027t matter. nodenames are just used as a single if the driver is managing any nodes. Without these calls being swapped, even if there are compute nodes in the DB, if we get VirtDriverNotReady we return but if we don\u0027t get VirtDriverNotReady then we still process the nodenames and compute nodes below looking for orphans and such.","commit_id":"49964bdc649bab88813fdcd34a2e54616057ac8d"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"a662a1f51fd3bed98303d5ed8c9ce6aa99273aa3","unresolved":false,"context_lines":[{"line_number":9237,"context_line":"            # expect there to be compute nodes so we just return in that case."},{"line_number":9238,"context_line":"            # For example, this could be an ironic compute and it is not"},{"line_number":9239,"context_line":"            # managing any nodes yet."},{"line_number":9240,"context_line":"            if nodenames:"},{"line_number":9241,"context_line":"                if startup:"},{"line_number":9242,"context_line":"                    LOG.warning("},{"line_number":9243,"context_line":"                        \"No compute node record found for host %s. If this is \""},{"line_number":9244,"context_line":"                        \"the first time this service is starting on this \""},{"line_number":9245,"context_line":"                        \"host, then you can ignore this warning.\", self.host)"},{"line_number":9246,"context_line":"                else:"},{"line_number":9247,"context_line":"                    LOG.error(\"No compute node record for host %s\", self.host)"},{"line_number":9248,"context_line":"            return []"},{"line_number":9249,"context_line":""},{"line_number":9250,"context_line":"    @periodic_task.periodic_task("}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_89d004f9","line":9247,"range":{"start_line":9240,"start_character":0,"end_line":9247,"end_character":78},"updated":"2019-11-22 13:34:41.000000000","message":"An alternative that would allow keeping the order the same is to emit the warn/error in the calling method if we get an empty list back.","commit_id":"49964bdc649bab88813fdcd34a2e54616057ac8d"}]}
