Open kayaclick opened 3 weeks ago
@kayaclick
Hello! Is the devspace_start.sh
included in the container build? Or should it be synced with your dev.sync
configuration? I ask because the sync configuration doesn't seem like it would include the file at the path /usr/local/apache2/devspace_start.sh
sync:
- path: dist:/usr/local/apache2/htdocs/
Another thing to try, is after running kubectl exec -- /bin/bash
and ls -la
shows that the file exists, try executing it. Sometimes there's a shebang (#!/bin/zsh
) or similar declaration that doesn't exist in a particular environment, and the error makes it appear as if it can't find the script, when it's really the shebang that's missing.
@kayaclick
Hello! Is the
devspace_start.sh
included in the container build? Or should it be synced with yourdev.sync
configuration? I ask because the sync configuration doesn't seem like it would include the file at the path/usr/local/apache2/devspace_start.sh
sync: - path: dist:/usr/local/apache2/htdocs/
Another thing to try, is after running
kubectl exec -- /bin/bash
andls -la
shows that the file exists, try executing it. Sometimes there's a shebang (#!/bin/zsh
) or similar declaration that doesn't exist in a particular environment, and the error makes it appear as if it can't find the script, when it's really the shebang that's missing.
Hey Russell, thanks for the response. Trying to execute the .sh file is something I have not tried. Next time I am debugging one of the developer machines reproducing this issue, I will try that. I did modify the devspace_start.sh file from the devspace init command, so they do have #!/bin/bash
at the top of the file.
To answer your other question, yes, the .sh file is included initially when the docker image is built as the last layer step in most cases of the Dockerfiles like so:
COPY ./devspace_start.sh ./
What happened?
I have a configuration running several applications, some dbs, ect... inside Kubernetes. This is deployed with Rancher / Helm and we are using devspace to do local file sync / development work with those container images.
devspace dev
throws the following error on their machines only, it works on my machine:Devspace is able to fully complete creating the SSH session with the container, start the ssh server on the container, start and complete file sync, and then fails to find this file.
Console output from running
devspace dev
:What did you expect to happen instead?
The path in question that I've specified in
devspace.yaml
(seen below) changes per project but I've verified they are all correct by connecting viakubectl exec -- /bin/bash
into the same container image and verifying the file is there and permissions look correct. I have also tried this with relative paths./devspace_start.sh
but the issue persisted on their machines despite both ways working for me.ls -la
inside the container directory in question shows:The file is definitely on the container...
I've had them check with other projects (with other paths i've verified) and they have the same issue. I've also checked the logs inside the .devspace folder in the local directory but only have errors related to networks being closed. Additionally, I did plenty of debugging related to the building of the docker image itself, including fully clearing the build cache and recreating it on their machines locally, but the issue persisted.
I'm pretty new to devspace and it seems great so far aside from this one major issue, so any help would be appreciated...
How can we reproduce the bug? (as minimally and precisely as possible)
I cannot reproduce the issue locally on my machine unfortunately.
My devspace.yaml:
Local Environment:
Anything else we need to know?