RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1950833 - There is no keyword 'dependencies' for /dev/sda1&/dev/sda2 from command 'get-disks'
Summary: There is no keyword 'dependencies' for /dev/sda1&/dev/sda2 from command 'get-...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.5
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: beta
: ---
Assignee: Marc-Andre Lureau
QA Contact: dehanmeng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-19 02:39 UTC by dehanmeng
Modified: 2022-09-20 02:17 UTC (History)
6 users (show)

Fixed In Version: qemu-kvm-6.0.0-17.module+el8.5.0+11173+c9fce0bb
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-20 02:16:20 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description dehanmeng 2021-04-19 02:39:41 UTC
Description of problem:
There is no keyword 'dependencies' for /dev/sda1&/dev/sda2 from command 'get-disks' on rhel8.5


Version-Release number of selected component (if applicable):
qemu-guest-agent-6.0.0-14rc0.scrmod+el8.5.0+10480+a8e067ae.wrb210325.x86_64.rpm

How reproducible:


Steps to Reproduce:
1. bootup rhel8.5 guest
/usr/libexec/qemu-kvm \
    -S  \
    -name 'avocado-vt-vm1'  \
    -sandbox on  \
    -machine q35 \
    -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
    -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0  \
    -nodefaults \
    -device VGA,bus=pcie.0,addr=0x2 \
    -m 14336  \
    -smp 24,maxcpus=24,cores=12,threads=1,dies=1,sockets=2  \
    -cpu 'Skylake-Server',+kvm_pv_unhalt \
    -chardev socket,id=qmp_id_qmpmonitor1,server,path=/tmp/avocado_xggvxd2c/monitor-qmpmonitor1-20210418-082850-tITUUA88,nowait  \
    -mon chardev=qmp_id_qmpmonitor1,mode=control \
    -chardev socket,id=qmp_id_catch_monitor,server,path=/tmp/avocado_xggvxd2c/monitor-catch_monitor-20210418-082850-tITUUA88,nowait  \
    -mon chardev=qmp_id_catch_monitor,mode=control \
    -device pvpanic,ioport=0x505,id=idH39mDT \
    -chardev socket,id=chardev_serial0,server,path=/tmp/avocado_xggvxd2c/serial-serial0-20210418-082850-tITUUA88,nowait \
    -device isa-serial,id=serial0,chardev=chardev_serial0 \
    -chardev socket,id=chardev_org.qemu.guest_agent.0,server,path=/tmp/avocado_xggvxd2c/serial-org.qemu.guest_agent.0-20210418-082850-tITUUA88,nowait \
    -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
    -device virtio-serial-pci,id=virtio_serial_pci0,bus=pcie-root-port-1,addr=0x0 \
    -device virtserialport,id=org.qemu.guest_agent.0,name=org.qemu.guest_agent.0,chardev=chardev_org.qemu.guest_agent.0,bus=virtio_serial_pci0.0,nr=1  \
    -chardev socket,id=seabioslog_id_20210418-082850-tITUUA88,path=/tmp/avocado_xggvxd2c/seabios-20210418-082850-tITUUA88,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20210418-082850-tITUUA88,iobase=0x402 \
    -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
    -device qemu-xhci,id=usb1,bus=pcie-root-port-2,addr=0x0 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-3,addr=0x0 \
    -blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/images/rhel850-64-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
    -device scsi-hd,id=image1,drive=drive_image1,write-cache=on \
    -blockdev node-name=file_stg0,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/images/storage0.qcow2,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_stg0,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_stg0 \
    -device scsi-hd,id=stg0,drive=drive_stg0,write-cache=on \
    -device pcie-root-port,id=pcie-root-port-4,port=0x4,addr=0x1.0x4,bus=pcie.0,chassis=5 \
    -device virtio-net-pci,mac=9a:f7:9d:85:e3:f1,id=idyetH48,netdev=idnjy4O8,bus=pcie-root-port-4,addr=0x0  \
    -netdev tap,id=idnjy4O8,vhost=on,vhostfd=20,fd=16  \
    -vnc :0  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot menu=off,order=cdn,once=c,strict=off \
    -enable-kvm \
    -device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x3,chassis=6
2.send qga command 'guest-get-disks'
[root@dell-per440-01 test-results]# nc -U /tmp/avocado_6qpvod1p/serial-org.qemu.guest_agent.0-20210415-022139-QXRSkGwK
{"execute":"guest-get-disks"}
{"return": [{"name": "/dev/sda1", "partition": true}, {"name": "/dev/sda2", "partition": true}, {"name": "/dev/sda", "dependencies": [], "partition": false, "address": {"bus-type": "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": 5, "slot": 0, "domain": 0, "function": 0}, "dev": "/dev/sda", "target": 0}}, {"name": "/dev/dm-0", "dependencies": ["/dev/sda2"], "partition": false, "alias": "rhel_bootp--73--75--109-root"}, {"name": "/dev/dm-1", "dependencies": ["/dev/sda2"], "partition": false, "alias": "rhel_bootp--73--75--109-swap"}]}

Actual results:
{"return": [{"name": "/dev/sda1", "partition": true}, {"name": "/dev/sda2", "partition": true}
There is no keyword 'dependencies' for /dev/sda1&/dev/sda2
Expected results:
'dependencies' should be print there.
{"return": [{"name": "/dev/sda1", "dependencies": ["/dev/sda"], "partition": true}, {"name": "/dev/sda2", "dependencies": ["/dev/sda"], "partition": true}
Additional info:

Comment 1 Marc-Andre Lureau 2021-04-19 13:22:16 UTC
Hi,

The qemu-ga code is rather simple, looking up /sys/block/*/slaves directory.

can you check if it's an selinux issue? (via journalctl or ausearch, or just setenforce 0 and try again)

thanks

Comment 2 dehanmeng 2021-04-20 01:00:03 UTC
(In reply to Marc-Andre Lureau from comment #1)
> Hi,
> 
> The qemu-ga code is rather simple, looking up /sys/block/*/slaves directory.
> 
> can you check if it's an selinux issue? (via journalctl or ausearch, or just
> setenforce 0 and try again)
> 
> thanks

Hi Marc

I attempted to close the selinux via 'sentenforce 0' but it didn't work. It still cannot return 'dependencies' from qga output.

Thanks

Comment 3 Marc-Andre Lureau 2021-04-20 13:04:35 UTC
Sent fix for upstream "[PATCH for-6.0?] qga: fix guest-get-disks regression"

Comment 4 dehanmeng 2021-05-19 01:18:27 UTC
(In reply to Marc-Andre Lureau from comment #3)
> Sent fix for upstream "[PATCH for-6.0?] qga: fix guest-get-disks regression"

Hi Marc-Andre
Has this issue been fixed? or any update about this? 

Thanks
Dehan

Comment 5 Marc-Andre Lureau 2021-06-30 07:27:28 UTC
Yes it was applied in v6.0.0-rc4~1:

commit bac9b87bd208e1d5adde7d7ba2634f957c22012c
Author: Marc-André Lureau <marcandre.lureau>
Date:   Tue Apr 20 16:58:31 2021 +0400

    qga: fix guest-get-disks regression
    
    Commit 54aa3de72 ("qapi: Use QAPI_LIST_PREPEND() where possible")
    inadvertently removed the has_dependencies from the partition disk
    info, resulting in empty list being returned.
    
    Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1950833

I think I can move this to ON_QA, doing so

Comment 6 dehanmeng 2021-06-30 07:35:07 UTC
steps to reproduce as comment0

Actual results:
{"return": [{"name": "/dev/sda1", "partition": true}, {"name": "/dev/sda2", "partition": true}
There is no keyword 'dependencies' for /dev/sda1&/dev/sda2
Expected results:
'dependencies' should be print there.

Verify this issue with qemu-kvm-6.0.0-17.module+el8.5.0+11173+c9fce0bb
steps as above.

Actual results:
{"execute":"guest-get-disks"}
{"return": [{"name": "/dev/sda1", "dependencies": ["/dev/sda"], "partition": true}, {"name": "/dev/sda2", "dependencies": ["/dev/sda"], "partition": true}, {"name": "/dev/sda", "dependencies": [], "partition": false, "address": {"bus-type": "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": 5, "slot": 0, "domain": 0, "function": 0}, "dev": "/dev/sda", "target": 0}}, {"name": "/dev/dm-0", "dependencies": ["/dev/sda2"], "partition": false, "alias": "rhel_vm--74--105-root"}, {"name": "/dev/dm-1", "dependencies": ["/dev/sda2"], "partition": false, "alias": "rhel_vm--74--105-swap"}]}
Expected results:
'dependencies' should be print there.


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