Skip to content

How to treat builds upon unsuccesfull retries #2269

@soltysh

Description

@soltysh

Problem

  1. I create a BuildConfig object with non-existing ImageStream. When a new build is created from such BC, current build controller implementation will retry to schedule that build for ever, because this error is marked as recoverable.
  2. I create a BuildConfig object with non-existing pullSecretName or sourceSecretName'. When a new build is created from such BC the build pod gets created but will hang inPending` state, and you'll see following errors:
E0512 13:56:58.757800   13539 secret.go:119] Couldn't get secret test/mysecret
E0512 13:56:58.757986   13539 kubelet.go:943] Unable to mount volumes for pod "ruby-sample-build-2_test": secrets "mysecret" not found; skipping pod
E0512 13:56:58.782942   13539 pod_workers.go:102] Error syncing pod b6c9609f-f8ae-11e4-a008-080027c5bfa9, skipping: secrets "mysecret" not found

Solution

I see two possible solutions in this situation:

  1. Fail the build with message, where the message contains the error log. There's my initial try to address problem 1 in Fail build after several unsuccessfull retries #2220. The idea there is to have a timer based retry, we'd fail the build after 30 mins of retries.
  2. Leave the build in endless retry but still providing the user with information about current status, where the status would contain eventual errors described above. Yet with this we should also provide user with simple tool allowing removing previous build and pod at once, although maybe cancel should suffice here. This is current outcome from the issue I opened upstream Missing secret loops endlessly kubernetes/kubernetes#8178

//cc @bparees @mfojtik @smarterclayton

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions