{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/68103","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/68103/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/68103/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/68103/events","html_url":"https://github.com/kubernetes/kubernetes/pull/68103","id":355797051,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMjQzOTI2","number":68103,"title":"Scheduler config validation","user":{"login":"ravisantoshgudimetla","id":11657829,"node_id":"MDQ6VXNlcjExNjU3ODI5","avatar_url":"https://avatars3.githubusercontent.com/u/11657829?v=4","gravatar_id":"","url":"https://api.github.com/users/ravisantoshgudimetla","html_url":"https://github.com/ravisantoshgudimetla","followers_url":"https://api.github.com/users/ravisantoshgudimetla/followers","following_url":"https://api.github.com/users/ravisantoshgudimetla/following{/other_user}","gists_url":"https://api.github.com/users/ravisantoshgudimetla/gists{/gist_id}","starred_url":"https://api.github.com/users/ravisantoshgudimetla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravisantoshgudimetla/subscriptions","organizations_url":"https://api.github.com/users/ravisantoshgudimetla/orgs","repos_url":"https://api.github.com/users/ravisantoshgudimetla/repos","events_url":"https://api.github.com/users/ravisantoshgudimetla/events{/privacy}","received_events_url":"https://api.github.com/users/ravisantoshgudimetla/received_events","type":"User","site_admin":false},"labels":[{"id":414883982,"node_id":"MDU6TGFiZWw0MTQ4ODM5ODI=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/approved","name":"approved","color":"0ffa16","default":false},{"id":477397086,"node_id":"MDU6TGFiZWw0NzczOTcwODY=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":105146071,"node_id":"MDU6TGFiZWwxMDUxNDYwNzE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/bug","name":"kind/bug","color":"e11d21","default":false},{"id":240247879,"node_id":"MDU6TGFiZWwyNDAyNDc4Nzk=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-rebase","name":"needs-rebase","color":"BDBDBD","default":false},{"id":349530249,"node_id":"MDU6TGFiZWwzNDk1MzAyNDk=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":125550211,"node_id":"MDU6TGFiZWwxMjU1NTAyMTE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/scheduling","name":"sig/scheduling","color":"d2b48c","default":false},{"id":483069764,"node_id":"MDU6TGFiZWw0ODMwNjk3NjQ=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/testing","name":"sig/testing","color":"d2b48c","default":false},{"id":253450978,"node_id":"MDU6TGFiZWwyNTM0NTA5Nzg=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-08-31T00:14:07Z","updated_at":"2018-11-24T18:09:56Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/68103","html_url":"https://github.com/kubernetes/kubernetes/pull/68103","diff_url":"https://github.com/kubernetes/kubernetes/pull/68103.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/68103.patch"},"body":"As of now, when feature gates are enabled, we are just removing the unnecessary predicate keys from predicateMap like this https://github.com/kubernetes/kubernetes/blob/master/pkg/scheduler/algorithmprovider/defaults/defaults.go#L185, the problem is we are calling \r\nhttps://github.com/kubernetes/kubernetes/blob/master/pkg/scheduler/algorithmprovider/plugins.go from  https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-scheduler/app/server.go#L131and after that, say if we load config from policy configmap or policy config file for scheduler we have no knowledge of why a predicate is removed from predicateMap with scheduler starting and failing with errors like \r\n\r\n`I0829 07:09:12.059949       1 factory.go:977] Registering predicate: CheckNodeMemoryPressure\r\nF0829 07:09:12.059991       1 plugins.go:229] Invalid configuration: Predicate type not found for CheckNodeMemoryPressure` \r\n\r\nwhich has no context on why CheckNodeMemoryPressure has been removed from predicate. In this case we are seeing this error because we have enabled TaintNodesByCondition using featuregates which removes CheckNodeMemoryPressure and we have asked to load CheckNodeMemoryPressure from policy config file\r\n\r\n\r\n- This PR adds validation logic to ensure that there is a mapping between featuregates and corresponding predicates and priorities needed. After this PR, when we have a misconfiguration from policy config file, we would see an error like:\r\n\r\n`[Predicate CheckNodeMemoryPressure shouldn't be in when TaintNodesByCondition is enabled, Predicate PodToleratesNodeTaints should be in when TaintNodesByCondition is enabled]`\r\n\r\nThis ensures dependency between featuregates and their needed, not needed predicates/priorities.\r\n\r\nxref: https://bugzilla.redhat.com/show_bug.cgi?id=1623346\r\n\r\n/sig scheduling\r\n/cc @bsalamat @k82cn @Huang-Wei @aveshagarwal "},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/441385466","html_url":"https://github.com/kubernetes/kubernetes/pull/68103#issuecomment-441385466","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/68103","id":441385466,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTM4NTQ2Ng==","user":{"login":"liggitt","id":980082,"node_id":"MDQ6VXNlcjk4MDA4Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/980082?v=4","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"created_at":"2018-11-24T18:09:56Z","updated_at":"2018-11-24T18:09:56Z","author_association":"MEMBER","body":"/assign"}}
{"actor":{"display_login":"liggitt"}}