mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Use admin@REALM when testing if SSSD is ready
https://fedorahosted.org/freeipa/ticket/3771
This commit is contained in:
committed by
Martin Kosek
parent
efb7a2d54d
commit
8a22bce242
@@ -77,7 +77,7 @@ def wait_for_sssd():
|
||||
time.sleep(1)
|
||||
while n < 10 and not found:
|
||||
try:
|
||||
ipautil.run(["getent", "passwd", "admin"])
|
||||
ipautil.run(["getent", "passwd", "admin@%s" % api.env.realm])
|
||||
found = True
|
||||
except Exception, e:
|
||||
time.sleep(1)
|
||||
@@ -85,8 +85,10 @@ def wait_for_sssd():
|
||||
|
||||
# This should never happen but if it does, may as well warn the user
|
||||
if not found:
|
||||
root_logger.debug("Unable to find 'admin' user with 'getent passwd admin'!")
|
||||
print "Unable to find 'admin' user with 'getent passwd admin'!"
|
||||
err_msg = ("Unable to find 'admin' user with "
|
||||
"'getent passwd admin@%s'!" % api.env.realm)
|
||||
root_logger.debug(err_msg)
|
||||
print err_msg
|
||||
print "This may mean that sssd didn't re-start properly after the configuration changes."
|
||||
|
||||
def configure_xml(fstore):
|
||||
|
||||
@@ -2476,7 +2476,7 @@ def install(options, env, fstore, statestore):
|
||||
# Particulary, SSSD might take longer than 6-8 seconds.
|
||||
while n < 10 and not found:
|
||||
try:
|
||||
ipautil.run(["getent", "passwd", "admin"])
|
||||
ipautil.run(["getent", "passwd", "admin@%s" % cli_realm])
|
||||
found = True
|
||||
except Exception, e:
|
||||
time.sleep(1)
|
||||
@@ -2484,7 +2484,8 @@ def install(options, env, fstore, statestore):
|
||||
|
||||
if not found:
|
||||
root_logger.error(
|
||||
"Unable to find 'admin' user with 'getent passwd admin'!")
|
||||
"Unable to find 'admin' user with "
|
||||
"'getent passwd admin@%s'!" % cli_realm)
|
||||
if conf:
|
||||
root_logger.info("Recognized configuration: %s", conf)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user