Troubleshooting: Create Support Bundle with cURL

Chin-Ya Huang | April 12, 2021

Applicable versions

All Longhorn versions.


Not able to create the support bundle with a web browser.


  1. Expose Longhorn backend service. Below is an example using NodePort, you can also export via load balancer if one is set up.

    ip-172-30-0-21:~ # kubectl -n longhorn-system     patch svc longhorn-backend -p '{"spec":    {"type":"NodePort"}}'
    service/longhorn-backend patched
    ip-172-30-0-21:~ # kubectl -n longhorn-system get     svc/longhorn-backend
    NAME               TYPE       CLUSTER-IP          EXTERNAL-IP   PORT(S)          AGE
    longhorn-backend   NodePort       <none>        9500:32595/TCP   156m
  2. Run the below script to create and download the support bundle. You will need to replace the BACKEND_URL, ISSUE_URL, ISSUE_DESCRIPTION.

    # Replace this block ====>
    ISSUE_DESCRIPTION="dummy description"
    # <==== Replace this block
    # Request to create the support bundle
    REQUEST_SUPPORT_BUNDLE=$( curl -sSX POST -H 'Content-Type: application/json' -d '{ "issueURL": "'"${ISSUE_URL}"'", "description": "'"${ISSUE_DESCRIPTION}"'" }' http://${BACKEND_URL}/v1/supportbundles )
    ID=$( jq -r '.id' <<< ${REQUEST_SUPPORT_BUNDLE} )
    echo "Creating support bundle ${SUPPORT_BUNDLE_NAME} on Node ${ID}"
    while [ $(curl -sSX GET http://${BACKEND_URL}/v1/supportbundles/${ID}/${SUPPORT_BUNDLE_NAME} | jq -r '.state' ) != "ReadyForDownload" ]; do
      echo "Progress: $(curl -sSX GET http://${BACKEND_URL}/v1/supportbundles/${ID}/${SUPPORT_BUNDLE_NAME} | jq -r '.progressPercentage' )%"
      sleep 1s
    curl -X GET http://${BACKEND_URL}/v1/supportbundles/${ID}/${SUPPORT_BUNDLE_NAME}/download --output /tmp/${SUPPORT_BUNDLE_NAME}.zip
    echo "Downloaded support bundle to /tmp/${SUPPORT_BUNDLE_NAME}.zip"
Back to Knowledge Base

© 2019-2022 Longhorn Authors | Documentation Distributed under CC-BY-4.0

© 2022 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.