[Libvir] [PATCH] virDomainMigrate version 4 (for discussion only!)
Daniel P. Berrange
berrange at redhat.com
Tue Jul 24 00:33:08 UTC 2007
On Fri, Jul 20, 2007 at 10:58:24AM -0400, Daniel Veillard wrote:
> > + if (resource) {
> > + virXendError (conn, VIR_ERR_NO_SUPPORT,
> > + "xenDaemonDomainMigrate: Xen does not support resource limits during migration");
> > + return -1;
> > + }
>
> Hum, strange, the classical Xen bandwidth during live migration of http
> picture uses a 100Mbps capped transfer, so that ought to work at least
> at some point in the past, weird.
Yeah, it used to be implemented, but got dropped somewhere along the line,
probably in the Xen 2 -> Xen 3 re-write. I wouldn't be surprised if it
comes back again when migrate in XenD is next touched.
> > + if (strstr (uri, "//")) { /* Full URI. */
> > + xmlURIPtr uriptr = xmlParseURI (uri);
> > + if (!uriptr) {
> > + virXendError (conn, VIR_ERR_INVALID_ARG,
> > + "xenDaemonDomainMigrate: invalid URI");
> > + return -1;
> > + }
> > + if (uriptr->scheme && STRCASENEQ (uriptr->scheme, "tcp")) {
> > + virXendError (conn, VIR_ERR_INVALID_ARG,
> > + "xenDaemonDomainMigrate: only tcp:// migrations are supported by Xen");
> > + xmlFreeURI (uriptr);
> > + return -1;
> > + }
> > + if (!uriptr->server) {
> > + virXendError (conn, VIR_ERR_INVALID_ARG,
> > + "xenDaemonDomainMigrate: a hostname must be specified in the URI");
> > + xmlFreeURI (uriptr);
> > + return -1;
> > + }
> > + hostname = strdup (uriptr->server);
> > + if (!hostname) {
> > + virXendError (conn, VIR_ERR_NO_MEMORY, "strdup");
> > + xmlFreeURI (uriptr);
> > + return -1;
> > + }
> > + if (uriptr->port)
> > + snprintf (port, sizeof port, "%d", uriptr->port);
> > + xmlFreeURI (uriptr);
> > + }
> > + else if ((p = strrchr (uri, ':')) != NULL) { /* "hostname:port" */
[snip]
> > + else { /* "hostname" (or IP address) */
[snip]
> Hum, we say it's an uri, but we interpret is differently if it's not absolute
> this could lead to confusion. But I'm not sure being a purist here would help
> that much from an user POV.
I agree - the fact that the 'uri' to virConnectOpen doesn't technically have to
always be a URI (eg, NULL, or Xen, or xen) is a major cause of pain virt-manager
since we have to special case parsing of it, rather than just handing off to a
generic URI parser module. We should mandate wellformed URIs for the migrate
API, where wellformed is defined to be whatever libxml is able to parse :-)
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
More information about the libvir-list
mailing list