Repository navigation
Closed
Description
I restarted my server after running a few builds, and now start-build is broken:
$ osc start-build ruby-sample-build
F0408 18:52:44.617205 24019 startbuild.go:41] Error received from API: build "ruby-sample-build-3" already exists
This should never happen
$ osc get bc -o yaml
apiVersion: v1beta1
creationTimestamp: null
items:
- apiVersion: v1beta1
kind: BuildConfig
lastVersion: 4
metadata:
creationTimestamp: 2015-04-08T16:48:25Z
labels:
name: ruby-sample-build
template: application-template-stibuild
name: ruby-sample-build
namespace: default
resourceVersion: "16430"
selfLink: /osapi/v1beta1/buildConfigs/ruby-sample-build?namespace=default
uid: 12eb6b3c-de0f-11e4-9cef-080027c5bfa9
parameters:
output:
to:
kind: ImageStream
name: origin-ruby-sample
source:
git:
uri: git://github.com/openshift/ruby-hello-world.git
type: Git
strategy:
stiStrategy:
builderImage: openshift/ruby-20-centos7
image: openshift/ruby-20-centos7
type: STI
triggers:
- github:
secret: secret101
type: github
- generic:
secret: secret101
type: generic
- imageChange:
from:
name: ruby-20-centos7
image: openshift/ruby-20-centos7
imageRepositoryRef:
name: ruby-20-centos7
lastTriggeredImageID: openshift/ruby-20-centos7:latest
tag: latest
type: imageChange
kind: List
resourceVersion: 16463
$ osc get builds -o yaml
apiVersion: v1beta1
creationTimestamp: null
items:
- apiVersion: v1beta1
completionTimestamp: 2015-04-08T18:50:12Z
config:
kind: BuildConfig
name: ruby-sample-build
namespace: default
kind: Build
metadata:
creationTimestamp: 2015-04-08T18:43:53Z
labels:
buildconfig: ruby-sample-build
name: ruby-sample-build
template: application-template-stibuild
name: ruby-sample-build-3
namespace: default
resourceVersion: "16223"
selfLink: /osapi/v1beta1/builds/ruby-sample-build-3?namespace=default
uid: 34b7250c-de1f-11e4-aca4-080027c5bfa9
parameters:
output:
dockerImageReference: 172.30.17.133:5000/default/origin-ruby-sample
imageTag: default/origin-ruby-sample
registry: 172.30.17.133:5000
to:
kind: ImageStream
name: origin-ruby-sample
source:
git:
uri: git://github.com/openshift/ruby-hello-world.git
type: Git
strategy:
stiStrategy:
builderImage: openshift/ruby-20-centos7:latest
image: openshift/ruby-20-centos7:latest
type: STI
status: Failed
- apiVersion: v1beta1
completionTimestamp: 2015-04-08T18:50:12Z
config:
kind: BuildConfig
name: ruby-sample-build
namespace: default
kind: Build
metadata:
creationTimestamp: 2015-04-08T18:46:22Z
labels:
buildconfig: ruby-sample-build
name: ruby-sample-build
template: application-template-stibuild
name: ruby-sample-build-4
namespace: default
resourceVersion: "16216"
selfLink: /osapi/v1beta1/builds/ruby-sample-build-4?namespace=default
uid: 8d553178-de1f-11e4-aca4-080027c5bfa9
parameters:
output:
dockerImageReference: 172.30.17.133:5000/default/origin-ruby-sample
imageTag: default/origin-ruby-sample
registry: 172.30.17.133:5000
to:
kind: ImageStream
name: origin-ruby-sample
source:
git:
uri: git://github.com/openshift/ruby-hello-world.git
type: Git
strategy:
stiStrategy:
builderImage: openshift/ruby-20-centos7:latest
image: openshift/ruby-20-centos7:latest
type: STI
status: Failed
kind: List
resourceVersion: 16492
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.
Activity
bparees commentedon Apr 8, 2015
that's pretty odd since the BC specifically shows LastVersion=4.
smarterclayton commentedon Apr 8, 2015
Can a controller update that? It's possible the controller was still processing on restart when I ran the command (it shouldn't have failed to start the build though).
----- Original Message -----
bparees commentedon Apr 8, 2015
I don't think the controller should be updating it, it should be updated when we create the build which is now the responsibility of the instantiate/clone endpoint. but @soltysh is the expert here since that's all his new code.
i guess i'm wondering if you'd run start-build a second time, what would have happened. (would it have gotten "5" as i'd expect? and if so, who got "4"?)
brenton commentedon Apr 20, 2015
@bparees, did something land in master to address this? I'm not seeing this issue in the latest OSE builds.
bparees commentedon Apr 20, 2015
we got some etcd fixes, maybe that helped?
bparees commentedon Apr 20, 2015
otherwise no, nothing that i know of was specifically targeted at or changed this flow.
smarterclayton commentedon Apr 20, 2015
This might have been fixed by andy's change to the trigger.
----- Original Message -----
ncdc commentedon Apr 20, 2015
My change to the trigger ensures that the From image stream matches on both namespace and name, defaulting the namespace to the bc's namespace if it's not specified. Without my fix, builds would be created endlessly if you have 2 streams with the same name but in different namespaces. I'm not sure it would fix this?
bparees commentedon Apr 20, 2015
@smarterclayton you mean the image change controller fix? what @ncdc just said as i was writing this. :)
smarterclayton commentedon Apr 24, 2015
Closing based on unreproducibility
Squashed 'cmd/service-catalog/go/src/github.com/kubernetes-incubator/…