Skip to content

Commit

Permalink
Merge pull request #8085 from tangledbytes/utkarsh/backport/5.15.3/ta…
Browse files Browse the repository at this point in the history
…pecloud-fix-1

[Backport 5.15] [NC | NSFS | Glacier] filter out failed recalls
  • Loading branch information
nimrod-becker authored May 29, 2024
2 parents f83dc62 + c8e1c7e commit 053edc4
Show file tree
Hide file tree
Showing 5 changed files with 460 additions and 193 deletions.
5 changes: 5 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,11 @@ config.NSFS_GLACIER_BACKEND = 'TAPECLOUD';
// TAPECLOUD Glacier backend specific configs
config.NSFS_GLACIER_TAPECLOUD_BIN_DIR = '/opt/ibm/tapecloud/bin';

// If set to true will disable cleanup of the task show output
// Should be used only for debugging or else will keep filling
// up the disk space.
config.NSFS_GLACIER_TAPECLOUD_PRESERVE_TASK_SHOW_OUTPUT = false;

// NSFS_GLACIER_MIGRATE_INTERVAL indicates the interval between runs
// of `manage_nsfs glacier migrate`
config.NSFS_GLACIER_MIGRATE_INTERVAL = 15 * 60 * 1000;
Expand Down
8 changes: 8 additions & 0 deletions src/sdk/nsfs_glacier_backend/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,14 @@ class GlacierBackend {
const restore_status = GlacierBackend.get_restore_status(stat.xattr, new Date(), file);
if (!restore_status) return false;

// We don't check for pre-existing expiry here, it can happen in 2 cases
// 1. A restore is already going and someone somehow initiated this second
// call. In that case we might see partial extended attributes such that
// both request as well a future expiry time exists.
// 2. A restore request was partially processed and then failed before
// removing the request extended attribute. In such case, NSFS would still
// report the object restore status to be `ONGOING` and we are going
// to allow a retry of that entry.
return restore_status.state === GlacierBackend.RESTORE_STATUS_ONGOING;
}
}
Expand Down
Loading

0 comments on commit 053edc4

Please sign in to comment.