GoogleCloudPlatform/cloud-build-local

Error building Docker container when nothing has changed

href opened this issue · 6 comments

href commented

When running cloud-build-local twice against the same configuration, two errors pop up the second time around, at the very end of the run:

  • Error updating docker credentials: failed to update docker credentials: signal: killed
  • Failed to delete homevol: exit status 1

This only happens if there were no changes to the Dockerfile in-between runs. It also does not impact the usage of cloud-build-local from what I can tell, it just seems to be some clean-up issue.

To reproduce the issue, create a cloudbuild.yaml with the following content:

steps:
- name: gcr.io/cloud-builders/docker
  args:
  - build
  - --tag=foo:bar
  - .
images:
- foo:bar

As well as a Dockerfile with this content:

FROM ubuntu:latest as build-env
ENTRYPOINT /usr/bin/bash

Then run the following command twice (assuming foo:bar is not a known image):

cloud-build-local --dryrun=false .

In my case, this is the output I'm seeing:

$ cloud-build-local --dryrun=false .
2019/03/20 11:59:48 Warning: The server docker version installed (18.09.2) is different from the one used in GCB (18.09.0)
2019/03/20 11:59:48 Warning: The client docker version installed (18.09.2) is different from the one used in GCB (18.09.0)
Using default tag: latest
latest: Pulling from cloud-builders/metadata
Digest: sha256:6eb6787cfcbd4b0b5cc20fb02797e83adc46a42112215dda9cdae6afbe3a9023
Status: Image is up to date for gcr.io/cloud-builders/metadata:latest
2019/03/20 11:59:55 Started spoofed metadata server
2019/03/20 11:59:55 Build id = localbuild_7a3f1e50-7c8c-4ed8-baba-3063a357065c
2019/03/20 11:59:55 status changed to "BUILD"
BUILD
: Already have image (with digest): gcr.io/cloud-builders/docker
: Sending build context to Docker daemon  3.072kB
: Step 1/2 : FROM ubuntu:latest as build-env
:
:  ---> 94e814e2efa8
: Step 2/2 : ENTRYPOINT /usr/bin/bash
:
:  ---> Running in f0775bc706db
: Removing intermediate container f0775bc706db
:  ---> 0c4e4223c99f
: Successfully built 0c4e4223c99f
: Successfully tagged foo:bar
2019/03/20 11:59:57 Step  finished
2019/03/20 11:59:57 status changed to "DONE"
DONE

$ cloud-build-local --dryrun=false .
2019/03/20 12:00:29 Warning: The server docker version installed (18.09.2) is different from the one used in GCB (18.09.0)
2019/03/20 12:00:29 Warning: The client docker version installed (18.09.2) is different from the one used in GCB (18.09.0)
Using default tag: latest
latest: Pulling from cloud-builders/metadata
Digest: sha256:6eb6787cfcbd4b0b5cc20fb02797e83adc46a42112215dda9cdae6afbe3a9023
Status: Image is up to date for gcr.io/cloud-builders/metadata:latest
2019/03/20 12:00:36 Started spoofed metadata server
2019/03/20 12:00:36 Build id = localbuild_32d76dc1-4368-4e7f-97c2-9ba46256a7fa
2019/03/20 12:00:36 status changed to "BUILD"
BUILD
: Already have image (with digest): gcr.io/cloud-builders/docker
: Sending build context to Docker daemon  3.072kB
: Step 1/2 : FROM ubuntu:latest as build-env
:
:  ---> 94e814e2efa8
: Step 2/2 : ENTRYPOINT /usr/bin/bash
:
:  ---> Using cache
:  ---> 0c4e4223c99f
: Successfully built 0c4e4223c99f
: Successfully tagged foo:bar
2019/03/20 12:00:37 Step  finished
2019/03/20 12:00:38 status changed to "DONE"
DONE
2019/03/20 12:00:38 Error updating docker credentials: failed to update docker credentials: signal: killed
2019/03/20 12:00:38 Failed to delete homevol: exit status 1

Hey @href , these are just warnings, as your build seems to be successful (DONE).

href commented

I understand, just thought I'd send a report. Since I can't do anything about those warnings I would rather not see them.

I am getting the same thing with the following cloudbuild.yml.

steps:
- name: 'gcr.io/cloud-builders/docker'
  args: ['ps']

cloud-build-version = 2019/04/04 10:40:09 Version: v0.5.0
Google Cloud SDK 240.0.0
bq 2.0.42
cloud-build-local
core 2019.03.22
docker-credential-gcr
gsutil 4.37
Docker version 18.09.1, build 4c52b90

I'm still seeing this 6 months later. It should be easy to repro. Is this project dead? (I'd be more diplomatic if I hadn't been a big fan of a number of other abandoned Google projects...)

I'm experiencing this as well. Just added a new cluster and switched to the context for that cluster, which shouldn't affect my cloud-build-local, but that's the only change I can think of.

version info:

beta 2019.05.17
bq 2.0.54
cloud-build-local
core 2020.02.21
gsutil 4.47
kubectl 2020.02.07```

Close Issue as part of archive process; please see notice of archive status.