From 2d26a87229e25eb723347926e098528695a13543 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Sun, 10 May 2020 22:36:21 -0700 Subject: [PATCH] Fix UserNotFound exception for expiring groups Without this patch, if this exception is reached, it won't be properly formed and will result in a log message like this: Failed to insert replacement values into translated message Could not find user: %(user_id)s. (Original: 'Could not find user: %(user_id)s.'): 'user_id' This patch adds the right parameters to ensure the exception properly logs the user ID and the translation doesn't fail. Change-Id: I3229d9a237633cda8f6a25f396a75b8310757d9d --- keystone/identity/shadow_backends/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keystone/identity/shadow_backends/sql.py b/keystone/identity/shadow_backends/sql.py index 46dc34d5b4..1d817c0387 100644 --- a/keystone/identity/shadow_backends/sql.py +++ b/keystone/identity/shadow_backends/sql.py @@ -230,7 +230,7 @@ class ShadowUsers(base.ShadowUsersDriverBase): if not user: # Note(knikolla): This shouldn't really ever happen, since # this requires the user to already be logged in. - raise exception.UserNotFound() + raise exception.UserNotFound(user_id=user_id) return user with sql.session_for_write() as session: