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 e0c43ac7a7)
This commit is contained in:
Matt Riedemann 2018-03-15 16:05:46 -04:00
parent bcd462e49b
commit 1b7ba3a200

View File

@ -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 <https://docs.openstack.org/ocata/install-guide-obs/common/get-started-compute.html>`__.
Compute <https://docs.openstack.org/nova/latest/install/get-started-compute.html>`__.
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)