From f841ccb3522733e2af1cbba64829a158dcee8125 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Thu, 17 Dec 2020 15:31:29 +0200 Subject: [PATCH] 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 Reviewed-By: Christian Heimes --- ipaserver/install/server/upgrade.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py index 6b41a824a..8febd17ba 100644 --- a/ipaserver/install/server/upgrade.py +++ b/ipaserver/install/server/upgrade.py @@ -1832,6 +1832,13 @@ def upgrade_configuration(): # (see function docstring for details) http_certificate_ensure_ipa_ca_dnsname(http) + # 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 + service.sync_services_state(fqdn) + if not ds_running: ds.stop(ds.serverid)