Profile logging

This commit is contained in:
Mike Place 2016-07-21 09:54:52 -06:00
parent 3affafa2e9
commit 2c8298dc6e

View file

@ -199,8 +199,10 @@ def access_keys(opts):
acl_users.add(opts['user'])
acl_users.add(salt.utils.get_user())
if opts['client_acl_verify'] and HAS_PWD:
log.profile('Beginning pwd.getpwall() call in masterarpi acess_keys function')
for user in pwd.getpwall():
users.append(user.pw_name)
log.profile('End pwd.getpwall() call in masterarpi acess_keys function')
for user in acl_users:
log.info(
'Preparing the {0} key for local communication'.format(
@ -211,7 +213,9 @@ def access_keys(opts):
if opts['client_acl_verify'] and HAS_PWD:
if user not in users:
try:
log.profile('Beginning pwd.getpnam() call in masterarpi acess_keys function')
user = pwd.getpwnam(user).pw_name
log.profile('Beginning pwd.getpwnam() call in masterarpi acess_keys function')
except KeyError:
log.error('ACL user {0} is not available'.format(user))
continue