Rare issue during "enable": If creation of the directory on the fs fails (e.g. because NFS share is broken), the batch can never be enabled, as the subsequent requests will always return "Already exists".
"Enabling" does two things:
(A) Create irods collection [0], and
(B) create dir on file system [1].
But only (A) is checked [2]. So if (A) succeeds and (B) fails (e.g. because NFS share is broken), we're screwed.
Suggestion: Also check if directory exists, of catch exceptions on creating the path and then also delete the collection again. The latter may be better, as this happens rarely.
Rare issue during "enable": If creation of the directory on the fs fails (e.g. because NFS share is broken), the batch can never be enabled, as the subsequent requests will always return "Already exists".
"Enabling" does two things:
(A) Create irods collection [0], and
(B) create dir on file system [1].
But only (A) is checked [2]. So if (A) succeeds and (B) fails (e.g. because NFS share is broken), we're screwed.
Suggestion: Also check if directory exists, of catch exceptions on creating the path and then also delete the collection again. The latter may be better, as this happens rarely.
[0] https://github.com/EUDAT-B2STAGE/http-api/blob/1.0.4/projects/b2stage/backend/apis/ingestion.py#L258 [1] https://github.com/EUDAT-B2STAGE/http-api/blob/1.0.4/projects/b2stage/backend/apis/ingestion.py#L264 [2] https://github.com/EUDAT-B2STAGE/http-api/blob/1.0.4/projects/b2stage/backend/apis/ingestion.py#L254