This diff introduces a method put_dir_ng() (wip name, not sure whether to
replace original put_dir() or not) that creates a tarball from contents of
given directory, copies the tarball to remote machine and extracts the files to
specified remote path.
Details
- Reviewers
kparal jskladan - Group Reviewers
libtaskotron - Maniphest Tasks
- T825: Copying taskdir to disposable minion drops permissions and follows symlinks
- Commits
- rLTRN57d507d6d966: copy dir to minion via tarball
manually run with --libvirt
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Looks good to me as a proof of concept, and if you have tested it thoroughly, I actually think we can just rename it and push it (with some minor tweaks, see below).
libtaskotron/minion.py | ||
---|---|---|
83–85 | Let's add tar as a dependency of libtaskotron-core instead? | |
libtaskotron/remote_exec.py | ||
332 | If this works well, I have no issues replacing the original put_dir method (we can always use git revert). If you think there are still some uses for a standard recursive copy, let's name this put_dir_tarred(). | |
334 | Using ``local_path`` and ``remote_path`` helps readability in docs. | |
362 | It seems you don't delete this file afterwards. | |
363 | What if task.tar is already there? What if task.tar is inside the tar? :-) | |
365 | Maybe with statement could be useful here. | |
369 | Does this work for nested directories? Please try with: dir file dir/file dir/dir/file (using these exact names) | |
testing/test_remote_exec.py | ||
229 | I might be slow today, but I think the assert and is None do nothing here, because the method raises the error, and therefore neither the assert not the comparison is executed at all. |
F23 contains 1.28-6.