Description of problem: After I fire an API to create a snapshot, I poll to get the status of snapshot to check if the snapshot_status is "ok". And after that I fire the Initiate Disk Transfer API to download the disk. But the Initiate Disk Transfer API fails with the repsonse that "Cannot transfer Virtual Disk. Snapshot is currently being created for VM". Version-Release number of selected component (if applicable): How reproducible: Intermittently Steps to Reproduce: 1.Create a snapshot using API 2.Poll to get the status of snapshot from "locked" to "ok" 3.Initiate Disk Transfer using API Actual results: Initiate Disk Transfer fails with "Snapshot is currently being created for VM", even though the snapshot_status is "ok" Expected results: Initiate Disk Transfer should be successful after the snapshot_status is "ok" Additional info: Snapshot Info- HTTP/1.1 200 OK Date: Thu, 18 Apr 2019 18:19:49 GMT Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips Content-Type: application/json Correlation-Id: 3856adcf-68d1-4655-8a2c-97d82ca05cfb Vary: Accept-Encoding Transfer-Encoding: chunked , body: { "date" : 1555611588905, "persist_memorystate" : "false", "snapshot_status" : "locked", "snapshot_type" : "regular", "vm" : { "fqdn" : "lidacl02vm024.rmnus.sen.symantec.com", "guest_operating_system" : { "architecture" : "x86_64", "codename" : "Win 2016", "distribution" : "", "family" : "Windows", "version" : { "full_version" : "10.0", "major" : "10", "minor" : "0" } }, "guest_time_zone" : { "name" : "Central Standard Time", "utc_offset" : "-06:00" }, "next_run_configuration_exists" : "false", "numa_tune_mode" : "interleave", "run_once" : "false", "start_time" : 1543248037944, "status" : "up", "stop_time" : 1543248037000, "host" : { "id" : "3c0ae17c-be03-4216-a104-18ef744804f4" }, "original_template" : { "id" : "00000000-0000-0000-0000-000000000000" }, "template" : { "id" : "00000000-0000-0000-0000-000000000000" }, "name" : "lidacl02vm024", "description" : "Karen - Win2019", "comment" : "Karen - Win2019", "id" : "8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00", "bios" : { "boot_menu" : { "enabled" : "false" } }, "cpu" : { "architecture" : "x86_64", "topology" : { "cores" : "1", "sockets" : "2", "threads" : "1" } }, "display" : { "address" : "10.80.54.152", "allow_override" : "true", "copy_paste_enabled" : "true", "disconnect_action" : "LOCK_SCREEN", "file_transfer_enabled" : "true", "monitors" : "1", "port" : "5904", "secure_port" : "5905", "single_qxl_pci" : "false", "smartcard_enabled" : "false", "type" : "spice" }, "initialization" : { }, "io" : { "threads" : "1" }, "memory" : "2147483648", "migration" : { "auto_converge" : "inherit", "compressed" : "inherit" }, "origin" : "ovirt", "os" : { "boot" : { "devices" : { "device" : [ "hd" ] } }, "type" : "windows_2016x64" }, "sso" : { "methods" : { "method" : [ { "id" : "guest_agent" } ] } }, "stateless" : "false", "type" : "server", "usb" : { "enabled" : "false" }, "cluster" : { "id" : "c4952922-d21e-4271-a588-0cf8225b7479" }, "quota" : { "id" : "8128688a-a84f-4d72-b785-35331cbd9dac" }, "cpu_shares" : "0", "creation_time" : 1543238164000, "delete_protected" : "false", "high_availability" : { "enabled" : "false", "priority" : "1" }, "large_icon" : { "id" : "1a72cad0-2c95-7dc0-ddc1-cded99aad04f" }, "memory_policy" : { "guaranteed" : "1431306240", "max" : "8589934592" }, "migration_downtime" : "-1", "multi_queues_enabled" : "true", "placement_policy" : { "affinity" : "migratable" }, "small_icon" : { "id" : "05949d4e-63e5-b14d-1f21-1ad2c7e656ad" }, "start_paused" : "false", "storage_error_resume_behaviour" : "auto_resume", "time_zone" : { "name" : "Central Standard Time" }, "cpu_profile" : { "id" : "8c3a2bf1-0661-490e-ac11-397d4a4be61d" } }, "actions" : { "link" : [ { "href" : "/ovirt-engine/api/vms/8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00/snapshots/b09efa40-8af2-4f70-91e8-496b371c44bb/restore", "rel" : "restore" } ] }, "description" : "NBU_Snapshot_8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00", "href" : "/ovirt-engine/api/vms/8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00/snapshots/b09efa40-8af2-4f70-91e8-496b371c44bb", "id" : "b09efa40-8af2-4f70-91e8-496b371c44bb", "link" : [ { "href" : "/ovirt-engine/api/vms/8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00/snapshots/b09efa40-8af2-4f70-91e8-496b371c44bb/nics", "rel" : "nics" }, { "href" : "/ovirt-engine/api/vms/8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00/snapshots/b09efa40-8af2-4f70-91e8-496b371c44bb/disks", "rel" : "disks" }, { "href" : "/ovirt-engine/api/vms/8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00/snapshots/b09efa40-8af2-4f70-91e8-496b371c44bb/cdroms", "rel" : "cdroms" } ] } Snapshot Info- HTTP/1.1 200 OK Date: Thu, 18 Apr 2019 18:20:04 GMT Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips Content-Type: application/json Correlation-Id: ac6af9fa-fcb9-4aa2-a945-42e05d14e600 Vary: Accept-Encoding Transfer-Encoding: chunked , body: { "date" : 1555611588905, "persist_memorystate" : "false", "snapshot_status" : "ok", "snapshot_type" : "regular", "vm" : { "fqdn" : "lidacl02vm024.rmnus.sen.symantec.com", "guest_operating_system" : { "architecture" : "x86_64", "codename" : "Win 2016", "distribution" : "", "family" : "Windows", "version" : { "full_version" : "10.0", "major" : "10", "minor" : "0" } }, "guest_time_zone" : { "name" : "Central Standard Time", "utc_offset" : "-06:00" }, "next_run_configuration_exists" : "false", "numa_tune_mode" : "interleave", "run_once" : "false", "start_time" : 1543248037944, "status" : "up", "stop_time" : 1543248037000, "host" : { "id" : "3c0ae17c-be03-4216-a104-18ef744804f4" }, "original_template" : { "id" : "00000000-0000-0000-0000-000000000000" }, "template" : { "id" : "00000000-0000-0000-0000-000000000000" }, "name" : "lidacl02vm024", "description" : "Karen - Win2019", "comment" : "Karen - Win2019", "id" : "8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00", "bios" : { "boot_menu" : { "enabled" : "false" } }, "cpu" : { "architecture" : "x86_64", "topology" : { "cores" : "1", "sockets" : "2", "threads" : "1" } }, "display" : { "address" : "10.80.54.152", "allow_override" : "true", "copy_paste_enabled" : "true", "disconnect_action" : "LOCK_SCREEN", "file_transfer_enabled" : "true", "monitors" : "1", "port" : "5904", "secure_port" : "5905", "single_qxl_pci" : "false", "smartcard_enabled" : "false", "type" : "spice" }, "initialization" : { }, "io" : { "threads" : "1" }, "memory" : "2147483648", "migration" : { "auto_converge" : "inherit", "compressed" : "inherit" }, "origin" : "ovirt", "os" : { "boot" : { "devices" : { "device" : [ "hd" ] } }, "type" : "windows_2016x64" }, "sso" : { "methods" : { "method" : [ { "id" : "guest_agent" } ] } }, "stateless" : "false", "type" : "server", "usb" : { "enabled" : "false" }, "cluster" : { "id" : "c4952922-d21e-4271-a588-0cf8225b7479" }, "quota" : { "id" : "8128688a-a84f-4d72-b785-35331cbd9dac" }, "cpu_shares" : "0", "creation_time" : 1543238164000, "delete_protected" : "false", "high_availability" : { "enabled" : "false", "priority" : "1" }, "large_icon" : { "id" : "1a72cad0-2c95-7dc0-ddc1-cded99aad04f" }, "memory_policy" : { "guaranteed" : "1431306240", "max" : "8589934592" }, "migration_downtime" : "-1", "multi_queues_enabled" : "true", "placement_policy" : { "affinity" : "migratable" }, "small_icon" : { "id" : "05949d4e-63e5-b14d-1f21-1ad2c7e656ad" }, "start_paused" : "false", "storage_error_resume_behaviour" : "auto_resume", "time_zone" : { "name" : "Central Standard Time" }, "cpu_profile" : { "id" : "8c3a2bf1-0661-490e-ac11-397d4a4be61d" } }, "actions" : { "link" : [ { "href" : "/ovirt-engine/api/vms/8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00/snapshots/b09efa40-8af2-4f70-91e8-496b371c44bb/restore", "rel" : "restore" } ] }, "description" : "NBU_Snapshot_8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00", "href" : "/ovirt-engine/api/vms/8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00/snapshots/b09efa40-8af2-4f70-91e8-496b371c44bb", "id" : "b09efa40-8af2-4f70-91e8-496b371c44bb", "link" : [ { "href" : "/ovirt-engine/api/vms/8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00/snapshots/b09efa40-8af2-4f70-91e8-496b371c44bb/nics", "rel" : "nics" }, { "href" : "/ovirt-engine/api/vms/8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00/snapshots/b09efa40-8af2-4f70-91e8-496b371c44bb/disks", "rel" : "disks" }, { "href" : "/ovirt-engine/api/vms/8a532ed4-e3b5-4b3f-bff4-0f9b09f5bf00/snapshots/b09efa40-8af2-4f70-91e8-496b371c44bb/cdroms", "rel" : "cdroms" } ] } Initiate Disk Transfer Response - HTTP/1.1 409 Conflict^M Date: Thu, 18 Apr 2019 18:20:13 GMT^M Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips^M Content-Type: application/json^M Correlation-Id: c9c75741-ae51-4ea2-95af-07e715ea4971^M Transfer-Encoding: chunked^M content: { "detail" : "[Cannot transfer Virtual Disk. Snapshot is currently being created for VM lidacl02vm024.]", "reason" : "Operation Failed" }
Benny, Is it the right way to check if the Snapshot is ready to use? Should we check also the disk status or the Jobs like you did in OST?
Unfortunately, it looks like the snapshot's memory locked was not released at this point, so yes, polling the job would be work better in this case.
Gaurav, There is an explanation on the best ways to check snapshot status: https://bugzilla.redhat.com/show_bug.cgi?id=1660742#c9 I hope this solve your issue.
*** This bug has been marked as a duplicate of bug 1660742 ***
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days