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

irmtrash -M can lead to unexpected data loss #4403

Closed
2 tasks done
michael-conway opened this issue May 20, 2019 · 2 comments
Closed
2 tasks done

irmtrash -M can lead to unexpected data loss #4403

michael-conway opened this issue May 20, 2019 · 2 comments
Assignees
Milestone

Comments

@michael-conway
Copy link
Member

michael-conway commented May 20, 2019

  • master
  • 4-2-stable

Bug Report

iRODS 4.2.4. Mix of reg'd and vault data sets. irmtrash -M causes potential data loss. We saw this in both the reg'd files and in the vault itself.

On the registered side It appears that if a reg'd file goes in the trash, removing the trash will delete the underlying file unless it is removed with rm -U. It is highly desireable that either the rm operation or the rmtrash operation should either warn or prevent this (and this appears to be discernable by looking at the physical path?) The rm operation should not, since it operates on a logical file level, force the operator to have foreknowledge of the underlying storage architecture.

The second case, where it appears that irmtrash -M appears to have deleted data sets in the actual iRODS vault is something that needs to be investigated. We have grabbed the rodslog for the time period and will start trying to reconstruct what happened, but some verification of the logical/physical path may help here in case there truly is a bug that can lead to data loss.

iRODS Version, OS and Version

4.2.4

What did you try to do?

irmtrash -M

Mix of vault data and registered data

Expected behavior

Trash operation should not delete physical files that are in the catalog that are not in trash

Observed behavior (including steps to reproduce, if applicable)

See above will begin assessing logs for add'l data

@trel
Copy link
Member

trel commented May 21, 2019

Case 1) Non-vault, registered files - which had been put into the trash

We can definitely look at providing more bumpers/expectation around removing/deleting non-vault registered files. For this deletion to occur, it means that the iRODS service account had write permission to the registered non-vault files. Was this write permission intentional in your case?

It is known/expected for iRODS to unlink registered non-vault files if it has permission to do so. Files in iRODS are considered 'under management'. We may need more warnings/redletters that explain this.

If the iRODS service account does not have write permission on those files, it cannot delete them, but will still remove their entries from the catalog if irm'd.

Case 2) Files in an iRODS Vault - which had been put into the trash

This is... expected behavior? Can you explain a bit more about what happened that was unexpected in this case?

@trel trel added this to the 4.2.7 milestone May 21, 2019
@trel trel modified the milestones: 4.2.7, 4.2.8 Nov 27, 2019
@korydraughn korydraughn self-assigned this Feb 17, 2020
korydraughn added a commit to korydraughn/irods that referenced this issue Apr 3, 2020
korydraughn added a commit to korydraughn/irods that referenced this issue Apr 3, 2020
korydraughn added a commit to korydraughn/irods that referenced this issue Apr 3, 2020
korydraughn added a commit to korydraughn/irods that referenced this issue Apr 3, 2020
@trel
Copy link
Member

trel commented Apr 8, 2020

The iRODS development team has made the decision that removing physical files (in the trash) that are not in an iRODS Vault is dangerous and unexpected.

This change removes that behavior - files in the trash, not in an iRODS Vault, will now only be unregistered if asked to be trimmed or removed. This ships in 4.2.8.

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

No branches or pull requests

3 participants