Bug 1998873 - Cant Change CD in oVirt 4.4.8 - VDSM 4.40.80.5
Summary: Cant Change CD in oVirt 4.4.8 - VDSM 4.40.80.5
Keywords:
Status: CLOSED DUPLICATE of bug 1990268
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: 4.40.80.5
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
: ---
Assignee: bugs@ovirt.org
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-29 15:55 UTC by Nur Imam Febrianto
Modified: 2021-08-30 06:55 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-08-30 06:55:49 UTC
oVirt Team: Virt
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-43159 0 None None None 2021-08-29 15:58:04 UTC

Description Nur Imam Febrianto 2021-08-29 15:55:23 UTC
Description of problem:
Cant change CD in VM that hosted by host that using oVirt 4.4.8 and VDSM 4.40.80.5

Version-Release number of selected component (if applicable):
oVirt 4.4.8
VDSM 4.40.80.5

How reproducible:
Always

Steps to Reproduce:
1. In running VM, choose change CD
2. Choose any CD Image (if the VM already mounting any CD, choose another one)

Actual results:
Failed. It shows an error : Error while executing action Change CD: Failed to perform "Change CD" operation, CD might be still in use by the VM.

Expected results:

The CD that mounted on the VM changed successfully.

Additional info:

VDSM log on the host where the VM is running while try to change the CD :

2021-08-29 22:41:47,493+0700 INFO  (jsonrpc/0) [storage.LVM] Activating lvs: vg=43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434 lvs=['f5172591-ffa6-4911-9cee-219e052da5b5'] (lvm:1789)
2021-08-29 22:41:47,716+0700 INFO  (jsonrpc/0) [storage.StorageDomain] Creating image run directory '/run/vdsm/storage/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/4f2b1b34-49f6-42d9-abf9-36793816251c' (blockSD:1363)
2021-08-29 22:41:47,717+0700 INFO  (jsonrpc/0) [storage.fileUtils] Creating directory: /run/vdsm/storage/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/4f2b1b34-49f6-42d9-abf9-36793816251c mode: None (fileUtils:201)
2021-08-29 22:41:47,717+0700 INFO  (jsonrpc/0) [storage.StorageDomain] Creating symlink from /dev/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/f5172591-ffa6-4911-9cee-219e052da5b5 to /run/vdsm/storage/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/4f2b1b34-49f6-42d9-abf9-36793816251c/f5172591-ffa6-4911-9cee-219e052da5b5 (blockSD:1368)
2021-08-29 22:41:48,015+0700 INFO  (jsonrpc/0) [storage.StorageDomain] Creating symlink from /run/vdsm/storage/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/4f2b1b34-49f6-42d9-abf9-36793816251c to /rhev/data-center/mnt/blockSD/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/images/4f2b1b34-49f6-42d9-abf9-36793816251c (blockSD:1333)
2021-08-29 22:41:48,017+0700 INFO  (jsonrpc/0) [vdsm.api] FINISH prepareImage return={'path': '/rhev/data-center/mnt/blockSD/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/images/4f2b1b34-49f6-42d9-abf9-36793816251c/f5172591-ffa6-4911-9cee-219e052da5b5', 'info': {'type': 'block', 'path': '/rhev/data-center/mnt/blockSD/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/images/4f2b1b34-49f6-42d9-abf9-36793816251c/f5172591-ffa6-4911-9cee-219e052da5b5'}, 'imgVolumesInfo': [{'domainID': '43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434', 'imageID': '4f2b1b34-49f6-42d9-abf9-36793816251c', 'volumeID': 'f5172591-ffa6-4911-9cee-219e052da5b5', 'path': '/rhev/data-center/mnt/blockSD/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/images/4f2b1b34-49f6-42d9-abf9-36793816251c/f5172591-ffa6-4911-9cee-219e052da5b5', 'leasePath': '/dev/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/leases', 'leaseOffset': 155189248}]} from=::ffff:172.16.112.250,57208, flow_id=70122e29-f192-4e1f-8428-9fc70b793e12, task_id=a8c9faca-25ad-4297-8089-fc5324e5f771 (api:54)
2021-08-29 22:41:48,019+0700 INFO  (jsonrpc/0) [vds] prepared volume path: /rhev/data-center/mnt/blockSD/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/images/4f2b1b34-49f6-42d9-abf9-36793816251c/f5172591-ffa6-4911-9cee-219e052da5b5 (clientIF:518)
2021-08-29 22:41:48,020+0700 INFO  (jsonrpc/0) [virt.vm] (vmId='cbe2585d-74c4-42d6-b7ab-d3848bfc6d6e') Updating disk device using XML: <?xml version='1.0' encoding='utf-8'?>
<disk device="cdrom" type="file"><source file="/rhev/data-center/mnt/blockSD/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/images/4f2b1b34-49f6-42d9-abf9-36793816251c/f5172591-ffa6-4911-9cee-219e052da5b5" /><target bus="sata" dev="sdc" /></disk> (vm:4993)
2021-08-29 22:41:48,074+0700 ERROR (jsonrpc/0) [virt.vm] (vmId='cbe2585d-74c4-42d6-b7ab-d3848bfc6d6e') Forceful device flags update failed. (vm:5007)
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 5005, in _update_disk_device
    disk_xml, libvirt.VIR_DOMAIN_DEVICE_MODIFY_FORCE)
  File "/usr/lib/python3.6/site-packages/vdsm/virt/virdomain.py", line 101, in f
    ret = attr(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/vdsm/common/libvirtconnection.py", line 131, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/vdsm/common/function.py", line 94, in wrapper
    return func(inst, *args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/libvirt.py", line 3233, in updateDeviceFlags
    raise libvirtError('virDomainUpdateDeviceFlags() failed')
libvirt.libvirtError: internal error: unable to execute QEMU command 'blockdev-add': 'file' driver requires '/rhev/data-center/mnt/blockSD/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/images/4f2b1b34-49f6-42d9-abf9-36793816251c/f5172591-ffa6-4911-9cee-219e052da5b5' to be a regular file
2021-08-29 22:41:48,076+0700 INFO  (jsonrpc/0) [vdsm.api] START teardownImage(sdUUID='43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434', spUUID='54e0f0ac-354c-11eb-a2a4-00163e7c5828', imgUUID='4f2b1b34-49f6-42d9-abf9-36793816251c', volUUID=None) from=::ffff:172.16.112.250,57208, flow_id=70122e29-f192-4e1f-8428-9fc70b793e12, task_id=ecf30522-a3f7-4c71-b050-15760498f656 (api:48)
2021-08-29 22:41:48,077+0700 INFO  (jsonrpc/0) [storage.StorageDomain] Removing image run directory '/run/vdsm/storage/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/4f2b1b34-49f6-42d9-abf9-36793816251c' (blockSD:1387)
2021-08-29 22:41:48,077+0700 INFO  (jsonrpc/0) [storage.fileUtils] Removing directory: /run/vdsm/storage/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/4f2b1b34-49f6-42d9-abf9-36793816251c (fileUtils:182)
2021-08-29 22:41:48,304+0700 INFO  (jsonrpc/0) [storage.LVM] Deactivating lvs: vg=43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434 lvs=['f5172591-ffa6-4911-9cee-219e052da5b5'] (lvm:1800)
2021-08-29 22:41:48,540+0700 INFO  (jsonrpc/0) [vdsm.api] FINISH teardownImage return=None from=::ffff:172.16.112.250,57208, flow_id=70122e29-f192-4e1f-8428-9fc70b793e12, task_id=ecf30522-a3f7-4c71-b050-15760498f656 (api:54)
2021-08-29 22:41:48,548+0700 INFO  (periodic/1) [vdsm.api] START repoStats(domains=()) from=internal, task_id=67f036d3-6297-4093-a870-a4be3157993e (api:48)
2021-08-29 22:41:48,549+0700 ERROR (jsonrpc/0) [api] FINISH changeCD error=Failed to change disk image (api:131)
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 5005, in _update_disk_device
    disk_xml, libvirt.VIR_DOMAIN_DEVICE_MODIFY_FORCE)
  File "/usr/lib/python3.6/site-packages/vdsm/virt/virdomain.py", line 101, in f
    ret = attr(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/vdsm/common/libvirtconnection.py", line 131, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/vdsm/common/function.py", line 94, in wrapper
    return func(inst, *args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/libvirt.py", line 3233, in updateDeviceFlags
    raise libvirtError('virDomainUpdateDeviceFlags() failed')
libvirt.libvirtError: internal error: unable to execute QEMU command 'blockdev-add': 'file' driver requires '/rhev/data-center/mnt/blockSD/43b473aa-e8b9-4ca5-ac23-4bb6dfa8a434/images/4f2b1b34-49f6-42d9-abf9-36793816251c/f5172591-ffa6-4911-9cee-219e052da5b5' to be a regular file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/vdsm/common/api.py", line 124, in method
    ret = func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/vdsm/API.py", line 153, in changeCD
    return self.vm.changeCD(driveSpec)
  File "<decorator-gen-281>", line 2, in changeCD
  File "/usr/lib/python3.6/site-packages/vdsm/common/api.py", line 101, in method
    return func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 4768, in changeCD
    self._change_cd(blockdev, drive_spec, iface, force=force)
  File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 5049, in _change_cd
    self._update_disk_device(disk_xml, force=force)
  File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 5008, in _update_disk_device
    raise exception.ChangeDiskFailed()
vdsm.common.exception.ChangeDiskFailed: Failed to change disk image

2021-08-29 22:41:48,552+0700 INFO  (jsonrpc/0) [api.virt] FINISH changeCD return={'status': {'code': 41, 'message': 'Failed to change disk image'}} from=::ffff:172.16.112.250,57208, flow_id=70122e29-f192-4e1f-8428-9fc70b793e12, vmId=cbe2585d-74c4-42d6-b7ab-d3848bfc6d6e (api:54)
2021-08-29 22:41:48,553+0700 INFO  (jsonrpc/0) [jsonrpc.JsonRpcServer] RPC call VM.changeCD failed (error 41) in 1.40 seconds (__init__:312)

Can confirm this issue wont happen if i try to run same VM on host that still using oVirt 4.4.7 on same cluster.

Comment 1 RHEL Program Management 2021-08-30 06:50:14 UTC
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.

Comment 2 Vojtech Juranek 2021-08-30 06:55:49 UTC

*** This bug has been marked as a duplicate of bug 1990268 ***


Note You need to log in before you can comment on or make changes to this bug.