mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Fix 2 domain ID handling bugs in remote driver
This commit is contained in:
parent
cb43623acd
commit
c881b32215
@ -1,3 +1,10 @@
|
|||||||
|
Sun Apr 19 16:19:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
|
Fix 2 domain ID handling bugs in remote driver
|
||||||
|
* src/remote_internal.c: Add virDomainCreate(), do a lookup
|
||||||
|
to find the ID of newly created domain. Reset ID to -1 after
|
||||||
|
doing a destroy operation on a domain
|
||||||
|
|
||||||
Sun Apr 19 16:14:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
Sun Apr 19 16:14:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* src/domain_conf.c: Switch over todo domain lookup based
|
* src/domain_conf.c: Switch over todo domain lookup based
|
||||||
|
@ -1939,6 +1939,7 @@ remoteDomainDestroy (virDomainPtr domain)
|
|||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
rv = 0;
|
rv = 0;
|
||||||
|
domain->id = -1;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
remoteDriverUnlock(priv);
|
remoteDriverUnlock(priv);
|
||||||
@ -2673,6 +2674,8 @@ remoteDomainCreate (virDomainPtr domain)
|
|||||||
{
|
{
|
||||||
int rv = -1;
|
int rv = -1;
|
||||||
remote_domain_create_args args;
|
remote_domain_create_args args;
|
||||||
|
remote_domain_lookup_by_uuid_args args2;
|
||||||
|
remote_domain_lookup_by_uuid_ret ret2;
|
||||||
struct private_data *priv = domain->conn->privateData;
|
struct private_data *priv = domain->conn->privateData;
|
||||||
|
|
||||||
remoteDriverLock(priv);
|
remoteDriverLock(priv);
|
||||||
@ -2684,6 +2687,20 @@ remoteDomainCreate (virDomainPtr domain)
|
|||||||
(xdrproc_t) xdr_void, (char *) NULL) == -1)
|
(xdrproc_t) xdr_void, (char *) NULL) == -1)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
/* Need to do a lookup figure out ID of newly started guest, because
|
||||||
|
* bug in design of REMOTE_PROC_DOMAIN_CREATE means we aren't getting
|
||||||
|
* it returned.
|
||||||
|
*/
|
||||||
|
memcpy (args2.uuid, domain->uuid, VIR_UUID_BUFLEN);
|
||||||
|
memset (&ret2, 0, sizeof ret2);
|
||||||
|
if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID,
|
||||||
|
(xdrproc_t) xdr_remote_domain_lookup_by_uuid_args, (char *) &args2,
|
||||||
|
(xdrproc_t) xdr_remote_domain_lookup_by_uuid_ret, (char *) &ret2) == -1)
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
domain->id = ret2.dom.id;
|
||||||
|
xdr_free ((xdrproc_t) &xdr_remote_domain_lookup_by_uuid_ret, (char *) &ret2);
|
||||||
|
|
||||||
rv = 0;
|
rv = 0;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
Loading…
Reference in New Issue
Block a user