mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
5530f248db
https://bugzilla.redhat.com/show_bug.cgi?id=1160926 Introduce a 'managed' attribute to allow libvirt to decide whether to delete a vHBA vport created via external means such as nodedev-create. The code currently decides whether to delete the vHBA based solely on whether the parent was provided at creation time. However, that may not be the desired action, so rather than delete and force someone to create another vHBA via an additional nodedev-create allow the configuration of the storage pool to decide the desired action. During createVport when libvirt does the VPORT_CREATE, set the managed value to YES if not already set to indicate to the deleteVport code that it should delete the vHBA when the pool is destroyed. If libvirtd is restarted all the memory only state was lost, so for a persistent storage pool, use the virStoragePoolSaveConfig in order to write out the managed value. Because we're now saving the current configuration, we need to be sure to not save the parent in the output XML if it was undefined at start. Saving the name would cause future starts to always use the same parent which is not the expected result when not providing a parent. By not providing a parent, libvirt is expected to find the best available vHBA port for each subsequent (re)start. At deleteVport, use the new managed value to decide whether to execute the VPORT_DELETE. Since we no longer save the parent in memory or in XML when provided, if it was not provided, then we have to look it up. |
||
---|---|---|
.. | ||
pool-dir-naming.xml | ||
pool-dir.xml | ||
pool-disk.xml | ||
pool-fs.xml | ||
pool-gluster-sub.xml | ||
pool-gluster.xml | ||
pool-iscsi-auth.xml | ||
pool-iscsi-multiiqn.xml | ||
pool-iscsi-vendor-product.xml | ||
pool-iscsi.xml | ||
pool-logical-create.xml | ||
pool-logical-nopath.xml | ||
pool-logical.xml | ||
pool-mpath.xml | ||
pool-netfs-gluster-without-slash.xml | ||
pool-netfs-gluster.xml | ||
pool-netfs.xml | ||
pool-rbd.xml | ||
pool-scsi-type-fc-host-managed.xml | ||
pool-scsi-type-fc-host.xml | ||
pool-scsi-type-scsi-host-stable.xml | ||
pool-scsi-type-scsi-host.xml | ||
pool-scsi.xml | ||
pool-sheepdog.xml | ||
pool-zfs-sourcedev.xml | ||
pool-zfs.xml |