-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Resolve build hang when docker daemon under load #13817
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
Conversation
237c3d1
to
8c38b1f
Compare
There were other bugs, but I think flake #13694 was seen at https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_extended/236/consoleFull#110463848456cbb9a5e4b02b88ae8c2f77 |
@bparees 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.
A very minor suggestion. Otherwise I like the clever yet simple solution for this.
@@ -40,7 +41,11 @@ type runtimeBuilderFactory struct{} | |||
|
|||
// Builder delegates execution to S2I-specific code | |||
func (_ runtimeBuilderFactory) Builder(config *s2iapi.Config, overrides s2ibuild.Overrides) (s2ibuild.Builder, s2iapi.BuildInfo, error) { | |||
builder, buildInfo, err := s2i.Strategy(config, overrides) | |||
client, err := docker.NewEngineAPIClient(config.DockerConfig) |
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.
A comment somehow connecting the dots to the docker daemon load issue might be useful months from now when someone looks at this and asks why we don't construct the client just once.
@@ -259,7 +264,11 @@ func (s *S2IBuilder) Build() error { | |||
return errors.New(buffer.String()) | |||
} | |||
|
|||
glog.V(4).Infof("Creating a new S2I builder with build config: %#v\n", describe.Config(config)) | |||
client, err := docker.NewEngineAPIClient(config.DockerConfig) |
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.
A comment somehow connecting the dots to the docker daemon load issue might be useful months from now when someone looks at this and asks why we don't construct the client just once.
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.
+1
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.
Hmm, the docker daemon load issue is dealt with in the bowels of s2i; this PR is really just the bump. The API changed to require passing in a docker client, hence this diff. I'm not sure that really merits a comment (he says, having just written this explanation here).
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.
sorry the git diff tricked me into thinking both of these changes were in the same function and thus someone would expect to reuse the same client object.
agree w/ @gabemontero's suggestion, otherwise lgtm. |
Evaluated for origin test up to 815fa61 |
Evaluated for origin testextended up to 815fa61 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/1002/) (Base Commit: b6b92db) |
continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_extended/261/) (Base Commit: b6b92db) (Extended Tests: core(builds)) |
[merge] |
Evaluated for origin merge up to 815fa61 |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/507/) (Base Commit: 03beec0) (Image: devenv-rhel7_6186) |
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1442875
[test][testextended][extended:core(builds)]