Bug 625681 - RFE QMP: should have command to disconnect and connect network card for whql testing
RFE QMP: should have command to disconnect and connect network card for whql ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
low Severity medium
: beta
: ---
Assigned To: Luiz Capitulino
Virtualization Bugs
: FutureFeature, Reopened
Depends On:
Blocks: 655920 559201 Rhel6KvmTier1 QMPNetCard
  Show dependency treegraph
 
Reported: 2010-08-20 02:25 EDT by Shirley Zhou
Modified: 2015-03-04 19:52 EST (History)
9 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.121.el6
Doc Type: Enhancement
Doc Text:
IMPORTANT: this is an internal interface consumed only by libvirt. Users should only know about libvirt related impact and new functionality (which is not described here). Cause: The set_link command is not available in QMP. Consequence: There's no way to change the network link status through QMP. Change: Add the set_link command to QMP. Result: It's now possible to change the network link status through QMP.
Story Points: ---
Clone Of:
: QMPNetCard (view as bug list)
Environment:
Last Closed: 2011-05-19 07:34:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 07:20:36 EDT

  None (edit)
Description Shirley Zhou 2010-08-20 02:25:16 EDT
Description of problem:
It is required to disconnect and connect network card in job Ethernet-NDIS Test 6.5(Manual) for whql testing. We have commands "set_link net1 down" and "set_link net1 up" in monitor, and qmp should also support these commands.

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

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 2 Luiz Capitulino 2010-11-10 12:00:04 EST
I don't think libvirt will support this for 6.1, is this really an issue or can it be closed?
Comment 3 Shirley Zhou 2010-11-11 04:44:04 EST
(In reply to comment #2)
> I don't think libvirt will support this for 6.1, is this really an issue or can
> it be closed?

Hi, Luiz

Disconnect/reconnect network card command is necessary for whql-nic testing.
Now we have qemu monitor command "set_link down" and "set_link up" to full fill the requirement. QE think we should also support these command in qmp.

Thanks,
Shirley
Comment 4 Luiz Capitulino 2010-11-11 07:11:41 EST
But libvirt is not going to support it for rhel6.x, so why should we have it in QMP?
Comment 5 Shirley Zhou 2010-11-16 21:54:47 EST
Because libvirt will not support it for rhel6.x, so I will close this bug as won't fix. And will open this bug if monitor does not provide workaround to pass whql testing.
Comment 6 Dave Allan 2010-11-16 22:22:29 EST
Why do you think that libvirt will not support this feature in 6.x?  We have an open RFE for it for 6.1, although we have not committed to it yet for 6.1.
Comment 7 Daniel Berrange 2010-11-17 06:48:17 EST
Re-opening because we *do* want this for libvirt, even if not in 6.1, we'll ask for it in 6.2
Comment 8 Luiz Capitulino 2010-11-17 08:30:58 EST
Miscommunication then, this is already upstream, it's just a matter of backporting. So, let me know if you want it for 6.1 or 6.2.
Comment 9 Luiz Capitulino 2010-11-17 10:16:13 EST
Daniel Berrange said to me that he will want this one in 6.1, moving to tier1 then.
Comment 16 Xiaoli Tian 2010-12-30 00:41:54 EST
Verified on qemu-kvm-0.12.1.2-2.123.el6

1.Start a VM with qmp enabled like: ..... -qmp tcp:0:5555,server 

2.Telnet to the QMP server like:telnet $HostIP 5555,the result is like:
Trying $HostIP...
Connected to $HostIP.
Escape character is '^]'.
{"QMP": {"version": {"qemu": "0.12.1", "package": "(qemu-kvm-0.12.1.2)"}, "capabilities": []}}

3.Issue command:{ "execute": "qmp_capabilities"} ,the output is:
{"return": {}}

4.Check the guest network connection status via ifconfig and ping,the result is:
ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:55:64:3E:22:35  
          inet addr:10.66.91.138  Bcast:10.66.91.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33666 errors:0 dropped:0 overruns:0 frame:0
          TX packets:212 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3212514 (3.0 MiB)  TX bytes:25182 (24.5 KiB)
ping 10.66.91.160
PING 10.66.91.160 (10.66.91.160) 56(84) bytes of data.
64 bytes from 10.66.91.160: icmp_seq=1 ttl=64 time=1.78 ms
64 bytes from 10.66.91.160: icmp_seq=2 ttl=64 time=0.646 ms
64 bytes from 10.66.91.160: icmp_seq=3 ttl=64 time=0.665 ms
5.Issue command:{"execute":"set_link","arguments":{"name":"e1000-1","up":false}}
the output is:{"return": {}}
Check the guest network connection status via ifconfig and ping,the result is:
ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:55:64:3E:22:35  
          inet addr:10.66.91.138  Bcast:10.66.91.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33666 errors:0 dropped:0 overruns:0 frame:0
          TX packets:212 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3212514 (3.0 MiB)  TX bytes:25182 (24.5 KiB
ping 10.66.91.160 ,it can't ping to 10.66.91.160

6.Issue command:{"execute":"set_link","arguments":{"name":"e1000-1","up":true}}
the output is:{"return": {}}
ping other host via ping 10.66.91.160,it could ping through to other host.
Comment 17 juzhang 2011-01-13 07:15:43 EST
tested on qemu-kvm-0.12.1.2-2.113.el6,no {"name": "set_link"}.
#{"execute":"query-commands"}
{"return": [{"name": "quit"}, {"name": "eject"}, {"name": "change"}, {"name": "stop"}, {"name": "cont"}, {"name": "system_reset"}, {"name": "system_powerdown"}, {"name": "device_add"}, {"name": "device_del"}, {"name": "cpu"}, {"name": "memsave"}, {"name": "pmemsave"}, {"name": "migrate"}, {"name": "migrate_cancel"}, {"name": "migrate_set_speed"}, {"name": "migrate_set_downtime"}, {"name": "netdev_add"}, {"name": "netdev_del"}, {"name": "balloon"}, {"name": "getfd"}, {"name": "closefd"}, {"name": "block_passwd"}, {"name": "qmp_capabilities"}, {"name": "__com.redhat_drive_add"}, {"name": "__com.redhat_set_password"}, {"name": "__com.redhat_spice_migrate_info"}, {"name": "query-version"}, {"name": "query-commands"}, {"name": "query-chardev"}, {"name": "query-block"}, {"name": "query-blockstats"}, {"name": "query-cpus"}, {"name": "query-hpet"}, {"name": "query-kvm"}, {"name": "query-status"}, {"name": "query-mice"}, {"name": "query-vnc"}, {"name": "query-name"}, {"name": "query-uuid"}, {"name": "query-migrate"}, {"name": "query-balloon"}]}


on qemu-kvm-0.12.1.2-2.123.el6,have {"name": "set_link"}.
#{"execute":"query-commands"}
"return": [{"name": "quit"}, {"name": "eject"}, {"name": "change"}, {"name": "stop"}, {"name": "cont"}, {"name": "system_reset"}, {"name": "system_powerdown"}, {"name": "device_add"}, {"name": "device_del"}, {"name": "cpu"}, {"name": "memsave"}, {"name": "pmemsave"}, {"name": "migrate"}, {"name": "migrate_cancel"}, {"name": "migrate_set_speed"}, {"name": "migrate_set_downtime"}, {"name": "netdev_add"}, {"name": "netdev_del"}, {"name": "balloon"}, {"name": "set_link"}, {"name": "getfd"}, {"name": "closefd"}, {"name": "block_passwd"}, {"name": "qmp_capabilities"}, {"name": "__com.redhat_drive_add"}, {"name": "__com.redhat_set_password"}, {"name": "__com.redhat_spice_migrate_info"}, {"name": "query-version"}, {"name": "query-commands"}, {"name": "query-chardev"}, {"name": "query-block"}, {"name": "query-blockstats"}, {"name": "query-cpus"}, {"name": "query-hpet"}, {"name": "query-kvm"}, {"name": "query-status"}, {"name": "query-mice"}, {"name": "query-vnc"}, {"name": "query-name"}, {"name": "query-uuid"}, {"name": "query-migrate"}, {"name": "query-balloon"}]}
{"timestamp": {"seconds": 1294921064, "microseconds": 212038}, "event": "RESET"}
Comment 19 Luiz Capitulino 2011-05-05 13:49:42 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
IMPORTANT: this is an internal interface consumed only by libvirt. Users should only know about libvirt related impact and new functionality (which is not described here).

Cause: The set_link command is not available in QMP.

Consequence: There's no way to change the network link status through QMP.

Change: Add the set_link command to QMP.

Result: It's now possible to change the network link status through QMP.
Comment 20 errata-xmlrpc 2011-05-19 07:34:16 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html
Comment 21 errata-xmlrpc 2011-05-19 08:47:45 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html

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