Bug 1125792 - Add vmstate json representation files for RHEL6 releases to source tree
Summary: Add vmstate json representation files for RHEL6 releases to source tree
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1126377 1126379 1129217
TreeView+ depends on / blocked
 
Reported: 2014-08-01 04:39 UTC by Amit Shah
Modified: 2014-10-14 07:03 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.437.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1126377 1129217 (view as bug list)
Environment:
Last Closed: 2014-10-14 07:03:27 UTC


Attachments (Terms of Use)
Output of "./scripts/vmschk-check-rhel6.py -c ./scripts/vmstate-static-checker.py" (50.36 KB, text/plain)
2014-08-15 08:44 UTC, Qunfang Zhang
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1490 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2014-10-14 01:28:27 UTC

Description Amit Shah 2014-08-01 04:39:08 UTC
Description of problem:

VMstate json representations of older RHEL6 releases should be added to the qemu source tree.  This will facilitate checking of migration compatibility that the static checker is capable of performing.

These files will be placed in the tests/vmstate-static-checker-data/ directory.  The nomenclature, subject to change, is:

rhel60-60.json

Which means this json was produced on a rhel6.0 build, with the 6.0 machine type.

rhel61-60.json

means this json was produced on rhel6.1 build with the 6.0 machine type.

Since we only have one machine type option on RHEL6, this naming scheme suffices.

New test cases are to be added to the QE test plan which runs the static checker python script (most likely from the upstream tree) and ensures no regressions are being added to the development version of RHEL6.

The testing can be automated, and can be added to autotest, as well as nightly scripts.  Release maintainers can do this at git tagging time as well.

These files will be placed in the RHEL7 tree as well, to facilitate RHEL6->RHEL7 testing.

Comment 2 Amit Shah 2014-08-12 10:32:34 UTC
The patches that were posted and acked had slightly different names for the json files:

> These files will be placed in the tests/vmstate-static-checker-data/
> directory.  The nomenclature, subject to change, is:
> 
> rhel60-60.json

Instead of this, we used

rhel60,rhel6.0.0.json

> Which means this json was produced on a rhel6.0 build, with the 6.0 machine
> type.
> 
> rhel61-60.json

instead of this, we used

rhel61-rhel6.0.0.json

> means this json was produced on rhel6.1 build with the 6.0 machine type.

Comment 3 Jeff Nelson 2014-08-13 06:41:47 UTC
Fix included in qemu-kvm-0.12.1.2-2.437.el6

Comment 5 Qunfang Zhang 2014-08-14 09:37:14 UTC
Hi, Amit

I'm testing the latest qemu-kvm-0.12.1.2-2.438.el6.src.rpm version. It always shows "Compared 0 jsons" in the output, could you help me have a look?  Thanks!

Steps:
1. Download the qemu-kvm-0.12.1.2-2.438.el6.src.rpm and install it on the rhel6.6 host. 
# rpm -ivh qemu-kvm-0.12.1.2-2.438.el6.src.rpm
# cd rpmbuild
# rpm -bp --nodeps SPECS/qemu-kvm.spec
# cd BUILD/qemu-kvm-0.12.1.2/
# cd  tests/vmstate-static-checker-data/
# ls 

dump1.json             rhel63,rhel6.2.0.json  rhel65,rhel6.3.0.json
dump2.json             rhel63,rhel6.3.0.json  rhel65,rhel6.4.0.json
rhel60,rhel6.0.0.json  rhel64,rhel6.0.0.json  rhel65,rhel6.5.0.json
rhel61,rhel6.0.0.json  rhel64,rhel6.1.0.json  rhel66,rhel6.0.0.json
rhel61,rhel6.1.0.json  rhel64,rhel6.2.0.json  rhel66,rhel6.1.0.json
rhel62,rhel6.0.0.json  rhel64,rhel6.3.0.json  rhel66,rhel6.2.0.json
rhel62,rhel6.1.0.json  rhel64,rhel6.4.0.json  rhel66,rhel6.3.0.json
rhel62,rhel6.2.0.json  rhel65,rhel6.0.0.json  rhel66,rhel6.4.0.json
rhel63,rhel6.0.0.json  rhel65,rhel6.1.0.json  rhel66,rhel6.5.0.json
rhel63,rhel6.1.0.json  rhel65,rhel6.2.0.json  rhel66,rhel6.6.0.json

