Skip to content
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

Let GC print specific message for RESTMapping failure #42862

Merged
merged 1 commit into from
Mar 10, 2017

Conversation

caesarxuchao
Copy link
Member

@caesarxuchao caesarxuchao commented Mar 10, 2017

Make the error messages reported in #39816 to be more specific, also only print the message once.

I'll also update the garbage collector's doc to clearly state we don't support tpr yet.

We'll wait for the watchable discovery feature (@sttts are you going to work on that?) to land in 1.7, and then enable the garbage collector to handle TPR.

cc @hongchaodeng @MikaelCluseau @djMax

@caesarxuchao caesarxuchao added the release-note-none Denotes a PR that doesn't merit a release note. label Mar 10, 2017
@caesarxuchao caesarxuchao added this to the v1.6 milestone Mar 10, 2017
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 10, 2017
@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 10, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@sttts
Copy link
Contributor

sttts commented Mar 10, 2017

@caesarxuchao yes, watchable discovery is on my list for 1.7.

@@ -143,6 +143,12 @@ func (gc *GarbageCollector) attemptToDeleteWorker() bool {
}
err := gc.attemptToDeleteItem(n)
if err != nil {
// TODO: remove this block when gc starts using dynamic RESTMapper.
if restMappingError, ok := err.(*restMappingError); ok {
glog.Warning(restMappingError)
Copy link
Contributor

Choose a reason for hiding this comment

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

What about utilruntime.HandleError? You could (probably do?) wire that up for outside monitoring.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

version string
}

func (r *restMappingError) Error() string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Mind making a short Error and a long Message or some such? The detail is great in a log, less great if it ever escaped.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@deads2k
Copy link
Contributor

deads2k commented Mar 10, 2017

two optional nits. lgtm otherwise.

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 10, 2017
@caesarxuchao
Copy link
Member Author

@deads2k comments addressed. PTAL. Thanks.

@deads2k
Copy link
Contributor

deads2k commented Mar 10, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 10, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

The following people have approved this PR: caesarxuchao, deads2k

Needs approval from an approver in each of these OWNERS Files:

We suggest the following people:
cc @mikedanese
You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 10, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 38805, 42362, 42862)

@k8s-github-robot k8s-github-robot merged commit 486ec2b into kubernetes:master Mar 10, 2017
lblackstone pushed a commit to lblackstone/bootkube that referenced this pull request Mar 13, 2017
Disable garbage collector to avoid spamming the logs with repeated error messages.

A mitigation is coming in k8s 1.6 (kubernetes/kubernetes#42862),
and a proper fix is planned for k8s 1.7 (kubernetes/kubernetes#42615).

This option can be reverted once bootkube is updated to use k8s >= 1.6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants