)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"3f8a3ef01f158f2ff6fc2360435b45e3f855c51f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     David Peraza \u003cdperaza@linux.vnet.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-03-27 12:52:25 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Cleans up orphan compute_nodes not cleaned up my compute manager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixes bug 1161193"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAOH%2F%2FxFU%3D","line":7,"updated":"2013-03-28 11:50:15.000000000","message":"s/my/by/","commit_id":"c3666d8af9546f64b63f992cc4edafe4543651dd"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"6f9d47e115d9a8bee64c49a513b67937b0d0ddb2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     David Peraza \u003cdperaza@linux.vnet.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-03-27 12:52:25 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Cleans up orphan compute_nodes not cleaned up my compute manager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixes bug 1161193"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAOX%2F%2F9%2Bs%3D","line":7,"in_reply_to":"AAAAOH%2F%2FxFU%3D","updated":"2013-04-04 05:40:11.000000000","message":"Done","commit_id":"c3666d8af9546f64b63f992cc4edafe4543651dd"}],"nova/compute/manager.py":[{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"d39a09acd1cc01ecd109b33502f1c64e90264788","unresolved":false,"context_lines":[{"line_number":3876,"context_line":"            rt.update_available_resource(context)"},{"line_number":3877,"context_line":"            new_resource_tracker_dict[nodename] \u003d rt"},{"line_number":3878,"context_line":""},{"line_number":3879,"context_line":"        # delete nodes that the driver no longer reports"},{"line_number":3880,"context_line":"        known_nodes \u003d set(self._resource_tracker_dict.keys())"},{"line_number":3881,"context_line":"        for nodename in known_nodes - nodenames:"},{"line_number":3882,"context_line":"            rt \u003d self._get_resource_tracker(nodename)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOX%2F%2F%2BhQ%3D","line":3879,"updated":"2013-04-03 20:47:39.000000000","message":"I\u0027m wondering now if this code block is dead, get resource tracker will raise error if node_name is not reported by driver.","commit_id":"d1952165ed4018174d64d8008ecaa3bff22da293"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"ec0567fd978aa93592cca3d1bb38994e72a04633","unresolved":false,"context_lines":[{"line_number":3876,"context_line":"            rt.update_available_resource(context)"},{"line_number":3877,"context_line":"            new_resource_tracker_dict[nodename] \u003d rt"},{"line_number":3878,"context_line":""},{"line_number":3879,"context_line":"        # delete nodes that the driver no longer reports"},{"line_number":3880,"context_line":"        known_nodes \u003d set(self._resource_tracker_dict.keys())"},{"line_number":3881,"context_line":"        for nodename in known_nodes - nodenames:"},{"line_number":3882,"context_line":"            rt \u003d self._get_resource_tracker(nodename)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOX%2F%2F%2BGc%3D","line":3879,"in_reply_to":"AAAAOX%2F%2F%2Bf4%3D","updated":"2013-04-04 02:38:31.000000000","message":"Working on this now","commit_id":"d1952165ed4018174d64d8008ecaa3bff22da293"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"85a970603477939a6caeacbcc0a437b6e2096315","unresolved":false,"context_lines":[{"line_number":3876,"context_line":"            rt.update_available_resource(context)"},{"line_number":3877,"context_line":"            new_resource_tracker_dict[nodename] \u003d rt"},{"line_number":3878,"context_line":""},{"line_number":3879,"context_line":"        # delete nodes that the driver no longer reports"},{"line_number":3880,"context_line":"        known_nodes \u003d set(self._resource_tracker_dict.keys())"},{"line_number":3881,"context_line":"        for nodename in known_nodes - nodenames:"},{"line_number":3882,"context_line":"            rt \u003d self._get_resource_tracker(nodename)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOX%2F%2F%2Bf4%3D","line":3879,"in_reply_to":"AAAAOX%2F%2F%2BhQ%3D","updated":"2013-04-03 21:04:23.000000000","message":"Agreed, it becomes obsolete with your patch.\n\nPlease just go ahead and remove it, along with the associated delete\u003dTrue logic under rt.update_available_resource()","commit_id":"d1952165ed4018174d64d8008ecaa3bff22da293"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"85a970603477939a6caeacbcc0a437b6e2096315","unresolved":false,"context_lines":[{"line_number":3883,"context_line":"            rt.update_available_resource(context, delete\u003dTrue)"},{"line_number":3884,"context_line":""},{"line_number":3885,"context_line":"        # Delete orphan compute node not reported by driver but still in db"},{"line_number":3886,"context_line":"        compute_nodes_in_db \u003d self._get_compute_nodes_in_db(context)"},{"line_number":3887,"context_line":""},{"line_number":3888,"context_line":"        for cn in compute_nodes_in_db:"},{"line_number":3889,"context_line":"            if cn.get(\u0027hypervisor_hostname\u0027) not in nodenames:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOX%2F%2F%2Bfo%3D","line":3886,"updated":"2013-04-03 21:04:23.000000000","message":"You could eliminate the DB hit to lookup the compute nodes.  The RT object has a reference to the compute node.\n\nYou just need to compute the set of resource trackers no longer in user and then you have a reference to compute_node on each of them.","commit_id":"d1952165ed4018174d64d8008ecaa3bff22da293"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"ec0567fd978aa93592cca3d1bb38994e72a04633","unresolved":false,"context_lines":[{"line_number":3883,"context_line":"            rt.update_available_resource(context, delete\u003dTrue)"},{"line_number":3884,"context_line":""},{"line_number":3885,"context_line":"        # Delete orphan compute node not reported by driver but still in db"},{"line_number":3886,"context_line":"        compute_nodes_in_db \u003d self._get_compute_nodes_in_db(context)"},{"line_number":3887,"context_line":""},{"line_number":3888,"context_line":"        for cn in compute_nodes_in_db:"},{"line_number":3889,"context_line":"            if cn.get(\u0027hypervisor_hostname\u0027) not in nodenames:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOX%2F%2F%2BGM%3D","line":3886,"in_reply_to":"AAAAOX%2F%2F%2Bfo%3D","updated":"2013-04-04 02:38:31.000000000","message":"Will be great if I can save a trip to DB, however I\u0027m not following your tip, are you referring to self._resource_tracker_dict? The only way I see a compute node reference added to this dictionary is via call to _get_resource_tracker which checks first if driver knows about the node. This approach will work if in real time the driver stops reporting a compute node and we still have a reference to the it in dictionary. Lets say for example compute service is taken down, then compute node removed and compute service started. Only the nodes reported by driver will make the dictionary and the orphan node is still in DB.  I initially was implementing this in resource tracker to save this extra trip but I agree implementation there was out of scope. Let me know if I\u0027m understanding your suggestion, or I\u0027m off in a tangent here","commit_id":"d1952165ed4018174d64d8008ecaa3bff22da293"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"2980a338e7e602c398c6035eda903dd74e671a32","unresolved":false,"context_lines":[{"line_number":3879,"context_line":"        # Delete orphan compute node not reported by driver but still in db"},{"line_number":3880,"context_line":"        compute_nodes_in_db \u003d self._get_compute_nodes_in_db(context)"},{"line_number":3881,"context_line":""},{"line_number":3882,"context_line":"        for cn in compute_nodes_in_db:"},{"line_number":3883,"context_line":"            if cn.get(\u0027hypervisor_hostname\u0027) not in nodenames:"},{"line_number":3884,"context_line":"                LOG.audit(_(\"Deleting orphan compute node %s\") % cn[\u0027id\u0027])"},{"line_number":3885,"context_line":"                self.compute_node \u003d self.conductor_api.compute_node_delete("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F968%3D","line":3882,"updated":"2013-04-04 06:11:47.000000000","message":"Just a thought, why is this being done on the compute node itself? Shouldn\u0027t this be done in the location where the API node is? Thinking a little further out, if we wanted to restrict the permissions of compute nodes, this compute node delete being done from compute nodes would be problematic.","commit_id":"2917a5aac2107658899d55b90af7b205e9861658"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"ef38b40eae24a9851959d93773e283691b1470e5","unresolved":false,"context_lines":[{"line_number":3879,"context_line":"        # Delete orphan compute node not reported by driver but still in db"},{"line_number":3880,"context_line":"        compute_nodes_in_db \u003d self._get_compute_nodes_in_db(context)"},{"line_number":3881,"context_line":""},{"line_number":3882,"context_line":"        for cn in compute_nodes_in_db:"},{"line_number":3883,"context_line":"            if cn.get(\u0027hypervisor_hostname\u0027) not in nodenames:"},{"line_number":3884,"context_line":"                LOG.audit(_(\"Deleting orphan compute node %s\") % cn[\u0027id\u0027])"},{"line_number":3885,"context_line":"                self.compute_node \u003d self.conductor_api.compute_node_delete("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9gk%3D","line":3882,"in_reply_to":"AAAAOX%2F%2F968%3D","updated":"2013-04-04 13:52:50.000000000","message":"Not sure I follow, this change is done on the compute manager which can handle one or more nodes. This compute manager runs on the compute service that may or may not be running on the compute node itself, see the bare-metal scenario. This is not common, most of the time one compute service will handle one compute node. As far as I understand you can add permissions at the service level to restrict access to this specific service and withing the service to restrict access to a different node. Let me know if this is your understanding too. Please more details with an example will help to, thanks for your feedback.","commit_id":"2917a5aac2107658899d55b90af7b205e9861658"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"53d031e2a9a4d34bdde728e19ab30a5968eb5f3b","unresolved":false,"context_lines":[{"line_number":3879,"context_line":"        # Delete orphan compute node not reported by driver but still in db"},{"line_number":3880,"context_line":"        compute_nodes_in_db \u003d self._get_compute_nodes_in_db(context)"},{"line_number":3881,"context_line":""},{"line_number":3882,"context_line":"        for cn in compute_nodes_in_db:"},{"line_number":3883,"context_line":"            if cn.get(\u0027hypervisor_hostname\u0027) not in nodenames:"},{"line_number":3884,"context_line":"                LOG.audit(_(\"Deleting orphan compute node %s\") % cn[\u0027id\u0027])"},{"line_number":3885,"context_line":"                self.compute_node \u003d self.conductor_api.compute_node_delete("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9Lk%3D","line":3882,"in_reply_to":"AAAAOX%2F%2F9gk%3D","updated":"2013-04-04 16:40:43.000000000","message":"Compute nodes (including deletion) are already managed from compute/manager anyway, right? I don\u0027t see this making things any different than they are today. Further, since we\u0027re going through conductor, we could (in the future) have conductor ensure that only compute nodes that this host is allowed to delete are in the request.\n\nIn other words, this seems okay to me.","commit_id":"2917a5aac2107658899d55b90af7b205e9861658"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"1c7ac8056de838ca324b8f34db6b0911769ee303","unresolved":false,"context_lines":[{"line_number":3888,"context_line":"        self._resource_tracker_dict \u003d new_resource_tracker_dict"},{"line_number":3889,"context_line":""},{"line_number":3890,"context_line":"    def _get_compute_nodes_in_db(self, context):"},{"line_number":3891,"context_line":"        compute_node_ref \u003d self.conductor_api.service_get_by_compute_host("},{"line_number":3892,"context_line":"            context, self.host)"},{"line_number":3893,"context_line":""},{"line_number":3894,"context_line":"        if not compute_node_ref:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9%2Fo%3D","line":3891,"updated":"2013-04-04 05:25:02.000000000","message":"Should this variable be named service_ref?","commit_id":"2917a5aac2107658899d55b90af7b205e9861658"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"53d031e2a9a4d34bdde728e19ab30a5968eb5f3b","unresolved":false,"context_lines":[{"line_number":3888,"context_line":"        self._resource_tracker_dict \u003d new_resource_tracker_dict"},{"line_number":3889,"context_line":""},{"line_number":3890,"context_line":"    def _get_compute_nodes_in_db(self, context):"},{"line_number":3891,"context_line":"        compute_node_ref \u003d self.conductor_api.service_get_by_compute_host("},{"line_number":3892,"context_line":"            context, self.host)"},{"line_number":3893,"context_line":""},{"line_number":3894,"context_line":"        if not compute_node_ref:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9Lc%3D","line":3891,"in_reply_to":"AAAAOX%2F%2F9%2Fo%3D","updated":"2013-04-04 16:40:43.000000000","message":"Yes, I think it should :)","commit_id":"2917a5aac2107658899d55b90af7b205e9861658"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"c27fd9984a5bfad0f52f7ff82dbf2e4311294965","unresolved":false,"context_lines":[{"line_number":3888,"context_line":"        self._resource_tracker_dict \u003d new_resource_tracker_dict"},{"line_number":3889,"context_line":""},{"line_number":3890,"context_line":"    def _get_compute_nodes_in_db(self, context):"},{"line_number":3891,"context_line":"        compute_node_ref \u003d self.conductor_api.service_get_by_compute_host("},{"line_number":3892,"context_line":"            context, self.host)"},{"line_number":3893,"context_line":""},{"line_number":3894,"context_line":"        if not compute_node_ref:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOX%2F%2F9J8%3D","line":3891,"in_reply_to":"AAAAOX%2F%2F9Lc%3D","updated":"2013-04-04 16:56:29.000000000","message":"Done","commit_id":"2917a5aac2107658899d55b90af7b205e9861658"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"b10a306f97c01561e0df824029466a76fd51fdc4","unresolved":false,"context_lines":[{"line_number":3906,"context_line":"            context, self.host)"},{"line_number":3907,"context_line":""},{"line_number":3908,"context_line":"        if not service_ref:"},{"line_number":3909,"context_line":"            return []"},{"line_number":3910,"context_line":""},{"line_number":3911,"context_line":"        return service_ref[\u0027compute_node\u0027]"},{"line_number":3912,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOX%2F%2F9Jo%3D","line":3909,"updated":"2013-04-04 17:00:22.000000000","message":"This is the sign of a broken DB.  Might want to log an error here.","commit_id":"3ddd479704dbe5d817fca2edb0769af8fb168a64"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"65b13775d51287516669825b93c173e1facbb072","unresolved":false,"context_lines":[{"line_number":3906,"context_line":"            context, self.host)"},{"line_number":3907,"context_line":""},{"line_number":3908,"context_line":"        if not service_ref:"},{"line_number":3909,"context_line":"            return []"},{"line_number":3910,"context_line":""},{"line_number":3911,"context_line":"        return service_ref[\u0027compute_node\u0027]"},{"line_number":3912,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOX%2F%2F80E%3D","line":3909,"in_reply_to":"AAAAOX%2F%2F9Jo%3D","updated":"2013-04-04 20:00:04.000000000","message":"I think this is a good idea, adding this now","commit_id":"3ddd479704dbe5d817fca2edb0769af8fb168a64"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"9732d34ddc046822f922efd533682c991333eea9","unresolved":false,"context_lines":[{"line_number":3896,"context_line":"        for cn in compute_nodes_in_db:"},{"line_number":3897,"context_line":"            if cn.get(\u0027hypervisor_hostname\u0027) not in nodenames:"},{"line_number":3898,"context_line":"                LOG.audit(_(\"Deleting orphan compute node %s\") % cn[\u0027id\u0027])"},{"line_number":3899,"context_line":"                self.compute_node \u003d self.conductor_api.compute_node_delete("},{"line_number":3900,"context_line":"                    context, cn)"},{"line_number":3901,"context_line":""},{"line_number":3902,"context_line":"        self._resource_tracker_dict \u003d new_resource_tracker_dict"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F5%2BM%3D","line":3899,"updated":"2013-04-12 01:10:36.000000000","message":"Do we need to store the return value from compute_node_delete? Can\u0027t seem to find self.compute_node being used","commit_id":"a1a6b6b4c45f88f4abd4e9ee69e72b3d14c76293"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"3b2dbb11252f5c42293b48d4d4995c27bfd88ea8","unresolved":false,"context_lines":[{"line_number":3896,"context_line":"        for cn in compute_nodes_in_db:"},{"line_number":3897,"context_line":"            if cn.get(\u0027hypervisor_hostname\u0027) not in nodenames:"},{"line_number":3898,"context_line":"                LOG.audit(_(\"Deleting orphan compute node %s\") % cn[\u0027id\u0027])"},{"line_number":3899,"context_line":"                self.compute_node \u003d self.conductor_api.compute_node_delete("},{"line_number":3900,"context_line":"                    context, cn)"},{"line_number":3901,"context_line":""},{"line_number":3902,"context_line":"        self._resource_tracker_dict \u003d new_resource_tracker_dict"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F54I%3D","line":3899,"in_reply_to":"AAAAOn%2F%2F5%2BM%3D","updated":"2013-04-12 03:42:43.000000000","message":"good catch, cleaning up, thanks","commit_id":"a1a6b6b4c45f88f4abd4e9ee69e72b3d14c76293"}]}