2. ../../scripts/vmschk-check-rhel6.py -c ../../scripts/vmstate-static-checker.py  (I re-installed a python2.7 since the current python2.6 installed on rhel6 host does not include the argparse)

Result:


[root@localhost vmstate-static-checker-data]# ../../scripts/vmschk-check-rhel6.py -c ../../scripts/vmstate-static-checker.py 
Compared 0 jsons

[root@localhost vmstate-static-checker-data]# ../../scripts/vmschk-check-rhel6.py -c ../../scripts/vmstate-static-checker.py  -s 3 -d 4
Compared 0 jsons for source rhel6.3 to dest rhel6.4

[root@localhost vmstate-static-checker-data]# ../../scripts/vmschk-check-rhel6.py -c ../../scripts/vmstate-static-checker.py  -s 5 -d 6
Compared 0 jsons for source rhel6.5 to dest rhel6.6

[root@localhost vmstate-static-checker-data]# ../../scripts/vmschk-check-rhel6.py -c ../../scripts/vmstate-static-checker.py -m 4
Compared 0 jsons for machine type rhel6.4.0

[root@localhost vmstate-static-checker-data]# ../../scripts/vmschk-check-rhel6.py -c ../../scripts/vmstate-static-checker.py -m 6
Compared 0 jsons for machine type rhel6.6.0


Amit, could you give me some instruction? 

Thanks!
Qunfang

Comment 6 Amit Shah 2014-08-14 10:30:29 UTC
You need to install python-argparse from the repos to get that functionality; no need to use python-2.7 or non-rhel version of python.

If you run the script from the qemu dir, you can run without any cmdline options.  If you run it from the tests/ directory, you can specify the -p option (path) to point to current dir. eg:

../../scripts/vmschk-check-rhel6.py -c ../../scripts/vmstate-static-checker.py -p .

or just:

cd BUILD/qemu-kvm-0.12.1.2/
/scripts/vmschk-check-rhel6.py -c

