[libvirt] [PATCH 0/5] Fix issues with activating pool with invalid source

John Ferlan jferlan at redhat.com
Tue Dec 15 19:35:24 UTC 2015



On 12/07/2015 03:47 PM, John Ferlan wrote:
> These patches resolve issues with 'FS', 'NFS', and 'LOGICAL' pools where
> if the pool source device didn't match the reality what was running on
> the host there were inconsistent results.
> 
> For the file pools, a pool would be declared 'active' after restart even 
> though a start would fail because the check code only cared that the device 
> the pool was using was mounted.  Patches 3 alters the check to not only
> make sure the device is mounted, but that the source for the device matches 
> the source used to start the pool.
> 
> For the logical pool, a pool could be both started and declared 'active'
> on restart as long as the "pool->def->source.name" was a valid volume
> group on the host even though the pool's source device(s) didn't match
> the same volume group. Usually the pool build process takes care of
> ensuring not only that the source device exists, but matching the
> device(s) to the volume group name create (via vgcreate). The reality
> is pool startup never checked that the volume group name being used
> by the pool matched the reality of the volume group on the host. Patch
> 5 will now ensure not only startup matches the name and device list,
> but that restart setting 'active' would do the same.
> 
> John Ferlan (5):
>   storage: Create helper to generate FS pool source value
>   storage: Refactor virStorageBackendFileSystemGetPoolSource
>   storage: Check FS pool source during
>     virStorageBackendFileSystemIsMounted
>   storage: Create helper for virStorageBackendLogicalFindPoolSources
>   storage: Add helper to compare logical pool def against pvs output
> 
>  src/storage/storage_backend_fs.c      |  73 ++++++++++++-----
>  src/storage/storage_backend_logical.c | 148 +++++++++++++++++++++++++++++-----
>  2 files changed, 182 insertions(+), 39 deletions(-)
> 
Adjusted patch 1 & 5 as suggested and pushed.

Thanks -

John




More information about the libvir-list mailing list