[libvirt] qemudDomainSetMemory() / qemudDomainSetVcpus() error codes

Hello, I noticed qemudDomainSetMemory() / qemudDomainSetVcpus() use the VIR_ERR_INTERNAL_ERROR error code when the caller attempts to set the mem/vcpus of an active domain. In this case, returning something like VIR_ERR_NO_SUPPORT would indicate that this is an invalid call - which would distinguish the error from a failure that occurred during the call. Is it possible to use such a return code to indicate what is supported by QEMU/KVM and what isn't? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Hi, Kaitlin I agree your point. and It should use such an error code. I am looking around the discussion but it is not discussed your point. https://www.redhat.com/archives/libvir-list/2008-March/msg00160.html If any policy exists, I also want to know the reason. Thanks Atsushi SAKAI Kaitlin Rupert <kaitlin@linux.vnet.ibm.com> wrote:
Hello,
I noticed qemudDomainSetMemory() / qemudDomainSetVcpus() use the VIR_ERR_INTERNAL_ERROR error code when the caller attempts to set the mem/vcpus of an active domain.
In this case, returning something like VIR_ERR_NO_SUPPORT would indicate that this is an invalid call - which would distinguish the error from a failure that occurred during the call.
Is it possible to use such a return code to indicate what is supported by QEMU/KVM and what isn't?
Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Thu, Jun 05, 2008 at 03:38:46PM -0700, Kaitlin Rupert wrote:
Hello,
I noticed qemudDomainSetMemory() / qemudDomainSetVcpus() use the VIR_ERR_INTERNAL_ERROR error code when the caller attempts to set the mem/vcpus of an active domain.
In this case, returning something like VIR_ERR_NO_SUPPORT would indicate that this is an invalid call - which would distinguish the error from a failure that occurred during the call.
Yes, that would be a better choice in this scenario. Patches welcomed to changed this :-) Dan. -- |: 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 :|

Daniel P. Berrange wrote:
On Thu, Jun 05, 2008 at 03:38:46PM -0700, Kaitlin Rupert wrote:
Hello,
I noticed qemudDomainSetMemory() / qemudDomainSetVcpus() use the VIR_ERR_INTERNAL_ERROR error code when the caller attempts to set the mem/vcpus of an active domain.
In this case, returning something like VIR_ERR_NO_SUPPORT would indicate that this is an invalid call - which would distinguish the error from a failure that occurred during the call.
Yes, that would be a better choice in this scenario. Patches welcomed to changed this :-)
Dan.
Thanks! Just sent a patch for it. Sorry for the late follow-up. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (3)
-
Atsushi SAKAI
-
Daniel P. Berrange
-
Kaitlin Rupert