labgrid-project / labgrid-project/labgrid
ManagedFile uses `/var/cache/labgrid/..` sync path even when resource is remote
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 528
- Forks
- 278
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 4
Description
Currently the implementation of sync_to_resource() in managed file always uses the user cache directory (var/cache/labgrid/..), even when user of the class provides a remote resource, meaning the connection is actually not to the exporter, but to the target machine.
This works when the target user is root and able to create the /var/cache/labgrid/.. directory, but it might fail when they are not.
To fix this, the directory could maybe be /var/tmp or /tmp like it is done in other parts of the code ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the ManagedFile implementation and its sync_to_resource() method, then trace how the sync path is chosen for remote resources. Reproduce the case with a non-root target user and verify that synchronization uses a writable temporary location rather than the target machine’s cache directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100