Skip to content

Instantly share code, notes, and snippets.

@joshimoo
Created February 12, 2021 11:39
Show Gist options
  • Save joshimoo/cdf2995e5c517a74b588bab59dbf3a1f to your computer and use it in GitHub Desktop.
Save joshimoo/cdf2995e5c517a74b588bab59dbf3a1f to your computer and use it in GitHub Desktop.
how to create a longhorn support bundle when the ui is not working

longhorn/longhorn#2118 (comment)

The longhorn-ui uses websockets to communicate with the backend, the icons on the bottom right are the statuses of the websocket connections. Can you generate a support bundle manually, below are instructions to do this via curl please replace the longhorn-backend.xip.io with your own exposed service.

The easiest is to expose longhorn backend service, as shown below: expose backend service

// requesting support bundle via post
curl -i -X POST -H 'Content-Type: application/json' -d '{ "issueURL": "https://github.com/longhorn/longhorn/issues/2118", "description": "2118" }' http://longhorn-backend.xip.io/v1/supportbundles

{"actions":{},"errorMessage":"","id":"longhorn-demo-work3","links":{"self":"http://longhorn-backend.xip.io/v1/supportbundles/longhorn-demo-work3"},"name":"longhorn-support-bundle_c9569901-9f06-44c6-978e-33294327d879_2020-12-18T13-49-05Z","nodeID":"longhorn-demo-work3","progressPercentage":0,"state":"InProgress","type":"supportbundle"}


// checking download status for the mentioned support bundle
// need to replace id, name with the information from the above response
// curl -i -X GET http://longhorn-backend.xip.io/v1/supportbundles/<id>/<name>
curl -i -X GET http://longhorn-backend.xip.io/v1/supportbundles/longhorn-demo-work3/longhorn-support-bundle_c9569901-9f06-44c6-978e-33294327d879_2020-12-18T13-49-05Z

{"actions":{},"errorMessage":"","id":"longhorn-demo-work3","links":{"self":"http://longhorn-backend.xip.io/v1/supportbundles/longhorn-demo-work3"},"name":"longhorn-support-bundle_c9569901-9f06-44c6-978e-33294327d879_2020-12-18T13-49-05Z","nodeID":"longhorn-demo-work3","progressPercentage":100,"state":"ReadyForDownload","type":"supportbundle"}

// download support bundle mentioned above, once status is ReadyForDownload
// need to replace id, name with the information from the above response
// curl -i -X GET http://longhorn-backend.xip.io/v1/supportbundles/<id>/<name>/download --output /tmp/support-bundle.zip
curl -i -X GET http://longhorn-backend.xip.io/v1/supportbundles/longhorn-demo-work3/longhorn-support-bundle_c9569901-9f06-44c6-978e-33294327d879_2020-12-18T13-49-05Z/download --output /tmp/support-bundle.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment