Skip to content

Commit

Permalink
Merge pull request #19836 from wking/gather-aws-console-json
Browse files Browse the repository at this point in the history
ci-operator/step-registry/gather/aws-console: Use LC_ALL instead of PYTHONIOENCODING
  • Loading branch information
openshift-merge-robot committed Jun 30, 2021
2 parents a831e97 + 1b472c0 commit 55ff4b2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ then
cat "${SHARED_DIR}/aws-instance-ids.txt" >> "${TMPDIR}/node-provider-IDs.txt"
fi

aws --version

REGION="$(jq -r .aws.region "${SHARED_DIR}/metadata.json")"
cat "${TMPDIR}/node-provider-IDs.txt" | sort | uniq | while read -r INSTANCE_ID
cat "${TMPDIR}/node-provider-IDs.txt" | sort | grep . | uniq | while read -r INSTANCE_ID
do
echo "Gathering console logs for ${INSTANCE_ID}"
PYTHONIOENCODING=UTF-8:backslashreplace aws --region "${REGION}" ec2 get-console-output --instance-id "${INSTANCE_ID}" --output text > "${ARTIFACT_DIR}/${INSTANCE_ID}" &
LC_ALL=en_US.UTF-8 aws --region "${REGION}" ec2 get-console-output --instance-id "${INSTANCE_ID}" --output text > "${ARTIFACT_DIR}/${INSTANCE_ID}" &
wait "$!"
done

0 comments on commit 55ff4b2

Please sign in to comment.