forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
Fix build image change controller race #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mfojtik
merged 2 commits into
mfojtik:service-account-push-secrets
from
ncdc:service-account-push-secrets
May 28, 2015
Merged
Fix build image change controller race #2
mfojtik
merged 2 commits into
mfojtik:service-account-push-secrets
from
ncdc:service-account-push-secrets
May 28, 2015
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The build image change controller was performing the following logic once it determined a build was needed: 1. Bump the BuildConfig so the ResourceVersion would be updated, in theory to prevent other image change controllers from being able to trigger a build for the same BuildConfig revision. 2. Make an API call to instantiate a build (BuildGenerator) 3. The BuildGenerator would try to modify the BuildConfig's LastVersion 4. The BuildGenerator would try to create a Build 5. The image change controller would try to update the BuildConfig to set the new LastTriggeredImageID value. If another instance of an image change controller bumped the BuildConfig's ResourceVersion before 3 above, you could get into an infinite race loop where 1 controller would keep bumping the ResourceVersion just before the BuildGenerator tried to update the config's LastVersion. This change makes it so the BuildGenerator is the only thing responsible for both creating a Build and updating the BuildConfig. The Build is created prior to updating the BuildConfig. If the Build creation fails, it won't try to update the BuildConfig. BuildRequest gains a new required field (Image) that the image change controller sets to tell the BuildGenerator what value to set for LastTriggeredImageID.
Author
|
@liggitt PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add JSON descriptions.
mfojtik
pushed a commit
that referenced
this pull request
May 28, 2015
Fix build image change controller race
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These returns mean you'll only process one config.
mfojtik
pushed a commit
that referenced
this pull request
Apr 4, 2016
Instantiate the Jenkins template when JenkinsPipelineStrategy is created
mfojtik
pushed a commit
that referenced
this pull request
Jul 18, 2016
Sync mode for running independently of PaaS to register nodes
mfojtik
pushed a commit
that referenced
this pull request
Jul 12, 2017
Addresses the following comments against the first pull request (openshift#14143): openshift#14143 (review) openshift#14143 (review)
mfojtik
pushed a commit
that referenced
this pull request
Sep 17, 2017
Building images from RPM takes quite a bit of time, so add service catalog to the local image build list. A prerequisite for this task is to have the service catalog binaries compiled, which is done with #1: 1) cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog/hack/build-go.sh 2) hack/build-local-images service-catalog The first script uses the origin tooling to build in the same way as the RPMs are built. Note that a new "enable_default" key has been added to the image_config and set to False for service catalog so that it is not built unless directly specified (as indicated in #2).
mfojtik
pushed a commit
that referenced
this pull request
Feb 8, 2018
Automatic merge from submit-queue. CLI: add support for deployments in oc status @smarterclayton this is a long overdue... current state: ``` $ oc status In project My Project (myproject) on server https://127.0.0.1:8443 svc/ruby-deploy - 172.30.174.234:8080 deployment/ruby-deploy deploys istag/ruby-deploy:latest <- bc/ruby-deploy source builds https://github.com/openshift/ruby-ex.git on istag/ruby-22-centos7:latest build #1 failed 5 hours ago - bbb6701: Merge pull request #18 from durandom/master (Ben Parees <[email protected]>) deployment #2 running for 4 hours - 0/1 pods (warning: 53 restarts) deployment #1 deployed 5 hours ago ``` TODO: - [x] Add rollouts similar to deployment configs - [x] Fix unit tests / Add unit tests - [x] Deal with HPA
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes openshift#1876