Skip to content

Commit 4ceba48

Browse files
committed
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
1 parent b13ba01 commit 4ceba48

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

doc/source/cli/nova.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3285,6 +3285,12 @@ nova service-delete
32853285
32863286
Delete the service.
32873287

3288+
.. important:: If deleting a nova-compute service, be sure to stop the actual
3289+
``nova-compute`` process on the physical host *before* deleting the
3290+
service with this command. Failing to do so can lead to the running
3291+
service re-creating orphaned **compute_nodes** table records in the
3292+
database.
3293+
32883294
**Positional arguments:**
32893295

32903296
``<id>``

novaclient/v2/shell.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3688,15 +3688,27 @@ def do_service_force_down(cs, args):
36883688
help=_('ID of service as an integer. Note that this may not '
36893689
'uniquely identify a service in a multi-cell deployment.'))
36903690
def do_service_delete(cs, args):
3691-
"""Delete the service by integer ID."""
3691+
"""Delete the service by integer ID.
3692+
3693+
If deleting a nova-compute service, be sure to stop the actual
3694+
nova-compute process on the physical host before deleting the
3695+
service with this command. Failing to do so can lead to the running
3696+
service re-creating orphaned compute_nodes table records in the database.
3697+
"""
36923698
cs.services.delete(args.id)
36933699

36943700

36953701
# Starting in microversion 2.53, the service is identified by UUID ID.
36963702
@api_versions.wraps('2.53')
36973703
@utils.arg('id', metavar='<id>', help=_('ID of service as a UUID.'))
36983704
def do_service_delete(cs, args):
3699-
"""Delete the service by UUID ID."""
3705+
"""Delete the service by UUID ID.
3706+
3707+
If deleting a nova-compute service, be sure to stop the actual
3708+
nova-compute process on the physical host before deleting the
3709+
service with this command. Failing to do so can lead to the running
3710+
service re-creating orphaned compute_nodes table records in the database.
3711+
"""
37003712
cs.services.delete(args.id)
37013713

37023714

0 commit comments

Comments
 (0)