From 4ceba48697201dede5d17020ca7bc4f5af244ea5 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Fri, 28 Dec 2018 08:44:02 -0500 Subject: [PATCH] Add a note in "nova service-delete" help about deleting computes This mirrors the note in the API reference from change I68f2074814c3ae890888a5c75fd2870bb99f0e08 to the service-delete CLI help and docs. Change-Id: I191f6e6a4b7c6c456afbd33b0256842b043c772e Related-Bug: #1646255 --- doc/source/cli/nova.rst | 6 ++++++ novaclient/v2/shell.py | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/source/cli/nova.rst b/doc/source/cli/nova.rst index b8a212d49..ef4342811 100644 --- a/doc/source/cli/nova.rst +++ b/doc/source/cli/nova.rst @@ -3285,6 +3285,12 @@ nova service-delete Delete the service. +.. important:: If deleting a nova-compute service, be sure to stop the actual + ``nova-compute`` process on the physical host *before* deleting the + service with this command. Failing to do so can lead to the running + service re-creating orphaned **compute_nodes** table records in the + database. + **Positional arguments:** ```` diff --git a/novaclient/v2/shell.py b/novaclient/v2/shell.py index c98724c92..033d94121 100644 --- a/novaclient/v2/shell.py +++ b/novaclient/v2/shell.py @@ -3688,7 +3688,13 @@ def do_service_force_down(cs, args): help=_('ID of service as an integer. Note that this may not ' 'uniquely identify a service in a multi-cell deployment.')) def do_service_delete(cs, args): - """Delete the service by integer ID.""" + """Delete the service by integer ID. + + If deleting a nova-compute service, be sure to stop the actual + nova-compute process on the physical host before deleting the + service with this command. Failing to do so can lead to the running + service re-creating orphaned compute_nodes table records in the database. + """ cs.services.delete(args.id) @@ -3696,7 +3702,13 @@ def do_service_delete(cs, args): @api_versions.wraps('2.53') @utils.arg('id', metavar='', help=_('ID of service as a UUID.')) def do_service_delete(cs, args): - """Delete the service by UUID ID.""" + """Delete the service by UUID ID. + + If deleting a nova-compute service, be sure to stop the actual + nova-compute process on the physical host before deleting the + service with this command. Failing to do so can lead to the running + service re-creating orphaned compute_nodes table records in the database. + """ cs.services.delete(args.id)