Repository navigation
*: warn that the scheduling service ignores label-property (#11448) - #11615
ti-chi-bot wants to merge 3 commits into
Conversation
Label-property has been deprecated since v5.2, and the scheduling service has never supported it. Its CheckLabelProperty always returns false. Document this limitation in the configuration comments and pd-ctl help. Warn after a label-property setting is persisted successfully when the scheduling service runs independently. Do not warn on deletion. Scheduling behavior and API response bodies and status codes are unchanged. Signed-off-by: lhy1024 <19542290+lhy1024@users.noreply.github.com>
Cover independent and embedded scheduling for set, config, and delete operations with successful and failed persistence. Assert warning level and current config, unchanged persistence errors, and configuration rollback. Capture the global pingcap logger with a restored zap observer and inject persistence failures using the existing persistFail failpoint. Signed-off-by: lhy1024 <19542290+lhy1024@users.noreply.github.com>
Signed-off-by: lhy1024 <19542290+lhy1024@users.noreply.github.com>
|
This cherry pick PR is for a release branch and has not yet been approved by triage owners. To merge this cherry pick:
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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 22 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
@ti-chi-bot: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bufferflies 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 |
[LGTM Timeline notifier]Timeline:
|
This is an automated cherry-pick of #11448
What problem does this PR solve?
Issue Number: ref #11443
Label-property has been deprecated since v5.2. The scheduling service has never supported it, but configuration comments and pd-ctl help do not make this limitation clear.
What is changed and how does it work?
PersistConfig.CheckLabelProperty,Config.LabelProperty, and pd-ctl'sconfig set label-propertyhelp.evict-leader-schedulerinstead oflabel-property.SetLabelPropertyConfigorSetLabelPropertypersists successfully, log a warning only when the scheduling service runs independently.DeleteLabelPropertydoes not emit this warning.Check List
Tests
TestLabelPropertyWarninginserverchecks that the warning is logged only afterSetLabelPropertyorSetLabelPropertyConfigsucceeds while the scheduling service is independent, not after a delete or a failed write, and that a failed write returns the error and keeps the previous configuration.Validation performed:
without_dashboard, selecting packages with non-test source files.golangci-lint run --build-tags without_dashboard --allow-parallel-runners ./server ./pkg/mcs/scheduling/server/config/...passed.go test -tags without_dashboard,deadlock -race ./server -run '^TestLabelPropertyWarning$' -count=5with failpoints enabled passed in Classic and NextGen (nextgentag).tools:golangci-lint run --build-tags without_dashboard --allow-parallel-runners ./pd-ctl/pdctl/commandpassed.go test -tags without_dashboard ./pkg/mcs/scheduling/server/config/... ./server/config/... -count=1passed.go test -tags without_dashboard ./tests/server/config/ -run 'TestConfigTestSuite/TestConfigLabelProperty$' -count=1passed in both classic and microservice environments.tools:go test -tags without_dashboard ./pd-ctl/tests/config/ -run 'TestConfigTestSuite/TestConfig$' -count=1passed.go test -tags without_dashboard ./tests/server/config/ -run 'TestConfig' -count=1failed inTestConfigAll, which waits for the dashboard address to change fromautowith the dashboard disabled. The label-property subtest passed in both environments.Release note
Summary by CodeRabbit
evict-leader-scheduleras alternatives.