mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 23:37:42 +00:00
virDomainDiskTranslateSourcePool: Don't set @mode of iscsi-direct
https://bugzilla.redhat.com/show_bug.cgi?id=1658504 This function is called when a domain is starting up (in qemu driver that is when qemu cmd line is generated). It is used to translate <disk type='volume'/> to something usable by filling in virStorageSource (e.g. fetching disk path, or some connection URI for a network FS). But some of these info are not stored in status XML and thus the function is called on qemuProcessReconnect too to reconstruct runtime data. But this poses a problem because after the first run the mode is set to 'direct', but in the second run this triggers a failure because mode is valid only for 'iscsi' volumes and not 'iscsi-direct' ones. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
269d9c1aca
commit
e896947350
@ -30565,8 +30565,6 @@ virDomainDiskTranslateSourcePool(virDomainDiskDefPtr def)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
def->src->srcpool->mode = VIR_STORAGE_SOURCE_POOL_MODE_DIRECT;
|
|
||||||
|
|
||||||
if (virDomainDiskTranslateISCSIDirect(def, pooldef) < 0)
|
if (virDomainDiskTranslateISCSIDirect(def, pooldef) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ struct _virStorageSourcePoolDef {
|
|||||||
int voltype; /* virStorageVolType, internal only */
|
int voltype; /* virStorageVolType, internal only */
|
||||||
int pooltype; /* virStoragePoolType from storage_conf.h, internal only */
|
int pooltype; /* virStoragePoolType from storage_conf.h, internal only */
|
||||||
int actualtype; /* virStorageType, internal only */
|
int actualtype; /* virStorageType, internal only */
|
||||||
int mode; /* virStorageSourcePoolMode */
|
int mode; /* virStorageSourcePoolMode, currently makes sense only for iscsi pool */
|
||||||
};
|
};
|
||||||
typedef virStorageSourcePoolDef *virStorageSourcePoolDefPtr;
|
typedef virStorageSourcePoolDef *virStorageSourcePoolDefPtr;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user