Active service should not be allowed to be deleted

Bug #1401469 reported by jichenjc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Wishlist
Unassigned

Bug Description

we should not enable service to be deleted when it's up
see following example, the service itself is still working but we lost the information of the services
we'd better give some flexibility to operators (e.g unless --force flag, we can't delete active services)

[root@compute1 ~]# nova service-list
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| 4 | nova-scheduler | compute1 | internal | enabled | up | 2014-12-11T10:06:47.000000 | - |
| 5 | nova-compute | compute1 | nova | enabled | up | 2014-12-11T10:06:48.000000 | None |
| 6 | nova-consoleauth | compute1 | internal | enabled | down | 2014-12-10T07:39:27.000000 | - |
| 7 | nova-compute | compute2 | nova | enabled | down | 2014-12-10T07:39:25.000000 | None |
| 8 | nova-conductor | compute1 | internal | enabled | up | - | - |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
[root@compute1 ~]# nova service-delete 8
[root@compute1 ~]# nova service-list
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| 4 | nova-scheduler | compute1 | internal | enabled | up | 2014-12-11T10:08:47.000000 | - |
| 5 | nova-compute | compute1 | nova | enabled | up | 2014-12-11T10:08:42.000000 | None |
| 6 | nova-consoleauth | compute1 | internal | enabled | down | 2014-12-10T07:39:27.000000 | - |
| 7 | nova-compute | compute2 | nova | enabled | down | 2014-12-10T07:39:25.000000 | None |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
[root@compute1 ~]#

error logs in conductor, though it won't affect operations

2014-12-11 05:07:43.149 ERROR nova.servicegroup.drivers.db [-] model server went away
2014-12-11 05:07:43.149 TRACE nova.servicegroup.drivers.db Traceback (most recent call last):
2014-12-11 05:07:43.149 TRACE nova.servicegroup.drivers.db File "/opt/stack/nova/nova/servicegroup/drivers/db.py", line 99, in _report_state
2014-12-11 05:07:43.149 TRACE nova.servicegroup.drivers.db service.service_ref, state_catalog)
2014-12-11 05:07:43.149 TRACE nova.servicegroup.drivers.db File "/opt/stack/nova/nova/conductor/api.py", line 180, in service_update
2014-12-11 05:07:43.149 TRACE nova.servicegroup.drivers.db return self._manager.service_update(context, service, values)
2014-12-11 05:07:43.149 TRACE nova.servicegroup.drivers.db File "/opt/stack/nova/nova/utils.py", line 951, in wrapper
2014-12-11 05:07:43.149 TRACE nova.servicegroup.drivers.db raise (e.exc_info[1], None, e.exc_info[2])
2014-12-11 05:07:43.149 TRACE nova.servicegroup.drivers.db ServiceNotFound: Service 8 could not be found.
2014-12-11 05:07:43.149 TRACE nova.servicegroup.drivers.db
2014-12-11 05:07:43.143 ERROR nova.servicegroup.drivers.db [-] model server went away
2014-12-11 05:07:43.143 TRACE nova.servicegroup.drivers.db Traceback (most recent call last):
2014-12-11 05:07:43.143 TRACE nova.servicegroup.drivers.db File "/opt/stack/nova/nova/servicegroup/drivers/db.py", line 99, in _report_state
2014-12-11 05:07:43.143 TRACE nova.servicegroup.drivers.db service.service_ref, state_catalog)
2014-12-11 05:07:43.143 TRACE nova.servicegroup.drivers.db File "/opt/stack/nova/nova/conductor/api.py", line 180, in service_update
2014-12-11 05:07:43.143 TRACE nova.servicegroup.drivers.db return self._manager.service_update(context, service, values)
2014-12-11 05:07:43.143 TRACE nova.servicegroup.drivers.db File "/opt/stack/nova/nova/utils.py", line 951, in wrapper
2014-12-11 05:07:43.143 TRACE nova.servicegroup.drivers.db raise (e.exc_info[1], None, e.exc_info[2])
2014-12-11 05:07:43.143 TRACE nova.servicegroup.drivers.db ServiceNotFound: Service 8 could not be found.
2014-12-11 05:07:43.143 TRACE nova.servicegroup.drivers.db

Joe Gordon (jogo)
Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Kun Huang (academicgareth) wrote :

good looking version of above log:

http://paste.openstack.org/show/196822/

Revision history for this message
Kun Huang (academicgareth) wrote :

btw

duplicating it here is not a good choice, because https://bugs.launchpad.net/bugs/1386535 doesn't provide any proof

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.