Re: [libvirt] [PATCH] Fix the style of argument("cpumap") in op_pincpu()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan & Daniel,

Daniel Veillard wrote:
>>> The form of cpumap argument in op_pincpu method on xend change
>>> by following a patch.
>>>    http://xenbits.xensource.com/xen-unstable.hg?rev/a63d20d7a941
>>>
>>> xenDaemonDomainPinCpu() sends the string for cpumap argument
>>> like python's list style now.
>>> This patch is following the change of cpumap argument.
>>>    "[0,1,2]"    --->    "0,1,2"
>> If we switch to the new format, does that still work with older
>> XenD ?
>
>    Yup I had the same question when reading the description, if not
> we need to make that conditional on xen version.

The older xend's behavior is not affected change the cpumap
format, because the older xend works incorrectly by the xend's
cpumap format bug.
The new xend(no cpumap format bug) and the current libvirt
cpumap format occurred error.
The new xend and the new libvirt cpumap format works fine.

Therefor, I think that we don't need to make that conditional
on xen version.



The test result of verifying the xend and the cpumap format is
described as follows.

* xen-unstable
Set cpu affinity used by xenDaemonDomainPinCpu():
# set xenHypervisorPinVcpu() always return -1 for test
         | libvirt             | libvirt
         | current format      | new format
         +----------+----------+----------+----------
         | old xend | new xend | old xend | new xend
---------+----------+----------+----------+----------
inactive |    (1)   |   (3)    |   (5)    |    (7)
  domain |    NG1   |   NG2    |   NG1    |    OK
---------+----------+----------+----------+----------
  active |    (2)   |   (4)    |   (6)    |    (8)
  domain |    NG1   |   NG2    |   NG1    |    OK

old xend: before xen-unstable changeset 19579
new xend: after  xen-unstable changeset 19580

OK : virsh command end normaly and
     set cpu affinity.
NG1: virsh command end normaly, but
     can't set cpu affinity.
NG2: virsh command end with show error msg.

Result (1),(2) is the same as result (5),(6).

* F8
Set cpu affinity used by xenDaemonDomainPinCpu():
# set xenHypervisorPinVcpu() always return -1 for test
         | libvirt           | libvirt
         | current format    | new format
---------+-------------------+------------------
inactive |        (1)        |        (3)
  domain |        NG2        |        NG2
---------+-------------------+------------------
  active |        (2)        |        (4)
  domain |        NG1        |        NG1


NG1: virsh command end normaly, but
     can't set cpu affinity.
NG2: virsh command end with show error msg.

Result (1),(2) is the same as result (3),(4).

* RHEL5.3
Set cpu affinity used by xenDaemonDomainPinCpu():
# set xenHypervisorPinVcpu() and XmDomainPinVcpu()
# always return -1 for test
         | libvirt           | libvirt
         | current format    | new format
---------+-------------------+------------------
inactive |        (1)        |        (3)
  domain |        NG2        |        NG2
---------+-------------------+------------------
  active |        (2)        |        (4)
  domain |        NG1        |        NG1

NG1: virsh command end normaly, but
     can't set cpu affinity.
NG2: virsh command end with show error msg.

Result (1),(2) is the same as result (3),(4).

# The each command log is attached.

Thakns,
Tatsuro Enokura


(1)  command end normaly but can't set cpu affnity.

