archivematica / Issues

Issues repository for the Archivematica project
GNU Affero General Public License v3.0
16 stars 1 forks source link

Problem: When using import_aip with and S3 AIPsStore it uses default TS as tmp directory and files are not removed #1035

Open mamedin opened 4 years ago

mamedin commented 4 years ago

Expected behaviour I expected to import the AIPs without changing the /home directory owner to the "archivematica" user. The tmp files should be removed after the AIP import.

Current behaviour

When importing AIPs with the import_aip command and a S3 AIPsStore, the default TS is used as tmp directory. See:

https://github.com/artefactual/archivematica-storage-service/blob/stable/0.15.x/storage_service/common/management/commands/import_aip.py#L265-L266

I think that tmp directory (local_as_location) should be configurable.

A secondary issue is: those tmp files are not removed after the AIP import.

Steps to reproduce

Import an AIP to S3 AIPsStore

Your environment (version of Archivematica, operating system, other relevant details)

CentOS 7.7 and SS v0.15.1


For Artefactual use:

Before you close this issue, you must check off the following:

mamedin commented 4 years ago

Related: https://github.com/archivematica/Issues/issues/706

ross-spencer commented 4 years ago

@mamedin it might not be related, but as we're in S3 territory here, do you think it's related to this too? I'd need to walk through it some more to figure out if it triggers that part of the code. (Would depend I guess on what the updated import AIP script does for you too...)

mamedin commented 4 years ago

@ross-spencer you are right, there are also some tmp directories from import_aip in /var/archivematica/storage_service directory.

When downloading the S3 AIPs, SS downloads the AIP to the /var/archivematica/storage_service directory too, and that files are not removed after the AIP download.