Skip to content

Improve leader leasing error return info - #7918

Merged
openshift-bot merged 3 commits into
openshift:masterfrom
smarterclayton:improve_lease_message
Jun 15, 2016
Merged

openshift-bot merged 3 commits into
openshift:masterfrom
smarterclayton:improve_lease_message

Conversation

@smarterclayton

Copy link
Copy Markdown
Contributor

Print more information at the appropriate spot when we lose a lease.

Start trying to renew the lease 2/3 of the way through the interval, rather than 1/4.

Fix some minor issues with logging.

@deads2k I think I caught all of the issues resulting from adding a buffered channel, but the code is more complex now. We only truly need the lease renewal change for 1.2, but this was a good opportunity to refresh my familiarity with the code and double check the conditions.

@smarterclayton

Copy link
Copy Markdown
Contributor Author

Nm, this is not for 1.2

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 26, 2016
@smarterclayton
smarterclayton force-pushed the improve_lease_message branch from ac0b037 to 5eb4232 Compare March 28, 2016 15:56
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 28, 2016
@smarterclayton

Copy link
Copy Markdown
Contributor Author

@deads2k not high priority but want to improve debug output in case we hit issues.

Comment thread hack/test-integration.sh
else
os::text::print_red "failed $1"
echo "${out}"
echo "${out:-}"

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.

What does this do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If verbose is on, out is undefined. This ignores the undefined bash var.

@deads2k

deads2k commented Apr 27, 2016

Copy link
Copy Markdown
Contributor

Didn't upstream build some sort of a lease resource?

Comment thread pkg/cmd/util/plug/plug.go
go l.leaser.AcquireAndHold(ch)
defer l.Stop()
var err error
defer l.Stop(err)

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.

defer's function args are evaluated when we get to this line, not at the end of the function right? Wouldn't this mean that err is always nil?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@smarterclayton

Copy link
Copy Markdown
Contributor Author

Yeah but not sure when to switch to it. I want to clean this up a bit

On Apr 27, 2016, at 7:56 AM, David Eads [email protected] wrote:

Didn't upstream build some sort of a lease resource?

—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#7918 (comment)

@deads2k

deads2k commented Apr 27, 2016

Copy link
Copy Markdown
Contributor

lgtm

@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 1, 2016
@danmcp

danmcp commented Jun 14, 2016

Copy link
Copy Markdown

@smarterclayton Bump

When we lose the lease, return an error all the way up the stack so that
specific error messages can be logged.
@smarterclayton
smarterclayton force-pushed the improve_lease_message branch from 5eb4232 to c0bca94 Compare June 14, 2016 15:58
Detected while running this.
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 14, 2016
@smarterclayton

Copy link
Copy Markdown
Contributor Author

[merge]

1 similar comment
@smarterclayton

Copy link
Copy Markdown
Contributor Author

[merge]

@openshift-bot

openshift-bot commented Jun 15, 2016 •

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4939/) (Image: devenv-rhel7_4384)

@smarterclayton

Copy link
Copy Markdown
Contributor Author

[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to c0bca94

@openshift-bot
openshift-bot merged commit 13e2aff into openshift:master Jun 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants