Skip to content
Snippets Groups Projects
Commit 29b2d428 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Fix keystone-startup.sh"

parents 07cbec19 d78673e7
No related branches found
No related tags found
No related merge requests found
...@@ -26,8 +26,8 @@ done ...@@ -26,8 +26,8 @@ done
TOKEN_PRIMARY=$(ls -1 ${TOKEN_DIR} | sort -hr | head -n 1) TOKEN_PRIMARY=$(ls -1 ${TOKEN_DIR} | sort -hr | head -n 1)
# Check it's age in seconds # Check it's age in seconds
TOKEN_AGE=$(($(date +%s) - $(date +%s -r "${TOKEN_DIR}/${TOKEN_PRIMARY}"))) TOKEN_AGE=$(($(date +%s) - $(date +%s -r "${TOKEN_DIR}/${TOKEN_PRIMARY}")))
# Compare if it's older than fernet_token_expiry and run key rotation if needed # Compare if it's older than fernet_key_rotation_interval and fail if it's stale
if [ "${TOKEN_AGE}" -gt "{{ fernet_token_expiry }}" ]; then if [ "${TOKEN_AGE}" -gt "{{ fernet_key_rotation_interval }}" ]; then
echo "ERROR: Primary token ${TOKEN_PRIMARY} is stale." echo "ERROR: Primary token ${TOKEN_PRIMARY} is stale."
exit 1 exit 1
fi fi
......
---
fixes:
- |
An issue has been fixed when ``keystone`` container would be stuck in
restart loop with a message that fernet key is stale.
`LP#1895723 <https://launchpad.net/bugs/1895723>`__
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment