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 808012 - Need to mark the unsupported commands of virtagent in the return of "guest-info"
Summary: Need to mark the unsupported commands of virtagent in the return of "guest-info"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jeff Cody
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 820481
TreeView+ depends on / blocked
 
Reported: 2012-03-29 10:51 UTC by Qunfang Zhang
Modified: 2012-06-19 20:11 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-19 20:11:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Qunfang Zhang 2012-03-29 10:51:48 UTC
Description of problem:
Currently the "guest-info" virtagent command will returns all commands that are supported or unsupported.  And all of the are under the "supported_commands" list. 
We know that some of them are not supported in 6.3 but this may confuse customers.  As when sending a command like {"execute":"guest-file-open", "arguments":{"path":"/tmp/testqga","mode":"w+"}}. it will returns "unsupported command" though they are in the supported list.

It looks trival but it's fine to fix it.  For example, mark the "enabled" to false instead of true, etc.

 {"execute":"guest-info"}
{"return": {"version": "1.0", "supported_commands": [{"enabled": true, "name": "guest-suspend-hybrid"}, {"enabled": true, "name": "guest-suspend-ram"}, {"enabled": true, "name": "guest-suspend-disk"}, {"enabled": true, "name": "guest-fsfreeze-thaw"}, {"enabled": true, "name": "guest-fsfreeze-freeze"}, {"enabled": true, "name": "guest-fsfreeze-status"}, {"enabled": true, "name": "guest-file-flush"}, {"enabled": true, "name": "guest-file-seek"}, {"enabled": true, "name": "guest-file-write"}, {"enabled": true, "name": "guest-file-read"}, {"enabled": true, "name": "guest-file-close"}, {"enabled": true, "name": "guest-file-open"}, {"enabled": true, "name": "guest-shutdown"}, {"enabled": true, "name": "guest-info"}, {"enabled": true, "name": "guest-ping"}, {"enabled": true, "name": "guest-sync"}]}}


Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.265.el6.x86_64
qemu-guest-agent-0.12.1.2-2.265.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Boot a guest with virtio serial or isa serial attached. 
 /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu Conroe -enable-kvm -m 2G -smp 2,sockets=1,cores=2,threads=1 -name rhel6.3 -uuid 26427d77-37e8-4217-ad98-140b16fa18f4 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -drive file=/dev/vg-qzhang/lv-rhel6.3,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:2a:15:10:19,bus=pci.0 -drive file=/home/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0,bus=virtio-serial0.0 -vnc :10 -usb -device usb-tablet,id=input0 -device virtio-balloon-pci,id=balloon0,addr=0x7 -monitor stdio -boot c -rtc-td-hack -rtc base=localtime -qmp tcp:0:4444,server,nowait


2. Install qemu-guest-agent-0.12.1.2-2.265.el6.x86_64 inside guest.

3.On host: # nc -U /tmp/qga.sock
  
4. Inside guest: 
#qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0

5. Send command on host from the socket of step 3

# nc -U /tmp/qga.sock

 {"execute":"guest-info"}

6. {"execute":"guest-file-open", "arguments":{"path":"/tmp/testqga","mode":"w+"}}
{"error": {"class": "Unsupported", "data": {}}}


Actual results:
After step 5: 

{"return": {"version": "1.0", "supported_commands": [{"enabled": true, "name": "guest-suspend-hybrid"}, {"enabled": true, "name": "guest-suspend-ram"}, {"enabled": true, "name": "guest-suspend-disk"}, {"enabled": true, "name": "guest-fsfreeze-thaw"}, {"enabled": true, "name": "guest-fsfreeze-freeze"}, {"enabled": true, "name": "guest-fsfreeze-status"}, {"enabled": true, "name": "guest-file-flush"}, {"enabled": true, "name": "guest-file-seek"}, {"enabled": true, "name": "guest-file-write"}, {"enabled": true, "name": "guest-file-read"}, {"enabled": true, "name": "guest-file-close"}, {"enabled": true, "name": "guest-file-open"}, {"enabled": true, "name": "guest-shutdown"}, {"enabled": true, "name": "guest-info"}, {"enabled": true, "name": "guest-ping"}, {"enabled": true, "name": "guest-sync"}]}}

After step 6: 

{"error": {"class": "Unsupported", "data": {}}}

Expected results:
Mark the unsupported commands to make user know that are not supported yet.


Additional info:

Comment 2 Luiz Capitulino 2012-03-29 13:25:23 UTC
I think this is really minor and should be moved to 6.4.

Assigning to Jeff.

Comment 3 Jeff Cody 2012-05-31 18:10:23 UTC
I believe this issue was contained to the guest-file-* operations, and as such moving to the blacklists as specified in bug #819900 will also fix this bug.

Comment 4 Luiz Capitulino 2012-06-01 17:03:15 UTC
Not exactly, Jeff. Commands like the guest-suspend ones may not be available in all systems. However, guest-info will return them. This happens on OpenBSD for example.

Maybe, the guest-file-* ones are the ones that really mattered to us and thus this issue will be quite minor when your patches are applied. But the issue does exist upstream though.

Comment 5 Ademar Reis 2012-06-19 20:11:00 UTC
With the support for blacklists (bug #819900) this feature turns to be unecessary for RHEL (may still make sense upstream for OpenBSD and alikes).


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