[libvirt] two manpage fixups

The following two patches fix up a couple of errors in the virsh manpage. Dave

Fixes bz 639591 --- tools/virsh.pod | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 5b7fa9c..dd3457c 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -696,7 +696,7 @@ If I<--live> is specified, set scheduler information of a running guest. If I<--config> is specified, affect the next boot of a persistent guest. If I<--current> is specified, affect the current guest state. -B<Note>: The cpu_shares parameter has a valid value range of 0-262144; Negative +B<Note>: The cpu_shares parameter has a valid value range of 2-262144; Negative values are wrapped to positive, and larger values are capped at the maximum. Therefore, -1 is a useful shorthand for 262144. -- 1.7.4.4

于 2011年07月26日 09:48, Dave Allan 写道:
Fixes bz 639591 --- tools/virsh.pod | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod index 5b7fa9c..dd3457c 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -696,7 +696,7 @@ If I<--live> is specified, set scheduler information of a running guest. If I<--config> is specified, affect the next boot of a persistent guest. If I<--current> is specified, affect the current guest state.
-B<Note>: The cpu_shares parameter has a valid value range of 0-262144; Negative +B<Note>: The cpu_shares parameter has a valid value range of 2-262144; Negative values are wrapped to positive, and larger values are capped at the maximum. Therefore, -1 is a useful shorthand for 262144.
What Linda commented in the bug is wrong. # echo 2048 > /sys/fs/cgroup/cpu/cpu.shares -bash: echo: write error: Invalid argument # echo 4 > /sys/fs/cgroup/cpu/cpu.shares -bash: echo: write error: Invalid argument The error is not from cgroup. Actually it doesn't report any error and silently set cpu.shares to 2 if the value one passed is lower than 2. But I guess kernel will not think it as a bug, what we can do is improving the doc. But I guess the improvement in this patch doesn't tell the whole truth. # virsh schedinfo test --set cpu_shares=0 Scheduler : posix cpu_shares : 2 Only saying the valid range is 0-2621244 doesn't explain why we still allows 0, but no error, and the cpu.shares is silently set to "2". Regards Osier

On Tue, Jul 26, 2011 at 11:44:37AM +0800, Osier Yang wrote:
于 2011年07月26日 09:48, Dave Allan 写道:
Fixes bz 639591 --- tools/virsh.pod | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod index 5b7fa9c..dd3457c 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -696,7 +696,7 @@ If I<--live> is specified, set scheduler information of a running guest. If I<--config> is specified, affect the next boot of a persistent guest. If I<--current> is specified, affect the current guest state.
-B<Note>: The cpu_shares parameter has a valid value range of 0-262144; Negative +B<Note>: The cpu_shares parameter has a valid value range of 2-262144; Negative values are wrapped to positive, and larger values are capped at the maximum. Therefore, -1 is a useful shorthand for 262144.
What Linda commented in the bug is wrong.
# echo 2048 > /sys/fs/cgroup/cpu/cpu.shares -bash: echo: write error: Invalid argument
# echo 4 > /sys/fs/cgroup/cpu/cpu.shares -bash: echo: write error: Invalid argument
The error is not from cgroup. Actually it doesn't report any error and silently set cpu.shares to 2 if the value one passed is lower than 2.
But I guess kernel will not think it as a bug, what we can do is improving the doc. But I guess the improvement in this patch doesn't tell the whole truth.
# virsh schedinfo test --set cpu_shares=0 Scheduler : posix cpu_shares : 2
Only saying the valid range is 0-2621244 doesn't explain why we still allows 0, but no error, and the cpu.shares is silently set to "2".
Regards Osier
Ok, then self-NAK until we get this sorted out. Dave

The description of the list command seemed to suggest that it could take a set of domains as an argument, which is not correct in the current HEAD. If virsh list is intended to take a list of domains, then this patch should be NAK'd and a bug opened against virsh list. Reported by hachi on #virt --- tools/virsh.pod | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index dd3457c..b72a734 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -268,8 +268,8 @@ Inject NMI to the guest. =item B<list> [I<--inactive> | I<--all>] -Prints information about one or more domains. If no domains are -specified it prints out information about running domains. +Prints information about defined domains. If no options are specified +it prints out information about running domains. An example format for the list is as follows: -- 1.7.4.4

于 2011年07月26日 09:48, Dave Allan 写道:
The description of the list command seemed to suggest that it could take a set of domains as an argument, which is not correct in the current HEAD. If virsh list is intended to take a list of domains, then this patch should be NAK'd and a bug opened against virsh list.
Reported by hachi on #virt --- tools/virsh.pod | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod index dd3457c..b72a734 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -268,8 +268,8 @@ Inject NMI to the guest.
=item B<list> [I<--inactive> | I<--all>]
-Prints information about one or more domains. If no domains are -specified it prints out information about running domains. +Prints information about defined domains.
If no options are specified +it prints out information about running domains.
the transient domains can also be listed. this looks good.
An example format for the list is as follows:

The description of the list command seemed to suggest that it could take a set of domains as an argument, which is not correct in the current HEAD. If virsh list is intended to take a list of domains, then this patch should be NAK'd and a bug opened against virsh list. Reported by hachi on #virt v2: Change language to include transient domains Osier pointed out that transient domains are not defined, so what I had originally proposed wasn't quite correct. --- tools/virsh.pod | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index dd3457c..25c397b 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -268,7 +268,7 @@ Inject NMI to the guest. =item B<list> [I<--inactive> | I<--all>] -Prints information about one or more domains. If no domains are +Prints information about existing domains. If no options are specified it prints out information about running domains. An example format for the list is as follows: -- 1.7.4.4

On 07/25/2011 09:20 PM, Dave Allan wrote:
The description of the list command seemed to suggest that it could take a set of domains as an argument, which is not correct in the current HEAD. If virsh list is intended to take a list of domains, then this patch should be NAK'd and a bug opened against virsh list.
Reported by hachi on #virt
v2:
Change language to include transient domains
+++ b/tools/virsh.pod @@ -268,7 +268,7 @@ Inject NMI to the guest.
=item B<list> [I<--inactive> | I<--all>]
-Prints information about one or more domains. If no domains are +Prints information about existing domains. If no options are specified it prints out information about running domains.
ACK and applied. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (3)
-
Dave Allan
-
Eric Blake
-
Osier Yang