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.3k stars 360 forks source link

devspace hanging on "Starting sync" #1625

Open ad12 opened 3 years ago

ad12 commented 3 years ago

What happened? I launched devspace sync with the argument flags below, and the status shows that devspace sync is not moving beyond the "Starting sync..." message (waited for \~1hr). When I ssh into the pod, i can see that the specified container path does not have any of the files in the local path.

devspace sync --upload-only --pod io-pod --verbose --local-path ~/Documents/kubectl-data/ --container-path /home/data/

From what I gather, this may often be described as a network issue. However, when i do a standard scp between this machine and other machines not on the same network, the operation is immediate.

What did you expect to happen instead? The syncing should start almost immediately.

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

Local Environment:

Kubernetes Cluster:

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.4", GitCommit:"3cce4a82b44f032d0cd1a1790e6d2f5a55d20aae", GitTreeState:"clean", BuildDate:"2021-08-13T15:45:10Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.8-gke.2100", GitCommit:"4cd085fda961821985d176d25b67445c1efb6ba1", GitTreeState:"clean", BuildDate:"2021-07-16T09:22:57Z", GoVersion:"go1.15.13b5", Compiler:"gc", Platform:"linux/amd64"}

Anything else we need to know?

/kind bug

FabianKramm commented 3 years ago

@ad12 thanks for reporting this issue! Is there a /tmp/devspacehelper binary in the container? Could you send the complete output of DevSpace here?

Vl-Mikhail commented 2 years ago

I have same problem, can you help? I have /tmp/devspacehelper in container. My output:

➜  hint git:(front-and-back) ✗ devspace sync --debug --config ./devspace.yaml
10:53:56 [info]   Using namespace 'dev'
10:53:56 [info]   Using kube context 'k3d-my-cluster'

? Multiple sync configurations found. Which one do you want to use? 1: Sync img-selector: image(back-office):tag(back-office): ./back-office <-> /opt/app 
10:54:42 [info]   Waiting for containers to start...
11:02:38 [info]   Starting sync...
11:02:38 [info]   Trying to download devspacehelper into pod dev/back-office-745b86f464-k5vg6
11:02:44 [done] √ Successfully injected devspacehelper into pod dev/back-office-745b86f464-k5vg6
11:02:44 [info]   Start syncing
11:02:44 [done] √ Sync started on /back-office <-> /opt/app (Pod: dev/back-office-745b86f464-k5vg6)
11:02:44 [debug]  Initial Sync - Retrieve Initial State
11:02:44 [debug]  Downstream - Start collecting changes
11:02:44 [info]   Helper - Use inotify as watching method in container
11:02:44 [debug]  Downstream - Done collecting changes
11:02:44 [debug]  Initial Sync - Done Retrieving Initial State
11:02:44 [debug]  Initial Sync - Calculate Delta from Remote State
11:02:44 [debug]  Initial Sync - Done Calculating Delta (Download: 0, Upload: 108)
11:02:45 [debug]  Upstream - Start applying 108 changes
11:02:45 [debug]  Start hashing 1 files
11:02:45 [debug]  Done hashing 1 files
11:02:45 [info]   Upstream - Upload 108 create change(s) (Uncompressed ~4981.88 KB)
11:02:45 [debug]  Upstream - Done Uploading
11:02:45 [info]   Upstream - Successfully processed 108 change(s)
11:02:45 [debug]  Upstream - Done applying changes
11:02:46 [debug]  Downstream - Start collecting changes
11:02:46 [debug]  Downstream - Done collecting changes
11:02:46 [debug]  Downstream - Start applying 0 changes
11:02:46 [debug]  Downstream - Done applying changes