Missing Reports After Upgrading or a Data Refresh

Chris
Chris
  • Updated
Audience: Everyone

Products and Versions Covered: 

  • Jama Connect® version(s) - All
    • Self-hosted, Replicated - KOTS

Summary

When 'refreshing' a sandbox instance with production resources, if the assets have not been backed up/restored correctly, reports may not function properly.

Resolution

(1) Ensure the report and attachment references are consistent between environments. Run the following queries in both environments. Ensure the baseUrl has been updated and is not the same in both.

select * from report r left join attachment a on r.attachmentId = a.id;
select baseUrl from organization;

(2) Inspect the report assets available from within the core-0 pod. These results can be compared between both environments

kubectl exec -n default core-0 -- ls -lR /home/contour/tenant/$(kubectl get pod core-0 -n default -o jsonpath="{.spec.containers[*].env[?(@.name=='TENANT_NAME')].value}")/reports

(3) Assuming the report assets are available in the 'source' environment but not in the 'target' of the refresh: backup -> transfer -> restore

### SOURCE ENV ###

## View contents
TENANT_NAME=$(kubectl get pod core-0 -o jsonpath='{.spec.containers[0].env[?(@.name=="TENANT_NAME")].value}') && \
kubectl exec core-0 -c core -- ls -R /home/contour/tenant/$TENANT_NAME/reports

## Copy locally (without archival)
TENANT_NAME=$(kubectl get pod core-0 -o jsonpath='{.spec.containers[0].env[?(@.name=="TENANT_NAME")].value}') && \
kubectl cp core-0:/home/contour/tenant/$TENANT_NAME/reports ./reports -c core

## Move reports directory to TARGET ENV
scp -r ./reports user@remote-server-ip:/path/to/destination/

### TARGET ENV ###

## View contents
TENANT_NAME=$(kubectl get pod core-0 -o jsonpath='{.spec.containers[0].env[?(@.name=="TENANT_NAME")].value}') && \
kubectl exec core-0 -c core -- ls -R /home/contour/tenant/$TENANT_NAME/reports

## Copy to core
TENANT_NAME=$(kubectl get pod core-0 -o jsonpath='{.spec.containers[0].env[?(@.name=="TENANT_NAME")].value}') && \
kubectl cp ./reports core-0:/home/contour/tenant/$TENANT_NAME/ -c core

## Inspect
TENANT_NAME=$(kubectl get pod core-0 -o jsonpath='{.spec.containers[0].env[?(@.name=="TENANT_NAME")].value}') && \
kubectl exec core-0 -c core -- ls -R /home/contour/tenant/$TENANT_NAME/reports

If the diagnostic steps provided here do not surface the issue or the reports are still not functioning after moving them to the correct location, please open a support request for additional assistance.

Additional Resources 

Feedback:
We welcome your input! Please sign in to leave any comments, suggestions, or ideas for improvement below.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.