From d7d4df26841335f3c7567a2aa9e4c4a4013c550b Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 6 Aug 2020 11:29:59 +0200 Subject: [PATCH] keystone: all distros are Python3 - use /usr/bin/python3 Change-Id: I59a15186bbe931efd8d99a990a3ceafbd264e1df --- ansible/roles/keystone/templates/fernet-node-sync.sh.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/keystone/templates/fernet-node-sync.sh.j2 b/ansible/roles/keystone/templates/fernet-node-sync.sh.j2 index 7556eed518..ec43b7bd14 100644 --- a/ansible/roles/keystone/templates/fernet-node-sync.sh.j2 +++ b/ansible/roles/keystone/templates/fernet-node-sync.sh.j2 @@ -5,11 +5,11 @@ set -o pipefail # Get data on the fernet tokens # NOTE(mnasiadka): Check for existence of at least two tokens (should exist after bootstrap) -TOKEN_CHECK=$(/usr/bin/python{{ distro_python_version }} /usr/bin/fetch_fernet_tokens.py -t {{ fernet_token_expiry }} -n 2) +TOKEN_CHECK=$(/usr/bin/python3 /usr/bin/fetch_fernet_tokens.py -t {{ fernet_token_expiry }} -n 2) # Ensure tokens are populated n=0 -while /usr/bin/python{{ distro_python_version }} /usr/bin/fetch_fernet_tokens.py -t 86400 -n 1 | grep -q '"populated": false'; do +while /usr/bin/python3 /usr/bin/fetch_fernet_tokens.py -t 86400 -n 1 | grep -q '"populated": false'; do if [ $n -lt 10 ]; then n=$(( n + 1 )) echo "ERROR: Fernet tokens have not been populated, rechecking in 1 minute"