diff options
| author | Zuul <zuul@review.opendev.org> | 2019-12-09 14:11:55 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2019-12-09 14:11:55 +0000 |
| commit | 881edf3793deebc5bc57239b17d20f3dc04205d5 (patch) | |
| tree | 3bab07e72f9bee281e9d82cba1c1c207db195d37 | |
| parent | a8ca0788332941803a1e30c25602719e91258bb3 (diff) | |
| parent | bcca3fabe305c1e206fdb231c31809ceff2d4774 (diff) | |
| download | kolla-881edf3793deebc5bc57239b17d20f3dc04205d5.tar.gz kolla-881edf3793deebc5bc57239b17d20f3dc04205d5.zip | |
Merge "Fix keystone bootstrap error message display"
| -rw-r--r-- | docker/keystone/keystone/keystone_bootstrap.sh | 6 | ||||
| -rw-r--r-- | releasenotes/notes/fix-keystone-bootstrap-unprintable-e01b088ef821fd18.yaml | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/docker/keystone/keystone/keystone_bootstrap.sh b/docker/keystone/keystone/keystone_bootstrap.sh index c140e97c7..e37e38352 100644 --- a/docker/keystone/keystone/keystone_bootstrap.sh +++ b/docker/keystone/keystone/keystone_bootstrap.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -o pipefail + # NOTE(SamYaple): Kolla needs to wraps `keystone-manage bootstrap` to ensure # any change is reported correctly for idempotency. This script will exit with # valid json that can be parsed with information about if the task has failed @@ -29,7 +31,9 @@ function exit_json { } changed="false" -keystone_bootstrap=$(keystone-manage bootstrap --bootstrap-username "${USERNAME}" --bootstrap-password "${PASSWORD}" --bootstrap-project-name "${PROJECT}" --bootstrap-role-name "${ROLE}" --bootstrap-admin-url "${ADMIN_URL}" --bootstrap-internal-url "${INTERNAL_URL}" --bootstrap-public-url "${PUBLIC_URL}" --bootstrap-service-name "keystone" --bootstrap-region-id "${REGION}" 2>&1) +# NOTE(mgoddard): pipe through cat -v to remove unprintable control characters +# which prevent JSON decoding. +keystone_bootstrap=$(keystone-manage bootstrap --bootstrap-username "${USERNAME}" --bootstrap-password "${PASSWORD}" --bootstrap-project-name "${PROJECT}" --bootstrap-role-name "${ROLE}" --bootstrap-admin-url "${ADMIN_URL}" --bootstrap-internal-url "${INTERNAL_URL}" --bootstrap-public-url "${PUBLIC_URL}" --bootstrap-service-name "keystone" --bootstrap-region-id "${REGION}" 2>&1 | cat -v) if [[ $? != 0 ]]; then fail_json "${keystone_bootstrap}" fi diff --git a/releasenotes/notes/fix-keystone-bootstrap-unprintable-e01b088ef821fd18.yaml b/releasenotes/notes/fix-keystone-bootstrap-unprintable-e01b088ef821fd18.yaml new file mode 100644 index 000000000..885e0e760 --- /dev/null +++ b/releasenotes/notes/fix-keystone-bootstrap-unprintable-e01b088ef821fd18.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue with keystone bootstrap where an error message emitted by + the ``keystone-manage bootstrap`` command is hidden. See `bug 1855701 + <https://bugs.launchpad.net/kolla-ansible/+bug/1855701>`__ for details. |
