Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
6.2
-
None
-
None
Description
When triggering a backup with curl, an error does not generate an error status code like 4xx or 5xx, also the status field of the response says ok.
Steps to reproduce.
Take an existing solr, end execute the following command:
curl 'http://localhost:8983/solr/
/replication?command=backup&name=solr-backup&location=/xxxx'
Expected outcome:
Ideally, a http status code starting with 4, but at least a bad status in the response text
Actual output:
<lst name="responseHeader"><int name="status">0</int><int name="QTime">1</int></lst><str name="exception">org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Unable to create snapshot directory: /xxx/snapshot.solr-backup</str><str name="status">OK</str>
At first I started to grep for the line with status, and then used grep -v 'Exception'. This would give a return code != 0 and would mean, my backup failed. Unfortunately, it will return true if there are other errors so this is not a solution.