From 1b7ba3a200ff3b7d7a26c38de9135f7439caa4eb Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Thu, 15 Mar 2018 16:05:46 -0400 Subject: [PATCH] api-ref: add a note in DELETE /os-services about deleting computes As seen in I2717274bb1bd370870acbf58c03dc59cee30cc5e, if an operator deletes a nova-compute service via the API but fails to stop the actual nova-compute process, the API will delete the services table and compute_nodes table records, but the nova-compute process will hit the 'update_available_resource' periodic task and re-create the compute node record, which at that point is orphaned since it does not have an associated nova-compute service. Restarting the nova-compute service _should_ recreate the service table record for that host and then the user could attempt to delete the service and compute node record again via this API, but it's better to not have to find this out the hard way. So this change adds a simple reminder that the nova-compute process on the host should be stopped before deleting the compute service. While in here, the link to the install guide about the various compute services is also fixed. Change-Id: I68f2074814c3ae890888a5c75fd2870bb99f0e08 Related-Bug: #1646255 (cherry picked from commit e0c43ac7a7b9edbd3eb4921d87f476a33364549b) --- api-ref/source/os-services.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api-ref/source/os-services.inc b/api-ref/source/os-services.inc index 9e9df545b670..298dc0750e3e 100644 --- a/api-ref/source/os-services.inc +++ b/api-ref/source/os-services.inc @@ -10,7 +10,7 @@ Lists all running Compute services in a region, enables or disables scheduling for a Compute service and deletes a Compute service. For an overview of Compute services, see `OpenStack -Compute `__. +Compute `__. List Compute Services ===================== @@ -315,9 +315,14 @@ Delete Compute Service .. rest_method:: DELETE /os-services/{service_id} -Deletes a Compute service. If it's a nova-compute service, then the +Deletes a service. If it's a ``nova-compute`` service, then the corresponding host will be removed from all the host aggregates as well. +.. important:: Be sure to stop the actual ``nova-compute`` process on the + physical host *before* deleting the service with this API. + Failing to do so can lead to the running service re-creating + orphaned **compute_nodes** table records in the database. + Normal response codes: 204 Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404)