[lxc-users] lxd 2.15 broke "lxc file push -r"?

Stéphane Graber stgraber at ubuntu.com
Thu Jun 29 04:30:42 UTC 2017


On Thu, Jun 29, 2017 at 03:24:46AM +0000, Tomasz Chmielewski wrote:
> With lxd 2.14:
> 
> # mkdir /tmp/testdir
> # touch /tmp/testdir/file1 /tmp/testdir/file2
> # lxc file push -r /tmp/testdir/ testvm1/tmp     # <---- note the trailing slash after /tmp/testdir/
> # echo $?
> 0
> # lxc exec testvm1 ls /tmp
> file1  file2
> 
> 
> With lxd 2.15:
> 
> # mkdir /tmp/testdir
> # touch /tmp/testdir/file1 /tmp/testdir/file2
> # lxc file push -r /tmp/testdir/ testvm2/tmp     # <---- note the trailing slash after /tmp/testdir/
> # lxc exec testvm2 ls /tmp
> testdir
> # lxc exec testvm2 ls /tmp/testdir
> file1  file2
> 
> 
> This breaks many scripts!

Hmm, so that just proves that we really more systematic testing of the
way we handle all that mess in "lxc file push".

For this particular case, my feeling is that LXD 2.5's behavior is
correct. It's the same behavior as you get from "cp -R" and from "scp
-r" which are the templates we've been using for that command.


But the fact that this behavior changed and didn't cause any test
regression is concerning and something that should be addressed.
Christian mentioned looking at the testsuite for "cp" and having our own
do pretty much the same tests for things like path handling, symlink
dereferencing, ...


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170629/f5458683/attachment.sig>


More information about the lxc-users mailing list