Skip to content

[Enhancement] Snapshot fails on Paused / Stopped guests #910

@dvjsharma

Description

@dvjsharma

Summary

Snapshots triggered via zvmsdk.capture_guest() (or Nova createImage) fail if the target guest is PAUSED, SHUTOFF (Stopped), or any non-RUNNING state. The API returns HTTP 500 and SMAPI logs show failed logon attempts because the connector expects the VM to be CP Ready.

Logs

2018-05-03 09:06:11.450 10351 DEBUG oslo_service.periodic_task [req-5c6a3fde-2a1c-409b-9d0b-62f2bd7a4d4a tempest-ServersAdminTestJSON-386914806 tempest-ServersAdminTestJSON-386914806] Running periodic task ComputeManager._poll_rebooting_instances {{(pid=10351) run_periodic_tasks /usr/local/lib/python2.7/dist-packages/oslo_service/periodic_task.py:215}}
2018-05-03 09:06:11.452 10351 DEBUG nova.compute.manager [req-5c6a3fde-2a1c-409b-9d0b-62f2bd7a4d4a tempest-ServersAdminTestJSON-386914806 tempest-ServersAdminTestJSON-386914806] [instance: e415de96-6771-423a-9bc8-f4941de2e8a9] Start destroying the instance on the hypervisor. {{(pid=10351) _shutdown_instance /opt/stack/new/nova/nova/compute/manager.py:2347}}
2018-05-03 09:06:12.925 10351 ERROR nova.virt.zvm.utils [req-5c6a3fde-2a1c-409b-9d0b-62f2bd7a4d4a tempest-ServersAdminTestJSON-386914806 tempest-ServersAdminTestJSON-386914806] zVM Cloud Connector request guest_capture failed with parameters: ('KEX00008', u'aafe9b6e-2fce-4a0a-9335-ae85be84c799') {} . Results: {u'rs': 5, u'overallRC': 300, u'modID': 10, u'rc': 300, u'output': u'', u'errmsg': u'Failed to capture userid KEX00008 to generate image, error: The vm KEX00008 is powered off, please start up it before capture'}

Expected Result

Snapshot completes (or at minimum returns a clear validation error) while guest remains paused, mirroring behavior of KVM/libvirt Cold Snapshot.

Actual Result

  • Connector attempts SMAPI Image_CPU_Offline calls assuming VM is active.
  • Receives VM NOT LOGGED ON causing traceback in utils.py.
  • Tempest case test_create_image_from_paused_server fails.

Launchpad Ref - https://bugs.launchpad.net/python-zvm-sdk/+bug/1769076

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions