-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Closed
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.sig/schedulingCategorizes an issue or PR as relevant to SIG Scheduling.Categorizes an issue or PR as relevant to SIG Scheduling.
Description
What happened:
When running the scheduler at v=2
or greater, the processed component config may be logged as a single line with newline characters inserted, like so:
2021-09-09T02:54:17.253985446Z I0909 02:54:17.253914 1 configfile.go:96] "Using component config" config="apiVersion: kubescheduler.config.k8s.io/v1beta1\nclientConnection:\n acceptContentTypes: \"\"\n burst: 100\n contentType: application/vnd.kubernetes.protobuf\n kubeconfig: /etc/kubernetes/static-pod-resources/configmaps/scheduler-kubeconfig/kubeconfig\n qps: 50\nenableContentionProfiling: true\nenableProfiling: true\nhealthzBindAddress: 0.0.0.0:10251\nkind: KubeSchedulerConfiguration\nleaderElection:\n leaderElect: true\n leaseDuration: 2m17s\n renewDeadline: 1m47s\n resourceLock: configmaps\n resourceName: kube-scheduler\n resourceNamespace: openshift-kube-scheduler\n retryPeriod: 26s\nmetricsBindAddress: 0.0.0.0:10251\nparallelism: 16\npercentageOfNodesToScore: 0\npodInitialBackoffSeconds: 1\npodMaxBackoffSeconds: 10\nprofiles:\n- pluginConfig:\n - args:\n apiVersion: kubescheduler.config.k8s.io/v1beta1\n kind: DefaultPreemptionArgs\n minCandidateNodesAbsolute: 100\n minCandidateNodesPercentage: 10\n name: DefaultPreemption\n - args:\n apiVersion: kubescheduler.config.k8s.io/v1beta1\n hardPodAffinityWeight: 1\n kind: InterPodAffinityArgs\n name: InterPodAffinity\n - args:\n apiVersion: kubescheduler.config.k8s.io/v1beta1\n kind: NodeAffinityArgs\n name: NodeAffinity\n - args:\n apiVersion: kubescheduler.config.k8s.io/v1beta1\n kind: NodeResourcesBalancedAllocationArgs\n resources:\n - name: cpu\n weight: 1\n - name: memory\n weight: 1\n name: NodeResourcesBalancedAllocation\n - args:\n apiVersion: kubescheduler.config.k8s.io/v1beta1\n kind: NodeResourcesFitArgs\n scoringStrategy:\n resources:\n - name: cpu\n weight: 1\n - name: memory\n weight: 1\n type: LeastAllocated\n name: NodeResourcesFit\n - args:\n apiVersion: kubescheduler.config.k8s.io/v1beta1\n kind: NodeResourcesMostAllocatedArgs\n resources:\n - name: cpu\n weight: 1\n - name: memory\n weight: 1\n name: NodeResourcesMostAllocated\n - args:\n apiVersion: kubescheduler.config.k8s.io/v1beta1\n defaultingType: System\n kind: PodTopologySpreadArgs\n name: PodTopologySpread\n - args:\n apiVersion: kubescheduler.config.k8s.io/v1beta1\n bindTimeoutSeconds: 600\n kind: VolumeBindingArgs\n name: VolumeBinding\n plugins:\n bind:\n enabled:\n - name: DefaultBinder\n weight: 0\n filter:\n enabled:\n - name: NodeUnschedulable\n weight: 0\n - name: NodeName\n weight: 0\n - name: TaintToleration\n weight: 0\n - name: NodeAffinity\n weight: 0\n - name: NodePorts\n weight: 0\n - name: NodeResourcesFit\n weight: 0\n - name: VolumeRestrictions\n weight: 0\n - name: EBSLimits\n weight: 0\n - name: GCEPDLimits\n weight: 0\n - name: NodeVolumeLimits\n weight: 0\n - name: AzureDiskLimits\n weight: 0\n - name: VolumeBinding\n weight: 0\n - name: VolumeZone\n weight: 0\n - name: PodTopologySpread\n weight: 0\n - name: InterPodAffinity\n weight: 0\n permit: {}\n postBind: {}\n postFilter:\n enabled:\n - name: DefaultPreemption\n weight: 0\n preBind:\n enabled:\n - name: VolumeBinding\n weight: 0\n preFilter:\n enabled:\n - name: NodeResourcesFit\n weight: 0\n - name: NodePorts\n weight: 0\n - name: VolumeRestrictions\n weight: 0\n - name: PodTopologySpread\n weight: 0\n - name: InterPodAffinity\n weight: 0\n - name: VolumeBinding\n weight: 0\n - name: NodeAffinity\n weight: 0\n preScore:\n enabled:\n - name: InterPodAffinity\n weight: 0\n - name: PodTopologySpread\n weight: 0\n - name: TaintToleration\n weight: 0\n - name: NodeAffinity\n weight: 0\n queueSort:\n enabled:\n - name: PrioritySort\n weight: 0\n reserve:\n enabled:\n - name: VolumeBinding\n weight: 0\n score:\n enabled:\n - name: NodeResourcesBalancedAllocation\n weight: 1\n - name: ImageLocality\n weight: 1\n - name: InterPodAffinity\n weight: 1\n - name: NodeAffinity\n weight: 1\n - name: NodePreferAvoidPods\n weight: 10000\n - name: PodTopologySpread\n weight: 2\n - name: TaintToleration\n weight: 1\n - name: NodeResourcesMostAllocated\n weight: 0\n schedulerName: default-scheduler\n"
What you expected to happen:
config should always be readable and formatted to an easily copied/parsed format, like:
I1110 20:13:58.518715 1 configfile.go:66] Starting scheduler with component config:
apiVersion: kubescheduler.config.k8s.io/v1beta1
clientConnection:
acceptContentTypes: ""
burst: 100
contentType: application/vnd.kubernetes.protobuf
kubeconfig: /etc/kubernetes/scheduler.conf
qps: 50
enableContentionProfiling: true
enableProfiling: true
healthzBindAddress: ""
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: true
leaseDuration: 15s
renewDeadline: 10s
resourceLock: leases
resourceName: kube-scheduler
resourceNamespace: kube-system
retryPeriod: 2s
metricsBindAddress: ""
parallelism: 16
percentageOfNodesToScore: 0
podInitialBackoffSeconds: 1
podMaxBackoffSeconds: 10
profiles:
- pluginConfig:
- args:
apiVersion: kubescheduler.config.k8s.io/v1beta1
kind: NodeAffinityArgs
name: NodeAffinity
- args:
apiVersion: kubescheduler.config.k8s.io/v1beta1
kind: NodeResourcesLeastAllocatedArgs
resources:
- name: cpu
weight: 1
- name: memory
weight: 1
name: NodeResourcesLeastAllocated
- args:
apiVersion: kubescheduler.config.k8s.io/v1beta1
kind: NodeResourcesFitArgs
name: NodeResourcesFit
- args:
apiVersion: kubescheduler.config.k8s.io/v1beta1
bindTimeoutSeconds: 600
kind: VolumeBindingArgs
name: VolumeBinding
...
...
How to reproduce it (as minimally and precisely as possible):
Not sure how often this happens, need to try reproducing
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version
): - Cloud provider or hardware configuration:
- OS (e.g:
cat /etc/os-release
): - Kernel (e.g.
uname -a
): - Install tools:
- Network plugin and version (if this is a network-related bug):
- Others:
/sig scheduling
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.sig/schedulingCategorizes an issue or PR as relevant to SIG Scheduling.Categorizes an issue or PR as relevant to SIG Scheduling.