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

Increase loging verbosity for deleting stateful set pods #60579

Merged
merged 1 commit into from Mar 14, 2018

Conversation

gmarek
Copy link
Contributor

@gmarek gmarek commented Feb 28, 2018

We should always log reasons for deleting StatefulSet Pods.
@jdumars - what's the current process for putting such changes into the release? It's literally 0-risk change that helps with debugging.

cc @ttz21

NONE

@gmarek gmarek added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cherrypick-candidate sig/apps Categorizes an issue or PR as relevant to SIG Apps. labels Feb 28, 2018
@gmarek gmarek added this to the v1.10 milestone Feb 28, 2018
@gmarek gmarek requested a review from kow3ns February 28, 2018 11:35
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 28, 2018
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 28, 2018
@k8s-cherrypick-bot
Copy link

Removing label cherrypick-candidate because no release milestone was set. This is an invalid state and thus this PR is not being considered for cherry-pick to any release branch. Please add an appropriate release milestone and then re-add the label.

@jdumars
Copy link
Member

jdumars commented Feb 28, 2018

Bug fixes are still accepted into the 1.10 release at the team's discretion. This one is slightly different, but seems in the spirit of cleanup/bug fix. If you can get it approved and LGTM'd by someone specifically in SIG-Apps, I will add it to the milestone.

@kow3ns kow3ns added this to In Progress in Workloads Feb 28, 2018
Copy link
Member

@kow3ns kow3ns left a comment

Choose a reason for hiding this comment

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

I don't think we can do this based on our logging conventions. Originally I had some of these log statements at V(2) and @smarterclayton and @Kargakis talked me down to V(4).

@enisoc
Copy link
Member

enisoc commented Feb 28, 2018

Have the conventions changed since then? Currently under V(2) it lists exactly what we're doing here:

System state changing (killing pod)

@kow3ns
Copy link
Member

kow3ns commented Feb 28, 2018

@enisoc We already report Pod lifecycle events via the event_recorder. Again, I did initially have these statements at V(2), but the other controllers log such events at V(4). Certainly we should not use V(0), and we are going to change the log level, we should do so in a consistent way across the controller manager process imo.

@0xmichalis
Copy link
Contributor

0xmichalis commented Feb 28, 2018 via email

@gmarek
Copy link
Contributor Author

gmarek commented Mar 1, 2018

No there's nothing that specifies a reason. I can only tell that the Pod got deleted, which is good and I wouldn't want to loose that, but I can't tell why. While I don't really care why normal Pods disappear as long as replacement ones get created, I generally do care a lot about StatefulSet Pods dying and I'd like to be able to understand why.

V(2) sounds fine.

@thockin
Copy link
Member

thockin commented Mar 5, 2018

This change is Reviewable

@gmarek gmarek added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Mar 5, 2018
@gmarek
Copy link
Contributor Author

gmarek commented Mar 6, 2018

@kow3ns PTAL

@mfojtik
Copy link
Contributor

mfojtik commented Mar 9, 2018

@tnozicka FYI

@kow3ns
Copy link
Member

kow3ns commented Mar 9, 2018

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 9, 2018
@erictune
Copy link
Member

erictune commented Mar 9, 2018

observations:

Kubernetes binaries are recommended to log at -v=2 per [https://github.com/kubernetes/community/blob/master/contributors/devel/logging.md]

Most Statefulsets are small.

Events are logged, so logging will not increase out of proportion if this change is merged.

If events are already logged, but are missing the reason, and events have a reason field, then why not fix the events to have the reason and not add this change?

@krmayankk
Copy link

@gmarek @kow3ns agree with @erictune , if this reason is not available in events, we should fix that . it would be super useful to the user looking at kubectl describe to see the reason right there.

@gmarek
Copy link
Contributor Author

gmarek commented Mar 12, 2018

I'm fine with logging events, but there are no events being emitted on those cases, except very generic 'Deleting Pods' ones afaict.

If someone will enhance events before 1.10 we can close this pr. Otherwise I'd like to merge it. @erictune @kow3ns

@erictune
Copy link
Member

/lgtm

If someone wants to later revert this and improve the event, that is fine. This seems to be providing real debugging value and has the benefit of having been written already.

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erictune, gmarek, kow3ns

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

/test all

Tests are more than 96 hours old. Re-running tests.

@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process

@erictune @gmarek @kow3ns

Pull Request Labels
  • sig/apps: Pull Request will be escalated to these SIGs if needed.
  • priority/important-longterm: Escalate to the pull request owners; move out of the milestone after 1 attempt.
  • kind/cleanup: Adding tests, refactoring, fixing old bugs.
Help

@jdumars
Copy link
Member

jdumars commented Mar 14, 2018

Thank you very much @erictune

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 61118, 60579). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 0261114 into kubernetes:master Mar 14, 2018
Workloads automation moved this from In Progress to Done Mar 14, 2018
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/apps Categorizes an issue or PR as relevant to SIG Apps. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
Workloads
  
Done
Development

Successfully merging this pull request may close these issues.

None yet