[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                        0                   0.0 any cpu
[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            -1
State:          offline
CPU Affinity:   yyyyyyyy

[root@vmx07 .libs]# virsh vcpupin vm1 0 0,1

[root@vmx07 .libs]# echo $?
0

[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
Error: Invalid argument.
Usage: xm vcpu-list [Domain, ...]

List the VCPUs for all/some domains.
[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            -1
State:          offline
CPU Affinity:   --------


(2) command end normaly but can't set cpu affnity.
[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 22     0     3   r--      18.0 any cpu
[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            0
State:          running
CPU time:       23.8s
CPU Affinity:   yyyyyyyy

[root@vmx07 .libs]# virsh vcpupin vm1 0 0,1

[root@vmx07 .libs]# echo $?
0
[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 22     0     2   r--      36.6 any cpu
[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            0
State:          idle
CPU time:       39.9s
CPU Affinity:   yyyyyyyy


(3) command end with show error msg.
[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                        0                   0.0 any cpu

[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            -1
State:          offline
CPU Affinity:   yyyyyyyy


[root@vmx07 .libs]# virsh vcpupin vm1 0 0,1
error: POST operation failed: xend_post: error from xen daemon: (xend.err 'invalid literal for int(): [0')

[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                        0                   0.0 any cpu

[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            -1
State:          offline
CPU Affinity:   yyyyyyyy



(4) command end with show error msg.
[root@vmx07 .libs]# virsh start vm1
Domain vm1 started

[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 19     0     2   r--      21.4 any cpu
[root@vmx07 .libs]# virsh vcpupin vm1 0 0,1
error: POST operation failed: xend_post: error from xen daemon: (xend.err 'invalid literal for int(): [0')

[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 19     0     4   -b-      33.9 any cpu

[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            0
State:          running
CPU time:       33.9s
CPU Affinity:   yyyyyyyy


(5)  command end normaly but can't set cpu affnity.
[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                        0                   0.0 any cpu
[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            -1
State:          offline
CPU Affinity:   yyyyyyyy

[root@vmx07 .libs]# virsh vcpupin vm1 0 0,1

[root@vmx07 .libs]# echo $?
0

[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
Error: Invalid argument.
Usage: xm vcpu-list [Domain, ...]

List the VCPUs for all/some domains.

[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            -1
State:          offline
CPU Affinity:   --------


(6)  command end normaly but can't set cpu affnity.
[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 21     0     6   r--       3.6 any cpu
[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            0
State:          running
CPU time:       18.9s
CPU Affinity:   yyyyyyyy

[root@vmx07 .libs]# virsh vcpupin vm1 0 0,1

[root@vmx07 .libs]# echo $?
0
[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 21     0     4   -b-      42.0 any cpu
[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            7
State:          idle
CPU time:       42.0s
CPU Affinity:   yyyyyyyy


(7) command end normaly and set cpu affnity.
[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                        0                   0.0 any cpu
[root@vmx07 .libs]# virsh vcpupin vm1 0 0,1

[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                        0                   0.0 0-1

[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            -1
State:          offline
CPU Affinity:   yy------



(8) command end normaly and set cpu affnity.
[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 20     0     1   r--      11.3 any cpu
[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            6
State:          running
CPU time:       29.2s
CPU Affinity:   yyyyyyyy


[root@vmx07 .libs]# virsh vcpupin vm1 0 0,1

[root@vmx07 .libs]# echo $?
0
[root@vmx07 .libs]# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 20     0     1   -b-      42.0 0-1
[root@vmx07 .libs]# virsh vcpuinfo vm1
VCPU:           0
CPU:            0
State:          idle
CPU time:       42.0s
CPU Affinity:   yy------
(1)  command end with show error msg.
[root@vmi20 .libs]# xm vcpu-list vm1
Error: Domain 'vm1' does not exist.
Usage: xm vcpu-list [<Domain>]

List the VCPUs for a domain or all domains.
[root@vmi20 .libs]# ./virsh vcpuinfo vm1
error: Domain shut off, virtual CPUs not present.

[root@vmi20 .libs]# 
[root@vmi20 .libs]# 
[root@vmi20 .libs]# ./virsh vcpupin vm1 0 0
xenDaemonDomainPinCpu() in
error: POST operation failed: xend_post: error from xen daemon: No such domain vm1

[root@vmi20 .libs]# xm vcpu-list vm1
Error: Domain 'vm1' does not exist.
Usage: xm vcpu-list [<Domain>]

List the VCPUs for a domain or all domains.
[root@vmi20 .libs]# ./virsh vcpuinfo vm1
error: Domain shut off, virtual CPUs not present.


(2)  command end normaly but can't set cpu affnity.
[root@vmi20 .libs]# xm vcpu-list vm1
Name                              ID VCPUs   CPU State   Time(s) CPU Affinity
vm1                  1     0     0   -b-       5.2 any cpu
vm1                  1     1     0   -b-       3.8 any cpu

[root@vmi20 .libs]# ./virsh vcpuinfo vm1
VCPU:           0
CPU:            0
State:          idle
CPU time:       8.3s
CPU Affinity:   yy

VCPU:           1
CPU:            0
State:          idle
CPU time:       5.6s
CPU Affinity:   yy


[root@vmi20 .libs]# ./virsh vcpupin vm1 0 0

[root@vmi20 .libs]# echo $?
0
[root@vmi20 .libs]# 
[root@vmi20 .libs]# 
[root@vmi20 .libs]# xm vcpu-list vm1
Name                              ID VCPUs   CPU State   Time(s) CPU Affinity
vm1                  1     0     0   -b-       8.4 any cpu
vm1                  1     1     0   -b-       5.6 any cpu
[root@vmi20 .libs]# ./virsh vcpuinfo vm1
VCPU:           0
CPU:            0
State:          idle
CPU time:       8.4s
CPU Affinity:   yy

VCPU:           1
CPU:            0
State:          idle
CPU time:       5.6s
CPU Affinity:   yy



(3)  command end with show error msg.
[root@vmi20 .libs]# xm vcpu-list vm1
Error: Domain 'vm1' does not exist.
Usage: xm vcpu-list [<Domain>]

List the VCPUs for a domain or all domains.
[root@vmi20 .libs]# 
[root@vmi20 .libs]# ./virsh vcpuinfo vm1
error: Domain shut off, virtual CPUs not present.

[root@vmi20 .libs]# ./virsh vcpupin vm1 0 0
error: POST operation failed: xend_post: error from xen daemon: No such domain vm1

[root@vmi20 .libs]# xm vcpu-list vm1
Error: Domain 'vm1' does not exist.
Usage: xm vcpu-list [<Domain>]

List the VCPUs for a domain or all domains.
[root@vmi20 .libs]# ./virsh vcpuinfo vm1
error: Domain shut off, virtual CPUs not present.



(4)  command end normaly but can't set cpu affnity.
[root@vmi20 .libs]# xm vcpu-list vm1
Name                              ID VCPUs   CPU State   Time(s) CPU Affinity
vm1                  2     0     0   ---       3.1 any cpu
vm1                  2     1     0   r--       3.7 any cpu
[root@vmi20 .libs]# ./virsh vcpuinfo vm1
VCPU:           0
CPU:            0
State:          idle
CPU time:       4.6s
CPU Affinity:   yy

VCPU:           1
CPU:            0
State:          idle
CPU time:       5.0s
CPU Affinity:   yy

[root@vmi20 .libs]# ./virsh vcpupin vm1 0 0

[root@vmi20 .libs]# echo $?
0
[root@vmi20 .libs]# xm vcpu-list vm1
Name                              ID VCPUs   CPU State   Time(s) CPU Affinity
vm1                  2     0     1   -b-       6.5 any cpu
vm1                  2     1     1   -b-       5.9 any cpu
[root@vmi20 .libs]# 
[root@vmi20 .libs]# 
[root@vmi20 .libs]# ./virsh vcpuinfo vm1
VCPU:           0
CPU:            1
State:          idle
CPU time:       6.5s
CPU Affinity:   yy

VCPU:           1
CPU:            1
State:          idle
CPU time:       5.9s
CPU Affinity:   yy
(1)  command end with show error msg.
[root@bx603 .libs]# xm vcpu-list vm1
Error: an integer is required
Usage: xm vcpu-list [<Domain>]

List the VCPUs for a domain or all domains.
[root@bx603 .libs]# ./virsh vcpuinfo vm1
error: Domain shut off, virtual CPUs not present.
error: GET operation failed: 500 status from xen daemon: /xend/domain/vm1?op=vcpuinfo:(xend.err 'an integer is required')

[root@bx603 .libs]# ./virsh vcpupin vm1 0 0,1
error: POST operation failed: xend_post: error from xen daemon: (xend.err "int() argument must be a string or a number, not 'NoneType'")

[root@bx603 .libs]# xm vcpu-list vm1
Error: an integer is required
Usage: xm vcpu-list [<Domain>]

List the VCPUs for a domain or all domains.
[root@bx603 .libs]# ./virsh vcpuinfo vm1
error: Domain shut off, virtual CPUs not present.
error: GET operation failed: 500 status from xen daemon: /xend/domain/vm1?op=vcpuinfo:(xend.err 'an integer is required')


(2)  command end normaly but can't set cpu affnity.
[root@bx603 .libs]# xm vcpu-list vm1
Name                              ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                               19     0     3   -b-       5.1 any cpu
vm1                               19     1     1   r--       4.2 any cpu
[root@bx603 .libs]# ./virsh vcpuinfo vm1
VCPU:           0
CPU:            2
State:          running
CPU time:       5.9s
CPU Affinity:   yyyy

VCPU:           1
CPU:            3
State:          idle
CPU time:       4.8s
CPU Affinity:   yyyy

[root@bx603 .libs]# ./virsh vcpupin vm1 0 0,1

[root@bx603 .libs]# echo $?
0
[root@bx603 .libs]# xm vcpu-list vm1
Name                              ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                               19     0     2   -b-       9.1 any cpu
vm1                               19     1     0   -b-       6.1 any cpu
[root@bx603 .libs]# ./virsh vcpuinfo vm1
VCPU:           0
CPU:            2
State:          idle
CPU time:       9.1s
CPU Affinity:   yyyy

VCPU:           1
CPU:            2
State:          idle
CPU time:       6.1s
CPU Affinity:   yyyy


(3)  command end with show error msg.
[root@bx603 .libs]# xm vcpu-list vm1
Error: an integer is required
Usage: xm vcpu-list [<Domain>]

List the VCPUs for a domain or all domains.
[root@bx603 .libs]# ./virsh vcpuinfo vm1
error: Domain shut off, virtual CPUs not present.
error: GET operation failed: 500 status from xen daemon: /xend/domain/vm1?op=vcpuinfo:(xend.err 'an integer is required')

[root@bx603 .libs]# ./virsh vcpupin vm1 0 0,1
error: POST operation failed: xend_post: error from xen daemon: (xend.err "int() argument must be a string or a number, not 'NoneType'")

[root@bx603 .libs]# echo $?
1
[root@bx603 .libs]# xm vcpu-list vm1
Error: an integer is required
Usage: xm vcpu-list [<Domain>]

List the VCPUs for a domain or all domains.
[root@bx603 .libs]# ./virsh vcpuinfo vm1
error: Domain shut off, virtual CPUs not present.
error: GET operation failed: 500 status from xen daemon: /xend/domain/vm1?op=vcpuinfo:(xend.err 'an integer is required')



(4)  command end normaly but can't set cpu affnity.
[root@bx603 .libs]# xm vcpu-list vm1
Name                              ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                               20     0     1   -b-       5.3 any cpu
vm1                               20     1     2   -b-       5.8 any cpu
[root@bx603 .libs]# ./virsh vcpuinfo vm1
VCPU:           0
CPU:            0
State:          idle
CPU time:       5.3s
CPU Affinity:   yyyy

VCPU:           1
CPU:            2
State:          idle
CPU time:       5.8s
CPU Affinity:   yyyy

[root@bx603 .libs]# ./virsh vcpupin vm1 0 0,1

[root@bx603 .libs]# echo $?
0
[root@bx603 .libs]# xm vcpu-list vm1
Name                              ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                               20     0     2   -b-       9.1 any cpu
vm1                               20     1     2   -b-       7.8 any cpu
[root@bx603 .libs]# ./virsh vcpuinfo vm1
VCPU:           0
CPU:            2
State:          idle
CPU time:       9.1s
CPU Affinity:   yyyy

VCPU:           1
CPU:            1
State:          idle
CPU time:       7.8s
CPU Affinity:   yyyy



--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]