Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Reingest via a pipeline (not via SS) does not lookup correct AIPStore #96

Open
sallain opened this issue Aug 16, 2018 · 0 comments

Comments

@sallain
Copy link
Member

sallain commented Aug 16, 2018

From @ross-spencer on June 18, 2018 15:15

An example re-ingest query looks like this:

curl http://127.0.0.1:62080/api/ingest/reingest \
-H "Authorization: ApiKey test:test" \
-d'name=rein_1&uuid=5a5ad892-9244-458a-bfad-1df645caa323'

When it is run however, the following 404 can be seen (with a Django test configuration):

image

The path Archivematica is looking in for the AIP is:

[Errno 2] No such file or directory: u'/var/archivematica/sharedDirectory/tmp/rein_1'

And it can be seen in the source code that it will always add 'tmp' as part of the URL being queried.

https://github.com/artefactual/archivematica/blob/0af67bee24acf19e62cbb3ada28356393bb9e400/src/dashboard/src/components/api/views.py#L547-L561

The workaround for this is to use the Storage Service Reingest method documented here:

curl -v -H "Authorization: ApiKey test:test" \
-H "Content-Type: application/json" \
-X POST \
-d '{"pipeline":"b10c005e-87da-452c-ac3f-7d525056cad4","reingest_type":"full"}' \
'http://127.0.0.1:62081/api/v2/file/5a5ad892-9244-458a-bfad-1df645caa323/reingest/'

NB. we can only automatically approve a full-reingest, not partial or meta, see: artefactual/archivematica#1145

We should seek to enable the pipeline being queried to ask the storage service for the correct AIP Store location, for example if the following is configured in my storage service:

image

Then the location (I believe) needs to look like:

/var/archivematica/sharedDirectory/www/AIPsStore

However, the re-ingest process via the dashboard might need to be looked at in more detail to understand if its behaviour still works as originally intended. The docs need to be improved to make the functionality clearer, see here for an example where a request using a JSON body does not seem to be acknowledged as expected.

Copied from original issue: artefactual/archivematica#1143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant