)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2526bd89870ba179c079988bd4b607d3771e7621","unresolved":false,"context_lines":[{"line_number":10,"context_line":"compute service and the other serivces. Unfortunately, there"},{"line_number":11,"context_line":"is no service type check when deleting a compute service. As"},{"line_number":12,"context_line":"a result, the compute will be deleted accidently if the"},{"line_number":13,"context_line":"targeting servivce running on the compute node. This patch"},{"line_number":14,"context_line":"fixes this by adding a service type check."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1587702"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bacf61ea_6ab65a8b","line":13,"updated":"2016-08-04 12:58:41.000000000","message":"typo: service","commit_id":"fce551c27926355ca88d1e014cc88de261f105d9"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"553875781d0a8634a15f09a4695a49813bbf90d1","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    # TODO(sbauza): Remove the service_id filter in a later release"},{"line_number":433,"context_line":"    # once we are sure that all compute nodes report the host field"},{"line_number":434,"context_line":"    if service.binary \u003d\u003d \u0027nova-compute\u0027:"},{"line_number":435,"context_line":"        model_query(context, models.ComputeNode).\\"},{"line_number":436,"context_line":"                filter(or_(models.ComputeNode.service_id \u003d\u003d service_id,"},{"line_number":437,"context_line":"                           models.ComputeNode.host \u003d\u003d service[\u0027host\u0027])).\\"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_5a5b6a2e","line":434,"updated":"2016-07-19 23:53:03.000000000","message":"Perhaps I\u0027m missing something trivial, but this code deletes services only if the service binary is \"nova-compute.\" That doesn\u0027t appear to match the commit message and bug report?!","commit_id":"fce551c27926355ca88d1e014cc88de261f105d9"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"3065aa54167110db821e8caf79df5311d332b4a2","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    # TODO(sbauza): Remove the service_id filter in a later release"},{"line_number":433,"context_line":"    # once we are sure that all compute nodes report the host field"},{"line_number":434,"context_line":"    if service.binary \u003d\u003d \u0027nova-compute\u0027:"},{"line_number":435,"context_line":"        model_query(context, models.ComputeNode).\\"},{"line_number":436,"context_line":"                filter(or_(models.ComputeNode.service_id \u003d\u003d service_id,"},{"line_number":437,"context_line":"                           models.ComputeNode.host \u003d\u003d service[\u0027host\u0027])).\\"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_fa6dfe98","line":434,"in_reply_to":"dada55a8_5a5b6a2e","updated":"2016-07-20 00:05:12.000000000","message":"For non-compute service, it will be deleted by line 428-430, only when it\u0027s a compute service, the code is allowed to delete the compute host.","commit_id":"fce551c27926355ca88d1e014cc88de261f105d9"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2526bd89870ba179c079988bd4b607d3771e7621","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    # TODO(sbauza): Remove the service_id filter in a later release"},{"line_number":433,"context_line":"    # once we are sure that all compute nodes report the host field"},{"line_number":434,"context_line":"    if service.binary \u003d\u003d \u0027nova-compute\u0027:"},{"line_number":435,"context_line":"        model_query(context, models.ComputeNode).\\"},{"line_number":436,"context_line":"                filter(or_(models.ComputeNode.service_id \u003d\u003d service_id,"},{"line_number":437,"context_line":"                           models.ComputeNode.host \u003d\u003d service[\u0027host\u0027])).\\"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_b8554951","line":434,"in_reply_to":"dada55a8_fa6dfe98","updated":"2016-08-04 12:58:41.000000000","message":"So this may be argumentative, but still... I think we do this check at the wrong level: IMO, the DB API layer must not decide whether or not we should also soft delete the compute node records. FWIW, we already have similar precedent with aggregates here https://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/services.py#n183 - I\u0027d rather we move this check there","commit_id":"fce551c27926355ca88d1e014cc88de261f105d9"}]}
