← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1939856] [NEW] delete vm after shelve vm

 

Public bug reported:

Description
===========
I delete vm after I have done shelve action for vm.

Notes: I set reclaim_instance_interval = 604800 in nova.conf

Steps to reproduce
==================
It's very important to set reclaim_instance_interval = 604800 in nova.conf

Then do steps as followed:

    $ nova boot --flavor <flavor-id> --image <image-id> --nic net-id=<net-id> <name>
    $ nova shelve <vm-id>
    $ nova delete <vm-id>
    $ nova force-delete <vm-id>
    ERROR (CommandError): No server with a name or ID of '856407c6-2334-4470-a1fe-d57e33535b99' exists.

Expected result
===============
The vm can be force deleted correctly.

Actual result
=============
The vm can not be found.

Find the vm from the db as followed:

    mysql> use nova_cell1;
    mysql> select * from instances where uuid="xxxxxx"\G;
              created_at: 2021-08-13 05:48:22
              updated_at: 2021-08-13 05:49:17
              deleted_at: 2021-08-13 05:49:17
                      id: 4
             internal_id: NULL
                 user_id: 70d652a843a84177974bce43b12a81fb
              project_id: a5769e016982488fb5949bca60597a4d
               image_ref: 7f1c2c5a-39f5-4377-9f53-38354682699d
               kernel_id:
              ramdisk_id:
            launch_index: 0
                key_name: NULL
                key_data: NULL
             power_state: 4
                vm_state: soft-delete
               memory_mb: 512
                   vcpus: 1
                hostname: vm
                    host: NULL
               user_data: NULL
          reservation_id: r-urknlkoz
             launched_at: 2021-08-13 05:48:27
           terminated_at: 2021-08-13 05:49:17
            display_name: vm
     display_description: NULL
       availability_zone: NULL
                  locked: 0
                 os_type: NULL
             launched_on: NULL
        instance_type_id: 6
                 vm_mode: NULL
                    uuid: 856407c6-2334-4470-a1fe-d57e33535b99
            architecture: NULL
        root_device_name: /dev/vda
            access_ip_v4: NULL
            access_ip_v6: NULL
            config_drive:
              task_state: NULL
default_ephemeral_device: NULL
     default_swap_device: NULL
                progress: 0
        auto_disk_config: 0
      shutdown_terminate: 0
       disable_terminate: 0
                 root_gb: 1
            ephemeral_gb: 0
               cell_name: NULL
                    node: NULL
                 deleted: 4
               locked_by: NULL
                 cleaned: 1
      ephemeral_key_uuid: NULL
                  hidden: 0

We will find that the 'deleted' field is not 0.

Environment
===========
Deploy with master of devstack.

Logs & Configs
==============
No error from log.

nova.conf config with reclaim_instance_interval = 604800

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1939856

Title:
  delete vm after shelve vm

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========
  I delete vm after I have done shelve action for vm.

  Notes: I set reclaim_instance_interval = 604800 in nova.conf

  Steps to reproduce
  ==================
  It's very important to set reclaim_instance_interval = 604800 in nova.conf

  Then do steps as followed:

      $ nova boot --flavor <flavor-id> --image <image-id> --nic net-id=<net-id> <name>
      $ nova shelve <vm-id>
      $ nova delete <vm-id>
      $ nova force-delete <vm-id>
      ERROR (CommandError): No server with a name or ID of '856407c6-2334-4470-a1fe-d57e33535b99' exists.

  Expected result
  ===============
  The vm can be force deleted correctly.

  Actual result
  =============
  The vm can not be found.

  Find the vm from the db as followed:

      mysql> use nova_cell1;
      mysql> select * from instances where uuid="xxxxxx"\G;
                created_at: 2021-08-13 05:48:22
                updated_at: 2021-08-13 05:49:17
                deleted_at: 2021-08-13 05:49:17
                        id: 4
               internal_id: NULL
                   user_id: 70d652a843a84177974bce43b12a81fb
                project_id: a5769e016982488fb5949bca60597a4d
                 image_ref: 7f1c2c5a-39f5-4377-9f53-38354682699d
                 kernel_id:
                ramdisk_id:
              launch_index: 0
                  key_name: NULL
                  key_data: NULL
               power_state: 4
                  vm_state: soft-delete
                 memory_mb: 512
                     vcpus: 1
                  hostname: vm
                      host: NULL
                 user_data: NULL
            reservation_id: r-urknlkoz
               launched_at: 2021-08-13 05:48:27
             terminated_at: 2021-08-13 05:49:17
              display_name: vm
       display_description: NULL
         availability_zone: NULL
                    locked: 0
                   os_type: NULL
               launched_on: NULL
          instance_type_id: 6
                   vm_mode: NULL
                      uuid: 856407c6-2334-4470-a1fe-d57e33535b99
              architecture: NULL
          root_device_name: /dev/vda
              access_ip_v4: NULL
              access_ip_v6: NULL
              config_drive:
                task_state: NULL
  default_ephemeral_device: NULL
       default_swap_device: NULL
                  progress: 0
          auto_disk_config: 0
        shutdown_terminate: 0
         disable_terminate: 0
                   root_gb: 1
              ephemeral_gb: 0
                 cell_name: NULL
                      node: NULL
                   deleted: 4
                 locked_by: NULL
                   cleaned: 1
        ephemeral_key_uuid: NULL
                    hidden: 0

  We will find that the 'deleted' field is not 0.

  Environment
  ===========
  Deploy with master of devstack.

  Logs & Configs
  ==============
  No error from log.

  nova.conf config with reclaim_instance_interval = 604800

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1939856/+subscriptions



Follow ups