b3a1e4d upgrade: ensure service state is synchronized with the server state

Authored and Committed by abbra 3 years ago
    upgrade: ensure service state is synchronized with the server state
    
    Convert configuredService to either enabledService or hiddenService
    depending on the state of the server role.  This is to fix situations
    when deployment has happened before introduction of hidden replicas
    as those services will stay as configuredService and will not get
    started after upgrade, rendering the system non-functioning.
    
    Fixes: https://pagure.io/freeipa/issue/8623
    
    Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
    Reviewed-By: Christian Heimes <cheimes@redhat.com>