devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.31k stars 361 forks source link

start sync: error executing tar: : command terminated with exit code 126 #1684

Closed AskAlice closed 1 year ago

AskAlice commented 3 years ago

What happened?

running a docker image built with a custom script, that handles some aspect of tagging the image, it does pair up with the image but it then returns

[0:sync] Starting sync...
[fatal]  start sync: unable to start sync: start sync: error executing tar: : command terminated with exit code 126

What did you expect to happen instead?

sync to work

How can we reproduce the bug? (as minimally and precisely as possible)

Local Environment:

Kubernetes Cluster: minikube

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.6", GitCommit:"fbf646b339dc52336b55d8ec85c181981b86331a", GitTreeState:"clean", BuildDate:"2020-12-18T12:09:30Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.6", GitCommit:"fbf646b339dc52336b55d8ec85c181981b86331a", GitTreeState:"clean", BuildDate:"2020-12-18T12:01:36Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.6", GitCommit:"fbf646b339dc52336b55d8ec85c181981b86331a", GitTreeState:"clean", BuildDate:"2020-12-18T12:09:30Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.6", GitCommit:"fbf646b339dc52336b55d8ec85c181981b86331a", GitTreeState:"clean", BuildDate:"2020-12-18T12:01:36Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}

Anything else we need to know?

/kind bug

FabianKramm commented 3 years ago

@AskAlice thanks for creating this issue! Looks like the tar command is not present in the target container, but it is required for the sync to function correctly. Could that be the case?

timo-klarshift commented 2 years ago

I am having the same issue

[fatal]  start sync: start sync: error executing tar: : command terminated with exit code 126

tar is available in the target container:

root@c8553b493b62:/go# tar --version
tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
root@c8553b493b62:/go# 

Maybe its a special version of it?

timo-klarshift commented 2 years ago

For me the issue was a Pod deployment with multiple containers without setting dev.sync.containerName=xxx