[libvirt] Question about the specification of "virsh vcpupin" and "virsh vcpuinfo" in libvirt-0.6.1.

Hi, I have questions. I would like to know the specification of "virsh vcpupin" and "virsh vcpuinfo" in libvirt-0.6.1. "virsh vcpupin" and "virsh vcpuinfo" can not be executed to inactive domains. I think it is the specification. Is it correct ? I would like to know whether the libvirt-community have a support plan for pinning inactive domains or not. Because "xm vcpu-pin" and "vcpu-list" can be excuted to inactive domains in Xen3.3. Thanks, Tomohiro Takahashi

On Wed, Apr 01, 2009 at 03:53:16PM +0900, Takahashi Tomohiro wrote:
Hi,
I have questions.
I would like to know the specification of "virsh vcpupin" and "virsh vcpuinfo" in libvirt-0.6.1. "virsh vcpupin" and "virsh vcpuinfo" can not be executed to inactive domains. I think it is the specification. Is it correct ?
virsh doesn't place any restrictions on whether those commands can be run on inactive guests. It should just try the API regardless and be prepared for any errors.
I would like to know whether the libvirt-community have a support plan for pinning inactive domains or not. Because "xm vcpu-pin" and "vcpu-list" can be excuted to inactive domains in Xen3.3.
If XenD supports this then it should be just a matter of removing the check from xend_internal.c PinVcpu method if (domain->id < 0) { virXendError(domain->conn, VIR_ERR_INVALID_ARG, _("Domain %s isn't running."), domain->name); return(-1); } Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Hi Daniel-san, Thank you for your reply.
virsh doesn't place any restrictions on whether those commands can be run on inactive guests. It should just try the API regardless and be prepared for any errors.
I see. I think that I should remove the following check from xend_internal.c PinVcpu method. Because the latest Xen supports this. So, I made the patch that corrected the following problem. "virsh vcpupin" and "virsh vcpuinfo" can not be executed to inactive domains.
If XenD supports this then it should be just a matter of removing the check from xend_internal.c PinVcpu method
if (domain->id < 0) { virXendError(domain->conn, VIR_ERR_INVALID_ARG, _("Domain %s isn't running."), domain->name); return(-1); }
Signed-off-by: Tomohiro Takahashi <takatom@jp.fujitsu.com> Thanks, Tomohiro Takahashi Daniel P. Berrange wrote:
On Wed, Apr 01, 2009 at 03:53:16PM +0900, Takahashi Tomohiro wrote:
Hi,
I have questions.
I would like to know the specification of "virsh vcpupin" and "virsh vcpuinfo" in libvirt-0.6.1. "virsh vcpupin" and "virsh vcpuinfo" can not be executed to inactive domains. I think it is the specification. Is it correct ?
virsh doesn't place any restrictions on whether those commands can be run on inactive guests. It should just try the API regardless and be prepared for any errors.
I would like to know whether the libvirt-community have a support plan for pinning inactive domains or not. Because "xm vcpu-pin" and "vcpu-list" can be excuted to inactive domains in Xen3.3.
If XenD supports this then it should be just a matter of removing the check from xend_internal.c PinVcpu method
if (domain->id < 0) { virXendError(domain->conn, VIR_ERR_INVALID_ARG, _("Domain %s isn't running."), domain->name); return(-1); }
Daniel
--- xend_internal.c.orig 2009-04-07 21:50:17.000000000 +0900 +++ xend_internal.c 2009-04-11 00:53:48.000000000 +0900 @@ -3776,11 +3776,6 @@ xenDaemonDomainPinVcpu(virDomainPtr doma return (-1); } - if (domain->id < 0) { - virXendError(domain->conn, VIR_ERR_INVALID_ARG, - _("Domain %s isn't running."), domain->name); - return(-1); - } /* from bit map, build character string of mapped CPU numbers */ for (i = 0; i < maplen; i++) for (j = 0; j < 8; j++) @@ -3834,8 +3829,6 @@ xenDaemonDomainGetVcpus(virDomainPtr dom __FUNCTION__); return (-1); } - if (domain->id < 0) - return(-1); root = sexpr_get(domain->conn, "/xend/domain/%s?op=vcpuinfo", domain->name); if (root == NULL)

Hi, Would you give me a comment on this patch? If not, please apply it. Thanks, Tomohiro Takahashi. Takahashi Tomohiro wrote:
Hi Daniel-san,
Thank you for your reply.
virsh doesn't place any restrictions on whether those commands can be run on inactive guests. It should just try the API regardless and be prepared for any errors.
I see. I think that I should remove the following check from xend_internal.c PinVcpu method. Because the latest Xen supports this.
So, I made the patch that corrected the following problem. "virsh vcpupin" and "virsh vcpuinfo" can not be executed to inactive domains.
If XenD supports this then it should be just a matter of removing the check from xend_internal.c PinVcpu method
if (domain->id < 0) { virXendError(domain->conn, VIR_ERR_INVALID_ARG, _("Domain %s isn't running."), domain->name); return(-1); }
Signed-off-by: Tomohiro Takahashi <takatom@jp.fujitsu.com>
Thanks, Tomohiro Takahashi
Daniel P. Berrange wrote:
On Wed, Apr 01, 2009 at 03:53:16PM +0900, Takahashi Tomohiro wrote:
Hi,
I have questions.
I would like to know the specification of "virsh vcpupin" and "virsh vcpuinfo" in libvirt-0.6.1. "virsh vcpupin" and "virsh vcpuinfo" can not be executed to inactive domains. I think it is the specification. Is it correct ?
virsh doesn't place any restrictions on whether those commands can be run on inactive guests. It should just try the API regardless and be prepared for any errors.
I would like to know whether the libvirt-community have a support plan for pinning inactive domains or not. Because "xm vcpu-pin" and "vcpu-list" can be excuted to inactive domains in Xen3.3.
If XenD supports this then it should be just a matter of removing the check from xend_internal.c PinVcpu method
if (domain->id < 0) { virXendError(domain->conn, VIR_ERR_INVALID_ARG, _("Domain %s isn't running."), domain->name); return(-1); }
Daniel
------------------------------------------------------------------------
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Tue, Apr 14, 2009 at 04:40:46PM +0900, Takahashi Tomohiro wrote:
Hi Daniel-san,
Thank you for your reply.
virsh doesn't place any restrictions on whether those commands can be run on inactive guests. It should just try the API regardless and be prepared for any errors.
I see. I think that I should remove the following check from xend_internal.c PinVcpu method. Because the latest Xen supports this.
So, I made the patch that corrected the following problem. "virsh vcpupin" and "virsh vcpuinfo" can not be executed to inactive domains.
Sorry for the delay, I forgot about that patch !
If XenD supports this then it should be just a matter of removing the check from xend_internal.c PinVcpu method
if (domain->id < 0) { virXendError(domain->conn, VIR_ERR_INVALID_ARG, _("Domain %s isn't running."), domain->name); return(-1); }
Signed-off-by: Tomohiro Takahashi <takatom@jp.fujitsu.com>
Looks fine, we delegate to xend, and error return codes seems checked in both routines, So applied and commited to CVS, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Takahashi Tomohiro