• Iustin Pop's avatar
    Workaround changed LVM behaviour · 048eeb2b
    Iustin Pop authored
    
    
    The vgreduce command has changed behaviour from when we initially
    wrote the code (2.02.02 versus 2.02.66, 4 years delta):
    
    - if there are LVs which will be impacted, it requires --force
    - otherwise refuses to proceed, but it still returns exit code 0
    
    We handle this by looking to see if it returns "Wrote out consistent
    volume group" (behaviour unchanged), or if it complains about
    "--force"; in the case it didn't complete, we retry the operation.
    
    We improve a bit the checking of "vgs", as it uses to fail silently
    and we didn't detect it.
    
    New tests for this function should test, I believe, all the expected
    variations; at the least we now have data files with the expected
    output.
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    048eeb2b
Makefile.am 35 KB