Skip to content

add closure that guarantees mutex unlock in loop - #12980

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
juanvallejo:jvallejo/guarantee-mutex-unlock-oc-observe
Feb 18, 2017
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
juanvallejo:jvallejo/guarantee-mutex-unlock-oc-observe

Conversation

@juanvallejo

Copy link
Copy Markdown
Contributor

Attempts to address #12930

Based on output from the linked test flake:

00:47:51.777 Running test/cmd/observe.sh:22: executing 'oc observe services --once --all-namespaces' expecting success and text 'default kubernetes'...
05:54:44.989 Connection to 172.18.7.33 closed by remote host.
05:54:44.993 Build step 'Execute shell' marked build as failure

It is a possibility that the test is hanging for multiple hours based on a deadlock happening. This patch eliminates that possibility.

cc @openshift/cli-review @enj @smarterclayton

@enj

enj commented Feb 15, 2017

Copy link
Copy Markdown
Contributor

The diff is significantly easier to see when ignoring whitespace.

@juanvallejo

Copy link
Copy Markdown
Contributor Author

[test]

@smarterclayton

Copy link
Copy Markdown
Contributor

Yeah the continue was broken. LGTM

go func() {
<-time.After(o.exitAfterPeriod)
lock.Lock()
defer lock.Unlock()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary because we os.Exit(0). It doesn't hurt, so not an issue.

@smarterclayton

Copy link
Copy Markdown
Contributor

[merge]

@juanvallejo

Copy link
Copy Markdown
Contributor Author

flaked on #12923 re[test]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 8d7e9d6

@openshift-bot

Copy link
Copy Markdown
Contributor

@fabianofranz

Copy link
Copy Markdown
Contributor

flaked on #12784 (comment) re[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 8d7e9d6

@openshift-bot

openshift-bot commented Feb 18, 2017 •

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/320/) (Base Commit: aa49370) (Image: devenv-rhel7_5932)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants