Terminate instance succeeds but doesn't actually delete

Bug #757030 reported by Jeffrey Wilcox
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned
OpenStack Dashboard (Horizon)
New
Undecided
Unassigned

Bug Description

Nova:
Version: 2011.2~bzr972-0ubuntu0ppa1~maverick1
clean install from packages 11 Apr 2011

Create an Instance:
-------------------

2011-04-11 10:29:30,246 DEBUG routes.middleware [-] Matched POST /servers from (pid=6076) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:100
2011-04-11 10:29:30,246 DEBUG routes.middleware [-] Route path: '/servers', defaults: {'action': u'create', 'controller': <nova.api.openstack.servers.ControllerV10 object at 0x210f4d0>} from (pid=6076) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:102
2011-04-11 10:29:30,246 DEBUG routes.middleware [-] Match dict: {'action': u'create', 'controller': <nova.api.openstack.servers.ControllerV10 object at 0x210f4d0>} from (pid=6076) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:103
2011-04-11 10:29:30,377 DEBUG nova [-] Using Kernel=None, Ramdisk=None from (pid=6076) create /usr/lib/pymodules/python2.6/nova/compute/api.py:174
2011-04-11 10:29:30,417 DEBUG nova.compute.api [-] Going to run 1 instances... from (pid=6076) create /usr/lib/pymodules/python2.6/nova/compute/api.py:222

Terminate the Instance:
-----------------------
2011-04-11 10:30:11,812 DEBUG routes.middleware [-] Matched DELETE /servers/3 from (pid=6076) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:100
2011-04-11 10:30:11,812 DEBUG routes.middleware [-] Route path: '/servers/:(id)', defaults: {'action': u'delete', 'controller': <nova.api.openstack.servers.ControllerV10 object at 0x210f4d0>} from (pid=6076) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:102
2011-04-11 10:30:11,813 DEBUG routes.middleware [-] Match dict: {'action': u'delete', 'controller': <nova.api.openstack.servers.ControllerV10 object at 0x210f4d0>, 'id': u'3'} from (pid=6076) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:103
2011-04-11 10:30:11,813 DEBUG nova.compute.api [-] Going to try to terminate 3 from (pid=6076) delete /usr/lib/pymodules/python2.6/nova/compute/api.py:365
2011-04-11 10:30:11,999 DEBUG nova.rpc [-] Making asynchronous cast on compute.MYCOMPUTER... from (pid=6076) cast /usr/lib/pymodules/python2.6/nova/rpc.py:391

2011-04-11 10:30:12,277 INFO nova.compute.manager [0OVR1FFOSHYTSZFZONM8 jwilcox IRT] check_instance_lock: executing: |<function terminate_instance at 0x27cb938>|
2011-04-11 10:30:12,338 AUDIT nova.compute.manager [0OVR1FFOSHYTSZFZONM8 jwilcox IRT] Terminating instance 3
2011-04-11 10:30:12,344 DEBUG nova.compute.manager [0OVR1FFOSHYTSZFZONM8 jwilcox IRT] Deallocating address 10.0.0.3 from (pid=6093) terminate_instance /usr/lib/pymodules/python2.6/nova/compute/manager.py:278

...But it didn't really terminate:
----------------------------------
euca-describe-instances
RESERVATION r-2ee0wrlj IRT default
INSTANCE i-00000003 ami-00000001 shutdown None (IRT, MYCOMPUTER) 0 m1.tiny 2011-04-11T01:29:30Z nova

database state:
sqlite> select * from instances where id = 3;
         created_at = 2011-04-11 01:29:30.420264
         updated_at = 2011-04-11 01:30:12.840866
         deleted_at =
            deleted = 0
                 id = 3
        internal_id =
         admin_pass =
            user_id = MYUSER
         project_id = IRT
           image_id = 1
          kernel_id =
         ramdisk_id =
        server_name =
       launch_index = 0
           key_name =
           key_data =
              state = 5
  state_description = shutdown
          memory_mb = 512
              vcpus = 1
           local_gb = 0
           hostname = 3
               host = MYCOMPUTER
          user_data =
     reservation_id = r-2ee0wrlj
        mac_address = 02:16:3e:5c:a2:71
       scheduled_at =
        launched_at = 2011-04-11 01:29:35.249876
      terminated_at = 2011-04-11 01:30:11.868268
       display_name = MYSERVER
display_description = MYSERVER
  availability_zone =
             locked = 0
            os_type =
        launched_on = MYCOMPUTER
   instance_type_id = 2

workaround:
-----------
sudo nova-manage db sync
stop & start nova services

Revision history for this message
Jeffrey Wilcox (jeffjapan) wrote :

I need to clarify: this only applies to instances launched through the openstack API, instances launched with EC2/EUCA terminate without an issue.

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.