https://garden.io logo
#🌱|help-and-getting-started
Build Failure
# 🌱|help-and-getting-started
b

blue-lunch-98125

01/12/2023, 3:09 PM
I am attempting to bring my company over from a docker-compose and Jenkins setup to Garden. I am running into a build failure, and can't make sense of what is going on. I get the following output:
Copy code
Command "docker exec -i  crictl images --output=json docker.io/library/pgbouncer:v-67ed3bcc63" failed with code 1:
Seems like maybe it is missing the correct image name? This is running under debian. There's nothing interesting about the module or dockerfile afaict. Any ideas what might be going on here?
Happy to provide any other context that may be of use. Please just let me know.
q

quaint-dress-831

01/16/2023, 6:22 PM
Hey there, we just wrapped our quarterly kick-off and this didn't get the attention it deserved. Have you tested using another Dockerfile or Docker image?
Do you mind putting a re-usable example here or in a gist so I can test?
b

blue-lunch-98125

01/17/2023, 1:15 PM
Hi. Thanks for getting back to me. Unfortunately, even the example application from the quickstart fails to build. The full output is too long, and is also automodded when I try to post. Essentially the same as above.
I have been digging around a bit, but I can't seem to find any way to get debug info about what is being autodiscovered on my system, etc. I did however discover that
garden get vaccine
appears to be broken πŸ˜‰
c

cold-jordan-68753

01/17/2023, 1:40 PM
Hey imw, great that you are trying out garden πŸ™‚ If you try with
garden build <service> -l4
there should be a bit more logs, could you paste a couple of more lines related to the failure for context?
b

blue-lunch-98125

01/17/2023, 1:44 PM
Yes, for example:
Copy code
Failed building worker. Here is the output:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Command "docker exec -i  crictl images --output=json docker.io/library/worker:v-4474f17920" failed with code 1:

Error: No such container:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[silly] Error: Command "docker exec -i  crictl images --output=json docker.io/library/worker:v-4474f17920" failed with code 1:

Error: No such container:
    at makeError (/snapshot/project/tmp/pkg/cli/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/snapshot/project/tmp/pkg/cli/node_modules/execa/index.js:114:26)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at exec (/snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/src/util/util.ts:215:17)
    at /snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/src/plugins/kubernetes/local/kind.ts:51:23

Error Details:

shortMessage: >-
  Command failed with exit code 1: docker exec -i  crictl images --output=json
  docker.io/library/worker:v-4474f17920
command: >-
  docker exec -i  crictl images --output=json
  docker.io/library/worker:v-4474f17920
exitCode: 1
stdout: ''
stderr: 'Error: No such container: '
all: 'Error: No such container: '
failed: true
timedOut: false
isCanceled: false
killed: false
(That actually only shows up with
-l5
, btw)
c

cold-jordan-68753

01/17/2023, 1:55 PM
Looking at the command itself:
docker exec -i  crictl images --output=json docker.io/library/worker:v-4474f17920
, there seems to be an extra space between
-i
and
crictl
. Like its missing something...
garden build worker --env=local
, maybe it cannot find your local kubernetes cluster?
b

blue-lunch-98125

01/17/2023, 1:56 PM
I agree it seems to be missing the container name. I am using
kind
for a local cluster. Running the suggested gets the same error.
c

cold-jordan-68753

01/17/2023, 2:02 PM
Not sure I can repro this on a mac, but this looks like a bug to me.
Do you have some alternative local kubernetes to test with?
b

blue-lunch-98125

01/17/2023, 2:09 PM
I could try again with k3s. Will give that a shot and let you know how it goes.
c

cold-jordan-68753

01/17/2023, 2:26 PM
Tried to repro with kind on a mac, but it works. I did follow, https://docs.garden.io/guides/local-kubernetes#kind, to create the kind cluster and then configured ingress manually as in the workaround here: https://github.com/garden-io/garden/issues/3436
b

blue-lunch-98125

01/17/2023, 2:33 PM
Hmm. Thanks for trying - my kind cluster was also set up using those instructions.
I wasn't able to get k3s configured cleanly with ingress, but I can confirm that the builds do succeed with microk8s. I figure they will also probably work with docker desktop, which is most of what the rest of the team will use.
If I can provide any info that would be useful in tracking down what is going on with
kind
, please just let me know.
b

bright-policeman-43626

01/17/2023, 8:06 PM
Have you tried Docker desktop? It has ingress setup out of the box @blue-lunch-98125
b

blue-lunch-98125

01/18/2023, 9:33 AM
Ah, I didn't realize there was a linux build for it. I'll give that a shot as well.
q

quaint-dress-831

01/23/2023, 2:02 PM
@blue-lunch-98125 did you have a chance to test with Docker Desktop?
b

bright-policeman-43626

01/24/2023, 11:10 PM
Also rancher desktop now has a Kubernetes solution that includes a Traefik ingress, I might give that one a try as well later to provide different alternatives for local-ingress
q

quaint-dress-831

01/25/2023, 1:46 PM
@bright-policeman-43626 (assuming you already know this but just in case) make sure you switch to using the Moby runtime with RD as we don't support the containerd runtime currently
b

bright-policeman-43626

01/25/2023, 3:00 PM
Yes! That’s true, already experimented some issues because of that, definitely we need to use Moby instead of containerd
2 Views