Comment 7 Amit Shah 2014-08-14 10:31:27 UTC
(In reply to Amit Shah from comment #2)
> The patches that were posted and acked had slightly different names for the
> json files:
> 
> > These files will be placed in the tests/vmstate-static-checker-data/
> > directory.  The nomenclature, subject to change, is:
> > 
> > rhel60-60.json
> 
> Instead of this, we used
> 
> rhel60,rhel6.0.0.json
> 
> > Which means this json was produced on a rhel6.0 build, with the 6.0 machine
> > type.
> > 
> > rhel61-60.json
> 
> instead of this, we used
> 
> rhel61-rhel6.0.0.json

Typo; we used

rhel61,rhel6.0.0.json

> > means this json was produced on rhel6.1 build with the 6.0 machine type.

Comment 8 Qunfang Zhang 2014-08-15 08:43:35 UTC
(In reply to Amit Shah from comment #6)
> You need to install python-argparse from the repos to get that
> functionality; no need to use python-2.7 or non-rhel version of python.
> 
> If you run the script from the qemu dir, you can run without any cmdline
> options.  If you run it from the tests/ directory, you can specify the -p
> option (path) to point to current dir. eg:
> 
> ../../scripts/vmschk-check-rhel6.py -c
> ../../scripts/vmstate-static-checker.py -p .
> 
> or just:
> 
> cd BUILD/qemu-kvm-0.12.1.2/
> /scripts/vmschk-check-rhel6.py -c

Hi, Amit

Thanks for the reply. I retest with your comment and get the comparison output.  I will upload an attachment.  From the output, the functionality of this bug works. And there's no error when comparing the json file between newer rhel6.4/rhel6.5 host and rhel6.6 host with various machine type.  My question is for the other errors (1) "between rhel6.6 host and the host older than rhel6.4" (2) "between older hosts (rhel6.6 not involved)", do we need to file bugs about it? 
My understanding is at least no need for the (2).  What's your opinion? 

Thanks,
Qunfang

Comment 9 Qunfang Zhang 2014-08-15 08:44:27 UTC
Created attachment 927030 [details]
Output of "./scripts/vmschk-check-rhel6.py -c ./scripts/vmstate-static-checker.py"

Comment 10 Amit Shah 2014-08-19 07:43:09 UTC
(In reply to Qunfang Zhang from comment #8)
> Hi, Amit
> 
> Thanks for the reply. I retest with your comment and get the comparison
> output.  I will upload an attachment.  From the output, the functionality of
> this bug works. And there's no error when comparing the json file between
> newer rhel6.4/rhel6.5 host and rhel6.6 host with various machine type.  My
> question is for the other errors (1) "between rhel6.6 host and the host
> older than rhel6.4" (2) "between older hosts (rhel6.6 not involved)", do we
> need to file bugs about it? 
> My understanding is at least no need for the (2).  What's your opinion? 

Right, we should not be concerned about hosts where 6.5 or 6.6 is not involved at this stage.

For older failures, e.g. with machine type rhel-6.3.0:

$ ./scripts/vmschk-check-rhel6.py -m 3
Comparing tests/vmstate-static-checker-data/rhel63,rhel6.3.0.json with tests/vmstate-static-checker-data/rhel64,rhel6.3.0.json
Section "usb-ccid", Description "usb-ccid": expected field "abProtocolDataStructure", got "abProtocolDataStructure.data"; skipping rest
Section "usb-host" Section "usb-host" Description "usb-host": minimum version error: 0 < 1
Section "ich9-usb-ehci1" Section "ich9-usb-ehci1" Description "ehci": minimum version error: 0 < 1
Section "usb-ehci" Section "usb-ehci" Description "ehci": minimum version error: 0 < 1
--> 4 errors comparing -M rhel6.3.0 from rhel63 to rhel64
--------------------------------------------------------
Comparing tests/vmstate-static-checker-data/rhel63,rhel6.3.0.json with tests/vmstate-static-checker-data/rhel65,rhel6.3.0.json
Section "usb-ccid", Description "usb-ccid": expected field "abProtocolDataStructure", got "abProtocolDataStructure.data"; skipping rest
Section "usb-host" Section "usb-host" Description "usb-host": minimum version error: 0 < 1
Section "ich9-usb-ehci1" Section "ich9-usb-ehci1" Description "ehci": minimum version error: 0 < 1
Section "usb-ehci" Section "usb-ehci" Description "ehci": minimum version error: 0 < 1
--> 4 errors comparing -M rhel6.3.0 from rhel63 to rhel65
--------------------------------------------------------
Comparing tests/vmstate-static-checker-data/rhel64,rhel6.3.0.json with tests/vmstate-static-checker-data/rhel65,rhel6.3.0.json
Comparing tests/vmstate-static-checker-data/rhel63,rhel6.3.0.json with tests/vmstate-static-checker-data/rhel66,rhel6.3.0.json
Section "usb-ccid", Description "usb-ccid": expected field "abProtocolDataStructure", got "abProtocolDataStructure.data"; skipping rest
Section "usb-host" Section "usb-host" Description "usb-host": minimum version error: 0 < 1
Section "ich9-usb-ehci1" Section "ich9-usb-ehci1" Description "ehci": minimum version error: 0 < 1
Section "usb-ehci" Section "usb-ehci" Description "ehci": minimum version error: 0 < 1
--> 4 errors comparing -M rhel6.3.0 from rhel63 to rhel66
--------------------------------------------------------
Comparing tests/vmstate-static-checker-data/rhel64,rhel6.3.0.json with tests/vmstate-static-checker-data/rhel66,rhel6.3.0.json
Comparing tests/vmstate-static-checker-data/rhel65,rhel6.3.0.json with tests/vmstate-static-checker-data/rhel66,rhel6.3.0.json
Compared 6 jsons for machine type rhel6.3.0

We again can't really do anything, since rhel6.4.0's -M rhel6.3.0 has the same errors as rhel6.6.0's -M rhel6.3.0.

For any new releases, we should ensure such errors do not creep in.  Also, not all devices were in supported status at the time of 6.3.0 in that example -- I doubt we supported usb-ehci, where most of those errors are, in 6.3.0.  So it works out in practice.

Comment 11 Amit Shah 2014-08-19 07:45:03 UTC
The script also has a help message:

$ ./scripts/vmschk-check-rhel6.py --help
usage: vmschk-check-rhel6.py [-h] [-p PATH] [-c CMD] [-m MACHINE] [-s SRC]
                             [-d DEST] [-b]

compare machine types

optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  directory that holds RHEL6 json files
  -c CMD, --cmd CMD     path to vmstate-static-checker.py script
  -m MACHINE, --machine MACHINE
                        machine type to compare; only provide the Y in RHELX.Y
                        release, e.g. 3 for rhel-6.3.0
  -s SRC, --src SRC     src qemu version to compare; only provide the Y in
                        RHELX.Y release, e.g. 0 for rhel-6.0
  -d DEST, --dest DEST  dest qemu version to compare; only provide the Y in
                        RHELX.Y release, e.g. 5 for rhel-6.5
  -b, --backward        test backward migration as well


This shows we can use custom source, destination and machine type arguments to compare specific versions instead of comparing everything.

Also, the -b switch can be enabled to also test backward migration (i.e. higher source to lower destination, e.g. rhel6.6->rhel6.3, but with -M rhel6.3.0).

Comment 12 Qunfang Zhang 2014-08-21 08:11:10 UTC
Thanks Amit's comment. Based on above, we will check the following two items to ensure whether the bug is verified pass (or whether the things work well).

1. For any new releases, we should ensure the errors do not creep in. For example, if there's no error when compare the result between rhel6.4 and rhel6.5, then there should be no error between rhel6.4 and rhel6.6.

And if migration between rhel6.x and rhel6.(x+1) failed, then it is acceptable for migration failure between rhel6.x and rhel6.(x+2).

And according to the test reuslt in comment 9, the issue does not exist.  We could also check with each machine type separately:

./scripts/vmschk-check-rhel6.py -c ./scripts/vmstate-static-checker.py  -m {0,1,2,3,4,5}

2.  We don't want new errors happen between rhel6.5 and rhel6.6 hosts with all the supported machine type.

[root@localhost qemu-kvm-0.12.1.2]# ./scripts/vmschk-check-rhel6.py -b -c ./scripts/vmstate-static-checker.py -s 6 -d 5 
Comparing tests/vmstate-static-checker-data/rhel66,rhel6.0.0.json with tests/vmstate-static-checker-data/rhel65,rhel6.0.0.json
Comparing tests/vmstate-static-checker-data/rhel66,rhel6.1.0.json with tests/vmstate-static-checker-data/rhel65,rhel6.1.0.json
Comparing tests/vmstate-static-checker-data/rhel66,rhel6.2.0.json with tests/vmstate-static-checker-data/rhel65,rhel6.2.0.json
Comparing tests/vmstate-static-checker-data/rhel66,rhel6.3.0.json with tests/vmstate-static-checker-data/rhel65,rhel6.3.0.json
Comparing tests/vmstate-static-checker-data/rhel66,rhel6.4.0.json with tests/vmstate-static-checker-data/rhel65,rhel6.4.0.json
Comparing tests/vmstate-static-checker-data/rhel66,rhel6.5.0.json with tests/vmstate-static-checker-data/rhel65,rhel6.5.0.json
Compared 6 jsons for source rhel6.6 to dest rhel6.5 with backward migration checking enabled

[root@localhost qemu-kvm-0.12.1.2]# 
[root@localhost qemu-kvm-0.12.1.2]# ./scripts/vmschk-check-rhel6.py -c ./scripts/vmstate-static-checker.py -s 5 -d 6
Comparing tests/vmstate-static-checker-data/rhel65,rhel6.0.0.json with tests/vmstate-static-checker-data/rhel66,rhel6.0.0.json
Comparing tests/vmstate-static-checker-data/rhel65,rhel6.1.0.json with tests/vmstate-static-checker-data/rhel66,rhel6.1.0.json
Comparing tests/vmstate-static-checker-data/rhel65,rhel6.2.0.json with tests/vmstate-static-checker-data/rhel66,rhel6.2.0.json
Comparing tests/vmstate-static-checker-data/rhel65,rhel6.3.0.json with tests/vmstate-static-checker-data/rhel66,rhel6.3.0.json
Comparing tests/vmstate-static-checker-data/rhel65,rhel6.4.0.json with tests/vmstate-static-checker-data/rhel66,rhel6.4.0.json
Comparing tests/vmstate-static-checker-data/rhel65,rhel6.5.0.json with tests/vmstate-static-checker-data/rhel66,rhel6.5.0.json
Compared 6 jsons for source rhel6.5 to dest rhel6.6

3. We should not be concerned about hosts where 6.5 or 6.6 is not involved at this stage.

Based on above, this bug could be verified.

Comment 13 Qunfang Zhang 2014-08-21 08:17:25 UTC
(In reply to Qunfang Zhang from comment #12)
> Thanks Amit's comment. Based on above, we will check the following two items
> to ensure whether the bug is verified pass (or whether the things work well).

Correction:
Should be 3 items. And the qemu-kvm version I tested is: 
qemu-kvm-0.12.1.2-2.438.el6.src.rpm

> 
> 1. For any new releases, we should ensure the errors do not creep in. For
> example, if there's no error when compare the result between rhel6.4 and
> rhel6.5, then there should be no error between rhel6.4 and rhel6.6.
> 
> And if migration between rhel6.x and rhel6.(x+1) failed, then it is
> acceptable for migration failure between rhel6.x and rhel6.(x+2).
> 
> And according to the test reuslt in comment 9, the issue does not exist.  We
> could also check with each machine type separately:
> 
> ./scripts/vmschk-check-rhel6.py -c ./scripts/vmstate-static-checker.py  -m
> {0,1,2,3,4,5}
> 
> 2.  We don't want new errors happen between rhel6.5 and rhel6.6 hosts with
> all the supported machine type.
> 
> [root@localhost qemu-kvm-0.12.1.2]# ./scripts/vmschk-check-rhel6.py -b -c
> ./scripts/vmstate-static-checker.py -s 6 -d 5 
> Comparing tests/vmstate-static-checker-data/rhel66,rhel6.0.0.json with
> tests/vmstate-static-checker-data/rhel65,rhel6.0.0.json
> Comparing tests/vmstate-static-checker-data/rhel66,rhel6.1.0.json with
> tests/vmstate-static-checker-data/rhel65,rhel6.1.0.json
> Comparing tests/vmstate-static-checker-data/rhel66,rhel6.2.0.json with
> tests/vmstate-static-checker-data/rhel65,rhel6.2.0.json
> Comparing tests/vmstate-static-checker-data/rhel66,rhel6.3.0.json with
> tests/vmstate-static-checker-data/rhel65,rhel6.3.0.json
> Comparing tests/vmstate-static-checker-data/rhel66,rhel6.4.0.json with
> tests/vmstate-static-checker-data/rhel65,rhel6.4.0.json
> Comparing tests/vmstate-static-checker-data/rhel66,rhel6.5.0.json with
> tests/vmstate-static-checker-data/rhel65,rhel6.5.0.json
> Compared 6 jsons for source rhel6.6 to dest rhel6.5 with backward migration
> checking enabled
> 
> [root@localhost qemu-kvm-0.12.1.2]# 
> [root@localhost qemu-kvm-0.12.1.2]# ./scripts/vmschk-check-rhel6.py -c
> ./scripts/vmstate-static-checker.py -s 5 -d 6
> Comparing tests/vmstate-static-checker-data/rhel65,rhel6.0.0.json with
> tests/vmstate-static-checker-data/rhel66,rhel6.0.0.json
> Comparing tests/vmstate-static-checker-data/rhel65,rhel6.1.0.json with
> tests/vmstate-static-checker-data/rhel66,rhel6.1.0.json
> Comparing tests/vmstate-static-checker-data/rhel65,rhel6.2.0.json with
> tests/vmstate-static-checker-data/rhel66,rhel6.2.0.json
> Comparing tests/vmstate-static-checker-data/rhel65,rhel6.3.0.json with
> tests/vmstate-static-checker-data/rhel66,rhel6.3.0.json
> Comparing tests/vmstate-static-checker-data/rhel65,rhel6.4.0.json with
> tests/vmstate-static-checker-data/rhel66,rhel6.4.0.json
> Comparing tests/vmstate-static-checker-data/rhel65,rhel6.5.0.json with
> tests/vmstate-static-checker-data/rhel66,rhel6.5.0.json
> Compared 6 jsons for source rhel6.5 to dest rhel6.6
> 
> 3. We should not be concerned about hosts where 6.5 or 6.6 is not involved
> at this stage.
> 
> Based on above, this bug could be verified.

Comment 15 errata-xmlrpc 2014-10-14 07:03:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1490.html


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