Closed rajatagarwal-ibm closed 4 months ago
Looks like Bearer token was missing when passed to the these 2 shell scripts- https://github.com/terraform-ibm-modules/terraform-ibm-watsonx-saas-da/blob/78c16f84a3fbfd3b4dd8ec26e9e780fdb1e89851/configure_user/scripts/add_user.sh and https://github.com/terraform-ibm-modules/terraform-ibm-watsonx-saas-da/blob/78c16f84a3fbfd3b4dd8ec26e9e780fdb1e89851/configure_user/scripts/enforce_account_restriction.sh
and jq was failing due to this.
@brendankellyibm could this be the issue I explained was going to happen sooner or later where the token has expired by the time the script try to run them? We have some people testing now in accounts where the token is valid for a short period of time (maybe 60mins?)
How long was the DA running for?
Bearer <TOKEN>
while running the cmd configure_user/scripts/add_user.sh
causing the shell script to fail (<stdin>:1): Malformed BOM (while parsing '��')
) at this line and this line. 401] Unauthorized: Invalid bearer token: Access token is invalid
) at POST API call due to the wrong TOKEN generated here.Do we have a theory why this happens only for some users or some runs? I do not think I've seen this one - deploying 1-2 times a day for the past months or so. I use the same values for ibmcloud_api_key and watsonx_admin_api_key in my testing.
Stale - closing for now - not been reproduced in number of runs.
Hitting the
invalid bearer token
error for SaaS DA deployment in the stack.Error log:
Steps to reproduce:
watsonx_admin_api_key
, it failed with the above error.Below are the scenarios I have tested:
FAILED
when setting"watsonx_admin_api_key": null,
FAILED
when omittingwatsonx_admin_api_key
from the .def.json file.FAILED
when setting same value asibmcloud_api_key
.P.S. - I tried to deploy it in the GE Ops account.