ba9b950 Move where the restore state is marked during IPA server upgrade

1 file Authored by rcritten 3 years ago, Committed by abbra 3 years ago,
    Move where the restore state is marked during IPA server upgrade
    
    There is still some exposure to killing in a bad place. This was
    reproduced by killing the process in the parser.parse() call within
    __restore_config (line 230) so the values were restored from the
    backup but the new dse.ldif never written or copied. But the values
    had already been restored from the state file.
    
    I'm not sure this can ever be 100% bullet-proof since it can be
    externally killed but if rather than calling restore_state() on the
    values in __restore_config we use get_state() which will peek at the
    values in the state file without removing them. Then the last step
    is to pop upgrade-in-progress and then the rest.
    
    If the values have been restored and the new ldif written and copied
    then it's only upgrade-in-progress that really matters. The rest will
    be overwritten.
    
    https://pagure.io/freeipa/issue/7534
    
    Signed-off-by: Rob Crittenden <rcritten@redhat.com>
    Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>