drakkar-lig / walt-python-packages

Home of walt-node, walt-server, walt-client and walt-common python packages.
https://walt-project.liglab.fr
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Unable to copy current directory. #31

Closed sandikkaya closed 4 years ago

sandikkaya commented 5 years ago

As walt [node|image] cp command is actually based on tar functionality and generates temporary files within the working directory during file transfers, it is not possible to copy all files in the working directory to an image or a node.

Interestingly, even though the copying never actually occurred, walt image cp triggers a reboot of nodes in this case.

Please consider the following scenario:

user@waltsrvr:~$ mkdir tmp
user@waltsrvr:~$ cd tmp
user@waltsrvr:~/tmp$ touch tmp.txt
user@waltsrvr:~/tmp$ ls
tmp.txt
user@waltsrvr:~/tmp$ walt image cp . myimage:/root/
mv: '..8F4ABD3E' and './..8F4ABD3E' are the same file
Image myimage updated.
user@waltsrvr:~/tmp$ walt image shell myimage
Notice: this is a limited virtual environment.
Run 'walt help show shells' for more info.

root@image-shell:/# cd root/
root@image-shell:~# ls
root@image-shell:~# exit
exit
New image name [myimage]: ^CAborted.
user@waltsrvr:~/tmp$