Commit 870af64a authored by Sebastien Gougeaud's avatar Sebastien Gougeaud Committed by Thomas Leibovici
Browse files

phobosd: do not quit if error during request processing



If a client request processing raised an error for the daemon, the
daemon may quit after sending an error response. We now consider that
the request processing does not alter the daemon state and it should not
be terminated if the processing failed.

Change-Id: Ic6376acdd5bca012dd6eb83ae0aace745863c874
Signed-off-by: default avatarSebastien Gougeaud <sebastien.gougeaud@cea.fr>
Reviewed-on: https://cws-fleury.labs.ocre.cea.fr/gerrit/6483


Reviewed-by: Linter
Tested-by: default avatarJenkins s8open_nr <s8open_nr@ccc.ocre.cea.fr>
Reviewed-by: default avatarQuentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: default avatarPatrice LUCAS <patrice.lucas@cea.fr>
Reviewed-by: default avatarThomas Leibovici <thomas.leibovici@cea.fr>
parent 01e651ee
......@@ -2487,16 +2487,12 @@ out:
resp->error->rc = rc;
resp->error->req_kind = PHO_REQUEST_KIND__RQ_WRITE;
/* Request processing error, not an LRS error */
rc = 0;
}
}
/*
* Whitelist non fatal errors that should not be signaled to the LRS (only
* to the relevant transfer).
*/
if (rc == -ENOSPC)
rc = 0;
return rc;
}
......@@ -2566,6 +2562,9 @@ static int sched_handle_read_alloc(struct lrs_sched *sched, pho_req_t *req,
resp->error->rc = rc;
resp->error->req_kind = PHO_REQUEST_KIND__RQ_READ;
/* Request processing error, not an LRS error */
rc = 0;
}
}
......@@ -2678,6 +2677,9 @@ static int sched_handle_format(struct lrs_sched *sched, pho_req_t *req,
resp->req_id = req->id;
resp->error->rc = rc;
resp->error->req_kind = PHO_REQUEST_KIND__RQ_FORMAT;
/* Request processing error, not an LRS error */
rc = 0;
}
} else {
resp->req_id = req->id;
......@@ -2728,6 +2730,9 @@ err:
resp->req_id = req->id;
resp->error->rc = rc;
resp->error->req_kind = PHO_REQUEST_KIND__RQ_NOTIFY;
/* Request processing error, not an LRS error */
rc = 0;
}
return rc;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment