{"action":"created","issue":{"url":"https://api.github.com/repos/EUDAT-B2STAGE/http-api/issues/138","repository_url":"https://api.github.com/repos/EUDAT-B2STAGE/http-api","labels_url":"https://api.github.com/repos/EUDAT-B2STAGE/http-api/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/EUDAT-B2STAGE/http-api/issues/138/comments","events_url":"https://api.github.com/repos/EUDAT-B2STAGE/http-api/issues/138/events","html_url":"https://github.com/EUDAT-B2STAGE/http-api/issues/138","id":391824984,"node_id":"MDU6SXNzdWUzOTE4MjQ5ODQ=","number":138,"title":"Rare issue during enable","user":{"login":"merretbuurman","id":13016367,"node_id":"MDQ6VXNlcjEzMDE2MzY3","avatar_url":"https://avatars2.githubusercontent.com/u/13016367?v=4","gravatar_id":"","url":"https://api.github.com/users/merretbuurman","html_url":"https://github.com/merretbuurman","followers_url":"https://api.github.com/users/merretbuurman/followers","following_url":"https://api.github.com/users/merretbuurman/following{/other_user}","gists_url":"https://api.github.com/users/merretbuurman/gists{/gist_id}","starred_url":"https://api.github.com/users/merretbuurman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/merretbuurman/subscriptions","organizations_url":"https://api.github.com/users/merretbuurman/orgs","repos_url":"https://api.github.com/users/merretbuurman/repos","events_url":"https://api.github.com/users/merretbuurman/events{/privacy}","received_events_url":"https://api.github.com/users/merretbuurman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-17T17:54:55Z","updated_at":"2018-12-18T05:40:25Z","closed_at":null,"author_association":"NONE","body":"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\".\r\n\r\n\"Enabling\" does two things:\r\n\r\n- (A) Create irods collection [0], and \r\n\r\n- (B) create dir on file system [1].\r\n\r\nBut only (A) is checked [2]. So if (A) succeeds and (B) fails (e.g. because NFS share is broken), we're screwed.\r\n \r\nSuggestion: 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.\r\n\r\n[0] https://github.com/EUDAT-B2STAGE/http-api/blob/1.0.4/projects/b2stage/backend/apis/ingestion.py#L258\r\n[1] https://github.com/EUDAT-B2STAGE/http-api/blob/1.0.4/projects/b2stage/backend/apis/ingestion.py#L264\r\n[2] https://github.com/EUDAT-B2STAGE/http-api/blob/1.0.4/projects/b2stage/backend/apis/ingestion.py#L254"},"comment":{"url":"https://api.github.com/repos/EUDAT-B2STAGE/http-api/issues/comments/448103284","html_url":"https://github.com/EUDAT-B2STAGE/http-api/issues/138#issuecomment-448103284","issue_url":"https://api.github.com/repos/EUDAT-B2STAGE/http-api/issues/138","id":448103284,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODEwMzI4NA==","user":{"login":"mdantonio","id":12394806,"node_id":"MDQ6VXNlcjEyMzk0ODA2","avatar_url":"https://avatars3.githubusercontent.com/u/12394806?v=4","gravatar_id":"","url":"https://api.github.com/users/mdantonio","html_url":"https://github.com/mdantonio","followers_url":"https://api.github.com/users/mdantonio/followers","following_url":"https://api.github.com/users/mdantonio/following{/other_user}","gists_url":"https://api.github.com/users/mdantonio/gists{/gist_id}","starred_url":"https://api.github.com/users/mdantonio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdantonio/subscriptions","organizations_url":"https://api.github.com/users/mdantonio/orgs","repos_url":"https://api.github.com/users/mdantonio/repos","events_url":"https://api.github.com/users/mdantonio/events{/privacy}","received_events_url":"https://api.github.com/users/mdantonio/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T05:40:25Z","updated_at":"2018-12-18T05:40:25Z","author_association":"COLLABORATOR","body":"In case of errors the irods collection can be removed with:\r\n`imain.remove(batch_path, recursive=True, force=True)`\r\n"}}
{"actor":{"display_login":"mdantonio"}}