Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-18673

Server and status REST endpoint is not usable when Bamboo is performing a scheduled backup or importing a backup

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 6.6.0, 7.0.4
    • Import / Export, REST API
    • None

    Description

      Summary

      REST endpoint rest/api/latest/server or /rest/api/latest/status to retrieve the server status is unusable due to a 302 redirect while Bamboo is performing a scheduled backup / export. This is particularly problematic for as external health checks cannot assess the state of the server while it's under maintenance. If the client follows the redirect, they'll get a HTTP 500 internal server error.

      It is also not usable when performing an import into a fresh instance, it simply returns no response until the import is complete.

      Steps to Reproduce

      Import:

      1. Start a fresh Bamboo
      2. Import a XML backup
      3. cURL the endpoint: curl -H 'Accept: application/json' http://bamboo/rest/api/latest/server
      4. cURL the endpoint: curl -H 'Accept: application/json' http://bamboo/rest/api/latest/status

      Export

      1. Start a scheduled backup
      2. cURL the endpoint: curl -H 'Accept: application/json' http://bamboo/rest/api/latest/server
      3. cURL the endpoint: curl -H 'Accept: application/json' http://bamboo/rest/api/latest/status

      Expected Results

      Endpoint returns a state that reflects the status of the Bamboo Server or REST endpoints should return an appropriate HTTP status response that are indicative of maintenance.

      Actual Results

      Import:
      No response is returned until the import finishes.

      Export:

      < HTTP/1.1 302 Found
      < Date: Fri, 08 Sep 2017 02:58:27 GMT
      < Server: Apache-Coyote/1.1
      < X-ASEN: SEN-500
      < X-Frame-Options: SAMEORIGIN
      < Location: /bamboo/error/errorEvents.action
      < Content-Length: 0
      

      If redirect is followed:

      < HTTP/1.1 500
      < Date: Tue, 23 Jun 2020 07:21:57 GMT
      < X-ASEN: SEN-500
      < X-Frame-Options: SAMEORIGIN
      < X-Content-Type-Options: nosniff
      < Vary: Accept-Encoding
      < Cache-Control: no-store
      < Content-Type: text/html;charset=utf-8
      < Content-Language: en-US
      < Connection: close
      < Transfer-Encoding: chunked
      ...
                  <td>
                      Bamboo is currently exporting. Depending on the number of builds and test results, the time until Bamboo is available will vary. Bamboo will automatically become available as soon as this task is complete.
      </td>
      

      Workaround

      None

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jowen@atlassian.com Jeremy Owen
              Votes:
              7 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: