-
Notifications
You must be signed in to change notification settings - Fork 1
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: API "package" endpoint doesn't work with some absolute paths #1709
Comments
P.S. I can successfully start processing the |
Similar to #1436 |
If I use the "/home" transfer source UUID in the package request the transfer starts successfully:
|
I see this in your attached log: WARNING 2024-08-15 22:33:48 archivematica.common:storageService:copy_files:316: Unable to move files with {'origin_location': '/api/v2/location/32634513-bdfc-47e5-8cba-ee2e73dd9811/', 'files': [{'source': 'home/small.zip', 'destination': '/var/archivematica/sharedDirectory/tmp/tmpyfhgjjiu/small.zip'}], 'pipeline': '/api/v2/pipeline/f8c0d75f-15c3-4152-ac1c-abcf5d8c4b36/'} because 500 Server Error: Internal Server Error for url: https://REDACTED.archivematica.net:8000/api/v2/location/8f8af017-3b89-4ce9-a90b-42d4745a3d0d/ Port |
@replaceafill I just tried the failing package again and here is the error in the Storage Service debug log: amss_debug.log |
@djjuhasz The relevant bit here: locations.models.StorageException: Rsync failed with status 23: b'sending incremental file list\nrsync: change_dir "/transfer_source/home" failed: No such file or directory (2)\ndelta-transmission disabled for local transfer or --whole-file\ntotal: matches=0 hash_hits=0 false_alarms=0 data=0\n\nsent 20 bytes received 79 bytes 198.00 bytes/sec\ntotal size is 0 speedup is 0.00\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1205) [sender=3.1.3]\n' Could it be a problem with your spaces set up? The |
@replaceafill it looks to me like the AM or the AMSS are prepending "/transfer_source" to the "/home/small.zip" from the "path" parameter in the request. How would I set up the spaces incorrectly to cause this problem? I included a screenshot of the transfer source directories config from the AMSS dashboard in the initial bug report. The "/transfer_source" directory was initially the "default" transfer source, and I changed the default to "/home" after I first encountered this problem, but if this is a problem that still seems like an AMSS bug. |
@replaceafill also, I can start the |
That is correct! We investigated this today and found a couple of problems:
|
Expected behaviour
Submitting a
POST /api/v2beta/package
request with apath
parameter value that is an absolute path should start processing the transfer at the given path, as per https://www.archivematica.org/en/docs/archivematica-1.16/dev-manual/api/api-reference-archivematica/#package.Current behaviour
Submitting a
POST /api/v2beta/package
request with an absolute path seems to work for some paths and not for others — I'm not clear why some paths don't work while others do. I am testing with an Archivematica deployment that has two transfer source locations configured: "/home" and "/transfer_source". Sending a package request using the path/transfer_source/small_bag.zip
starts a transfer successfully with that, while a request with path/home/small.zip
does not start a transfer.In both cases the HTTP response status is
202 Accepted
and atransfer_id
is returned in the body, but in second case the transfer never actually starts.Both paths exist on the Storage Service server:
Works:
Doesn't work:
Steps to reproduce
Here are the two CURL requests I used for testing:
Works:
Does not work:
Here's a screenshot of the storage location configuration in the Storage Service:
Archivematica MCPServer Debug log for failed transfer:
Archivematica.debug.log
Your environment (version of Archivematica, operating system, other relevant details)
Archivematica version: 1.16.0
OS:
For Artefactual use:
Before you close this issue, you must check off the following:
The text was updated successfully, but these errors were encountered: