forked from rook/rook
In some circonstances the VAULT_TOKEN env variable contains a new line. We don't really know how and why. The saw this when upgrading from Nautilus CentOS 7 to Octopus CentOS 8. So there might be something different with bash and variable expansion. Anyway, let's remove any potential new line and trailing spaces from that var. The error was splitting the curl line to something like: ``` + curl --silent --show-error --request GET --header 'X-Vault-Token: s.aCHdo57tF19ddN1hQmGVyG8a ' --insecure https://vault.default.svc.cluster.local:8200/v1/rook/ver1/rook-ceph-osd-encryption-key-set1-data-0pztgf curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) ``` Where a correct line will be: ``` + curl --silent --show-error --request GET --header 'X-Vault-Token: s.aCHdo57tF19ddN1hQmGVyG8a' --insecure https://vault.default.svc.cluster.local:8200/v1/rook/ver1/rook-ceph-osd-encryption-key-set1-data-0pztgf ``` Signed-off-by: Sébastien Han <seb@redhat.com>