Repository navigation
OCPBUGS-127482: set etcd unary request warning threshold - #7667
RaphaelFakhri wants to merge 1 commit into
Conversation
embed.NewConfig() in the vendored etcd leaves WarningUnaryRequestDuration at zero, so microshift-etcd logs every unary request as a "request stats" warning. Set it to etcd's 300ms default.
|
Pipeline controller notification This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration. Use |
|
@RaphaelFakhri: This pull request references Jira Issue OCPBUGS-127482, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @RaphaelFakhri. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
No actionable comments were generated in the recent review. WalkthroughThe embedded etcd configuration now sets Changesetcd warning threshold
Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested labels: Merge Risk:
|
Summary
Fixes #7301.
microshift-etcdlogs a"level":"warn"request statsline for every unary request, including requests that finish in microseconds. On an idle node this is about 30,000 lines per hour, and it hides the few requests that are actually slow.etcd warns when a request takes longer than
WarningUnaryRequestDuration. The etcd binary defaults this to 300ms through its flag parsing, butembed.NewConfig()in the vendored openshift/etcd leaves it at zero, so every request is over the threshold. Upstream etcd fixed the embed default in etcd-io/etcd#20294; the openshift/etcd fork does not carry that change yet.configure()inetcd/cmd/microshift-etcd/run.gosetsWarningUnaryRequestDurationtoembed.DefaultWarningUnaryRequestDuration(300ms), the same value the etcd binary uses.TestConfigureWarningUnaryRequestDurationchecks the configured value.Requests slower than 300ms still log the warning. With debug logging enabled, etcd still logs every request at debug level, as before.
Validation
cd etcd && go test ./cmd/microshift-etcd/ -run TestConfigureWarningUnaryRequestDuration -vFAILwithWarningUnaryRequestDuration = 0s, want 300ms.PASS.cd etcd && go test ./cmd/...,go vet ./cmd/...andgofmt -l cmdpass.Summary by CodeRabbit