Make Shaman compatible with symlinked storage directories #99965
Labels
No Label
Good First Issue
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Job Type
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: studio/flamenco#99965
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Shaman gets confused when it's configured to a storage directory that's a symlink to some other place. The effect is that the garbage collector will compare the actual, physical path of a file with the symlinked storage path, which will fail. As a result, files will be garbage collected even when they're still in use.
This surfaced when running the unit tests on macOS. The
TestGCComponents
unit test (inpkg/shaman/cleanup_test.go
) uses a temporary directory (viaioutil.TempDir(...)
) that on a Mac will be something like/var/folders/...
. However,/var
is a symlink to/private/var
, and thus the Shaman Garbage Collector will be comparing/private/var/folders/blabla
symlinks to/var/folders/blabla
paths.Marking as high priority as this can cause loss of files. However, I expect it to be unlikely to happen in practice, as Flamenco should just be configured with the actual storage path.
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @dr.sybren
To recreate this problem (on Linux workstation) in the Flamenco Shaman unit tests, comment out L38-41 in
Then create a symlinked TempDir() path.
This will generate GC unit tests errors like...
I actually created the scenario for this accidental deletion when I was supporting more than one type of shared-storage system (SMB for Artists workstations + NFS for worker cluster on the same Flamenco Manager workstation. I had symlinked one to the other and could have easily chosen Flamenco Manager to use the sym-linked path.
That's good to know. What was the reason for symlinking, rather than simply configuring both Samba and NFS to expose the same path?