Take Action pages show no data
When you click Take Action > My incidents, Take action > Console access, or Take action > Terminal session replay on IBM Cloud Pak console, you might not see any data, but see only an error message.
Diagnosis
When you run the command oc logs sre-bastion-bastion-backend-deploy-xx -n kube-system, you can see the following errors
[2020-10-09 16:54:29.597] [INFO] [IAM_Auth] [] [Authenticate do not have session] [error=session no find url=/bastion/graphql method=POST]
[2020-10-09 16:54:29.599] [ERROR] [Utils|IAM_AUTH] [] [IAM_GetUserInfo client.Do failed] [error=Post "https:///idprovider/v1/auth/userInfo": http: no Host in request URL
[2020-10-09 16:54:29.600] [ERROR] [IAM_Auth] [] [IAM_GetUserInfo failed] [url=Post "https:///idprovider/v1/auth/userInfo": http: no Host in request URL
[2020-10-09 16:54:29.600] [ERROR] [Auth] [] [Authenticate failed] [Post "https:///idprovider/v1/auth/userInfo": http: no Host in request URL]
Causes
The base_url field value in the secret sre-bastion-bastion-config
is incorrect.
Resolving the problem
-
Get the secret
sre-bastion-bastion-config
by running the following command.kubectl -n kube-system get secret sre-bastion-bastion-secret -o=jsonpath='{.data.config\.yaml}' | base64 -d | grep base_url:
-
Check whether the base_url field value is correct. If not, follow the steps to restart the bastion job.
-
Run the following commands one by one.
kubectl -n kube-system get job sre-bastion-bastion-job --export -o yaml | sed -e "s/controller-uid:/#controller-uid:/" > /tmp/bastion-job.yaml
kubectl -n kube-system delete job sre-bastion-bastion-job
kubectl -n kube-system apply -f /tmp/bastion-job.yaml
Note: By default, the operator
ibm-management-sre-bastion
is installed in thekube-system
namespace. If it is installed in other namespaces, you need to update the commands with the namespace that you use. -
Restart the pod
sre-bastion-bastion-backend-deploy-xxx
. -
Optional: Run oc logs sre-bastion-bastion-backend-deploy-xx -n kube-system. If you see the following errors in the log, log out IBM Cloud Pak console, and log in again.
[2020-11-06 15:30:42.363] [INFO] [IAM_Auth] [] [Authenticate do not have session] [error=session no find url=/bastion/graphql method=POST] [2020-11-06 15:30:42.377] [ERROR] [Utils|IAM_AUTH] [] [IAM_GetUserInfo client.Do failed] [error=Post "https://cp-console.apps.dopey.os.fyre.ibm.com:443/idprovider/v1/auth/userInfo": x509: certificate signed by unknown authority token=xxx url=https://cp-console.apps.dopey.os.fyre.ibm.com:443/idprovider/v1/auth/userInfo response=<nil>] [2020-11-06 15:30:42.377] [ERROR] [IAM_Auth] [] [IAM_GetUserInfo failed] [url=Post "https://cp-console.apps.dopey.os.fyre.ibm.com:443/idprovider/v1/auth/userInfo": x509: certificate signed by unknown authority method=xxx] [2020-11-06 15:30:42.377] [ERROR] [Auth] [] [Authenticate failed] [Post "https://cp-console.apps.dopey.os.fyre.ibm.com:443/idprovider/v1/auth/userInfo": x509: certificate signed by unknown authority]
-