jiebi/CodeConvo huggingface dataset:
Change:
// TolerationsTolerateTaintsWithFilter checks if given tolerations tolerates // all the taints that apply to the filter in given taint list. <ins> // DEPRECATED: Please use FindMatchingUntoleratedTaint instead. </ins> func TolerationsTolerateTaintsWithFilter(tolerations []v1.Toleration, taints []v1.Taint, applyFilter taintsFilterFunc) bool { <del> if len(taints) == 0 { return true } </del> <ins> _, isUntolerated := FindMatchingUntoleratedTaint(taints, tolerations, applyFilter) return !isUntolerated } </ins> <del> for i := range taints { if applyFilter != nil && !applyFilter(&taints[i]) { continue </del> <ins> // FindMatchingUntoleratedTaint checks if the given tolerations tolerates // all the filtered taints, and returns the first taint without a toleration func FindMatchingUntoleratedTaint(taints []v1.Taint, tolerations []v1.Toleration, inclusionFilter taintsFilterFunc) (v1.Taint, bool) { filteredTaints := getFilteredTaints(taints, inclusionFilter) for _, taint := range filteredTaints { if !TolerationsTolerateTaint(tolerations, &taint) { return taint, true </ins> } <ins> } return v1.Taint{}, false } </ins> <del> if !TolerationsTolerateTaint(tolerations, &taints[i]) { return false </del> <ins> // getFilteredTaints returns a list of taints satisfying the filter predicate func getFilteredTaints(taints []v1.Taint, inclusionFilter taintsFilterFunc) []v1.Taint { if inclusionFilter == nil { return taints } filteredTaints := []v1.Taint{} for _, taint := range taints { if !inclusionFilter(&taint) { continue </ins> } <ins> filteredTaints = append(filteredTaints, taint) </ins> } <del> return true </del> <ins> return filteredTaints </ins> } // Returns true and list of Tolerations matching all Taints if all are tolerated, or false otherwise.

Discussion:
When trying to see why pods don't start using either kubectl get events or kubectl describe pod , the base message is not detailed enough. Warning FailedScheduling 5s (x4 over 65s) default-scheduler 0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate. What would you like to be : Details of the taint and details of what it didn't tolerate Why is this needed: To get much much better debug information by default when trying to understand why pods can't launch.
/sig cli
/sig scheduling /priority important-longterm
/cc
/remove-sig cli
Those labels are not set on the issue: <detailsIn response to : /remove-sig cli </details
/good-first-issue
/assign starizard
Can I get an idea of what this would involve? I might be able to put some work on it.
I assume is taking this already. The error message is produced in We probably also require changes in to get the name of the missing toleration.
/remove-help
Change:
package qos import ( <del> "k8s.io/api/core/v1" </del> <ins> v1 "k8s.io/api/core/v1" </ins> "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/apis/core"

Discussion:
What happened: A pod that has init container with request for cpu and memory, and containers that make no request for cpu or memory reports a BestEffort QoS class. This is incorrect. What you expected to happen: Containers that make requests independent of lifecycle phase should impact quality of service calculation. Found in 1.12, looks to still be present in 1.14 dev. /cc
/priority important-soon
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
/lifecycle frozen
I think this doesn't work very well with the current cpu manager logic. The problem is that a pod can't now have QoS class Guaranteed if it has init containers which don't have matching requests/limits. This means that normal containers in such a pod don't then get dedicated cpus even though the init containers are long gone when the app containers (with matching requests/limits) are finally started. This is quite non-intuitive. I would propose separating at least Guaranteed class calculation so that the init container resource requests wouldn't affect the calculation. What do you think?
Change:
return true, nil } <del> // retrieve the previous number of retry previousRetry := jm.queue.NumRequeues(key) </del> // Check the expectations of the job before counting active pods, otherwise a new pod can sneak in // and update the expectations after we've retrieved active pods from the store. If a new pod enters // the store after we've checked the expectation, the job sync is just deferred till the next relist.

Discussion:
What happened: What you expected to happen: How to reproduce it (as minimally and precisely as possible): $oc create job -f $ oc get job jobname -ojson | jq .status { "active": 1, "failed": 1, "startTime": "2020-07-30T06:45:37Z" } { "active": 1, "failed": 2, "startTime": "2020-07-30T06:45:37Z" } { "active": 1, "failed": 3, "startTime": "2020-07-30T06:45:37Z" } { "active": 1, "failed": 4, "startTime": "2020-07-30T06:45:37Z" } { "conditions": [ { "lastProbeTime": "2020-07-30T06:53:10Z", "lastTransitionTime": "2020-07-30T06:53:10Z", "message": "Job has reached the specified backoff limit", "reason": "BackoffLimitExceeded", "status": "True", "type": "Failed" } ], "failed": 5, "startTime": "2020-07-30T06:45:37Z" } $ oc get job jobname -ojson | jq .spec.backoffLimit 6 Anything else we need to know?: Environment: Kubernetes version (use ): Client Version: 4.5.3 Server Version: 4.4.13 Kubernetes Version: v1.17.1+ Cloud provider or hardware configuration: OS (e.g: ): NAME="Red Hat Enterprise Linux CoreOS" VERSIONID="4.4" OPENSHIFTVERSION="4.4" RHELVERSION="8.2" ID="rhcos" IDLIKE="rhel fedora" ANSICOLOR="0;31" CPENAME="cpe:/o:redhat:enterpriselinux:8::coreos" HOMEURL="" BUGREPORTURL="" REDHATBUGZILLAPRODUCT="OpenShift Container Platform" REDHATBUGZILLAPRODUCTVERSION="4.4" REDHATSUPPORTPRODUCT="OpenShift Container Platform" REDHATSUPPORTPRODUCTVERSION="4.4" OSTREEVERSION='44.82.-0' Kernel (e.g.

): Linux ip-10-0-192-232 4.18.0-193.13.2.el82.x8664 SMP Mon Jul 13 23:17:28 UTC 2020 x8664 x8664 x8664 GNU/Linux Install tools: Others: apiVersion: batch/v1 kind: Job metadata: name: sre-build-test-fail namespace: openshift-build-test spec: backoffLimit: 6 completions: 1 parallelism: 1 template: spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: matchExpressions: key: node- operator: In values: infra containers: command: /bin/bash -c | # ensure we fail if something exits non-zero set -o errexit set -o nounset set -o pipefail exit 1 imagePullPolicy: Always name: sre-build-test restartPolicy: Never terminationGracePeriodSeconds: 30 tolerations: effect: NoSchedule key: node- operator: Equal value: infra
/sig apps
not sure but that is the best I can think of at this time
i have noticed this problem also, and sometimes, it seems to work normally.
so I found out that in the test is so this can cause the issue.. it has been there from the beginning of the codes inception.. WDYT?
/assign
Duplicate of . /close
Closing this issue. <detailsIn response to : Duplicate of . /close Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
Change:
source "${KUBE_ROOT}/cluster/gce/config-common.sh" CLEANUP_KUBEMARK_IMAGE=${CLEANUP_KUBEMARK_IMAGE:-true} <ins> TEST_CLUSTER_LOG_LEVEL="${TEST_CLUSTER_LOG_LEVEL:-"--v=4"}" # If you want to set up multiple kubemark clusters with different "names", # you should change this env per each start-kubemark.sh invocation. KUBE_GCE_INSTANCE_PREFIX="${KUBE_GCE_INSTANCE_PREFIX:-"default"}" </ins> # NUM_NODES is used by start-kubemark.sh to determine a correct number of replicas. NUM_NODES=${KUBEMARK_NUM_NODES:-10}

Discussion:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --What happened: Run , will get error: Try to fix this by and rerun get another error: Basically, we should have default value for and . I found that they have default values before, and was deleted accidentally in . Although we can predefine these two variables before running the script, it will be more convenient to have default values, and more friendly to people who are not familiar with this script. What you expected to happen: We should be able to run without setting any environment variable manually. How to reproduce it (as minimally and precisely as possible): /cc /sig testing /sig cluster-lifecycle /assign
I have opened a PR to fix this.
Change:
build-integration-test-image: build cp -r $(TEMP_DIR) $(TEMP_DIR)_integration_test cp Dockerfile $(TEMP_DIR)_integration_test/Dockerfile <del> cd $(TEMP_DIR)_integration_test && sed -i.bak 's|BASEIMAGE|golang:$(GOLANG_VERSION)|g' Dockerfile docker build --pull -t etcd-integration-test $(TEMP_DIR)_integration_test </del> <ins> docker build  --pull  -t etcd-integration-test  --build-arg BASEIMAGE=golang:$(GOLANG_VERSION)  --build-arg RUNNERIMAGE=$(RUNNERIMAGE)  $(TEMP_DIR)_integration_test </ins> integration-test: docker run --interactive -v $(shell pwd)/../../../:/go/src/k8s.io/kubernetes$(DOCKER_VOL_OPTS) -e GOARCH=$(ARCH) etcd-integration-test 

Discussion:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --Building the etcd integration-test-image fails with the following err: Failure Log: Expected the image build to pass. k/k cluster/images/etcd build-integration-test-image Change that probably broke it: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
/sig etcd
The label(s) cannot be applied, because the repository doesn't have them <detailsIn response to : /sig etcd Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig release
/sig api-machinery
/cc /cc
/cc
/assign /triage accepted
is working on this in .
Change:
Field: fields.Everything(), } <del> // MatchValue defines a pair (<index name>, <value for that index>). </del> <ins> // MatchValue defines a pair (`<index name>`, `<value for that index>`). </ins> type MatchValue struct { IndexName string Value     string

Discussion:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --My IDE rendered the comments in and they were incomprehensible. I looked at the corresponding source, and found stuff like Those things set off in angle brackets are taken to be HTML tags. They should be backquoted. I expected the comments to render comprehensibly. Kubernetes version (use ): 1.22.0 Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
Here is an example of what I saw in my IDE. The HTML tags in the comment source just disappeared, because they are not actually meaningful HTML tags. <img width="627" alt="Screen Shot 2021-08-19 at 12 16 00 PM" src="https://user-"
/good-first-issue
This request has been marked as suitable for new contributors. Please ensure the request meets the requirements listed . If this request no longer meets these requirements, the label can be removed by commenting with the command. <detailsIn response to : /good-first-issue </details
Better source would look like this:
That would make it look like this: <img width="748" alt="Screen Shot 2021-08-19 at 3 18 23 PM" src="https://user-"
/assign /triage accepted
Can anyone tell me who is the mentor in Kubernetes,please
I don't know about a single designated mentor. I will be happy to help anyone working on this issue.
I would suggest either attending a SIG (Eg. APIMachinery or Storage) meeting which interests you and seeing what that SIG has as far as getting new contributors up to speed or reach out to ContribEx.
Change:
package validation import ( <ins> "strings" </ins> "k8s.io/apimachinery/pkg/util/validation/field" apivalidation "k8s.io/kubernetes/pkg/apis/core/validation" "k8s.io/kubernetes/pkg/apis/scheduling" ) <del> // ValidatePriorityClassName can be used to check whether the given priority // class name is valid. var ValidatePriorityClassName = apivalidation.NameIsDNSSubdomain </del> <ins> // ValidatePriorityClassName checks whether the given priority class name is valid. func ValidatePriorityClassName(name string, prefix bool) []string { var allErrs []string if strings.HasPrefix(name, scheduling.SystemPriorityClassPrefix) { allErrs = append(allErrs, "priority class names with '"+scheduling.SystemPriorityClassPrefix+"' prefix are reserved for system use only") } allErrs = append(allErrs, apivalidation.NameIsDNSSubdomain(name, prefix)...) return allErrs } </ins> // ValidatePriorityClass tests whether required fields in the PriorityClass are // set correctly.

Discussion:
In a recent discussion on , suggested to keep priority class names that start with "system-" for system use only and not allow user defined priority classes to start with this prefix. Given that we have reserved priority values 1 Billion for system use only, it makes sense to reserve a prefix as well to ensure that predefined priority classes won't conflict with user defined ones in the future. Is this a BUG REPORT or FEATURE REQUEST?: /kind feature /sig scheduling /assign ref
Change:
} } <del> if reflect.DeepEqual(currentEndpoints.Subsets, subsets) && reflect.DeepEqual(currentEndpoints.Labels, service.Labels) { </del> <ins> createEndpoints := len(currentEndpoints.ResourceVersion) == 0 if !createEndpoints && apiequality.Semantic.DeepEqual(currentEndpoints.Subsets, subsets) && apiequality.Semantic.DeepEqual(currentEndpoints.Labels, service.Labels) { </ins> glog.V(5).Infof("endpoints are equal for %s/%s, skipping update", service.Namespace, service.Name) return nil }

Discussion:
Currently, endpoints objects containing no subsets are decoded by the go client as subsets:[] (when requested individually) or as subsets:null (when requested in a list of endpoints). Because the endpoints controller is fed via a lister/watcher, it gets the subsets:null version fed to it. The subsets computation then returns an empty slice, which fails reflect.DeepEqual, which triggers a write attempt
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
Change:
if obj := event.Object.(*api.Pod); event.Type != watch.Added || obj.ResourceVersion != "4" { t.Errorf("unexpected event: %v", event) } <del> case <-time.After(time.Millisecond * 100): </del> <ins> case <-time.After(util.ForeverTestTimeout): </ins> t.Errorf("timed out waiting for an event") } // Emit a new event and check if it is observed by the watcher.

Discussion:
fwiw, the time outs are way to short (100ms) please use util.ForeverTestTimeout instead.
Yes - it seems to be cause by too short timeouts. Sent out for review.
Change:
func (c *iscsiDiskCleaner) TearDownAt(dir string) error { return diskTearDown(c.manager, *c, dir, c.mounter) } <ins> func portalBuilder(portal string) string { if !strings.Contains(portal, ":") { portal = portal + ":3260" } return portal } </ins>

Discussion:
Documentation says that port number for is optional, but I've found that not to be true. It's due to the way it detects whether the disk is attached or not. also must be an IP. Refer to:
/cc
I see what you meant. Good catch. According to , the disk path contains both ip and port. So port is indeed required even for default port 3260. If you don't have a pr yet, I'll provide a fix to the doc.
I don't have a CLA in file yet, so I'll leave it up to you. Thanks.
check this out
Change:
tags = ["automanaged"], visibility = ["//visibility:public"], ) <ins> go_test( name = "go_default_test", srcs = ["sample_and_watermark_test.go"], embed = [":go_default_library"], deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/k8s.io/klog/v2:go_default_library", ], ) </ins>

Discussion:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : Better testing of monotonic time in Why is this needed:
/sig api-machinery
/triage accepted
The label cannot be applied. Only GitHub organization members can add the label. <detailsIn response to : /triage accepted </details
/triage accepted
Change:
AdvertiseAddress net.IP CorsAllowedOriginList       []string <ins> HSTSDirectives              []string </ins> ExternalHost                string MaxRequestsInFlight         int MaxMutatingRequestsInFlight int

Discussion:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : Add the "Strict-Transport-Security" header to the API server responses. Why is this needed: Nessus scanner treats this as a Medium Risk in kubernetes 1.18.10.
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig api-machinery
/remove-sig api-machinery /sig auth
Change:
import ( "errors" <ins> "fmt" </ins> "net" "reflect" "sort"

Discussion:
It seems like this depends on the network condition as I first noticed this while on a plane, and it happens to me every so often but never on travis. Offenders are TestSyncNodeStatusDeletePods and TestSyncNodeStatusTransitionTime. This may be reproducible by disconnecting network connection but also happens sometimes while connected. is a call to net.LookupIP(), I'll investigate more.
This also occurs on OSX over a VPN (at least, for my VPN it does). Each call to net.LookupIP(name) takes 30s and fails correctly. As a result, the entire unit test times out. That same function call fails fast on Linux.
cc
For other runtime, we can just mock out net, time. I'd really like to know how to do mocking in go. Using interface seems overkill.
Change:
pdb.Status.DesiredHealthy == desiredHealthy && pdb.Status.ExpectedPods == expectedCount && pdb.Status.PodDisruptionsAllowed == disruptionsAllowed && <del> reflect.DeepEqual(pdb.Status.DisruptedPods, disruptedPods) && </del> <ins> apiequality.Semantic.DeepEqual(pdb.Status.DisruptedPods, disruptedPods) && </ins> pdb.Status.ObservedGeneration == pdb.Generation { return nil }

Discussion:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --What happened: There are too many pdb update operations compared with other resources. ! That is, there are many "Put" operations for pdb periodically in kube-apiserver log. In my view, the amount of pdb operations is connected with disruption controller's resyncPeriod and pdb's quantity in cluster. For example: disruption-controlle's default resyncPeriod is 30s, and there are 100 pdbs in cluster. We can find that the update operation times per minute is about 200. The data is reasonable, explanation is as follows: According to disruption-controlle's design, there is one resync every 30s. One resync means to call updatePdbStatus function for every pdb, so there are 200 times updatePdbStatus. Function updatePdbStatus judges whether the pdb is changed. If changed, call apiserver to update the pdb' status. When no eviction happens, disruptedPods is empty. In this situation, disruptedPods is an empty map, but pdb.Status.DisruptedPods is nil, empty map is not equal to nil. So reflect.DeepEqual(pdb.Status.DisruptedPods, disruptedPods) returns false. The pdb is thought to has be changed, then apiserver is called to update the pdb' status. In fact, there is no change for the pdb when disruptedPods is an empty map and pdb.Status.DisruptedPods is nil. What you expected to happen: There shouldn't be so many pdb update operations. That is, when pdb has no change, apiserver shouldn't be called to update its status. How to reproduce it (as minimally and precisely as possible): Create some pdbs in cluster, you will see many "Put" operations for pdb periodically in kube-apiserver log. Anything else we need to know?: Environment: kubernetes v1.13.2 Fix suggestions: The bug is caused by the mixed usage of empty and nil for disruptedPods, the type of which is map[string]metav1.Time.

There are two fix suggestions for it: one of empty map and nil for disruptedPods, use it consistently and refuse to mix empty map and nil. For example, when disruptedPods is empty or nil, save it as an empty map in etcd. Then every client gets pdb from etcd, the pdb.Status.DisruptedPods is an empty map. get pdb for etcd, assign an empty map to it if pdb.Status.DisruptedPods is nil. Maybe the mixed usage of empty and nil for map is a common problem in k8s design, not just for disruptedPods. I will propose a work around solution for the problem. If the solution has any problem, please let me know and I can modify the code.
/sig apps
/assign Morten can you PTAL and the open PR. I reviewed as well.
ref
Change:
if err != nil { return nil, fmt.Errorf("failed to parse container log max size %q: %v", maxSize, err) } <ins> // Negative number means to disable container log rotation if parsedMaxSize < 0 { return NewStubContainerLogManager(), nil } </ins> // policy LogRotatePolicy return &containerLogManager{ osInterface:    osInterface,

Discussion:
Setting a negative value in currently makes kubelet crash with a stack trace. The function raises an error when the value is negative, but the comment on  says that setting a negative value disables log rotation. At the moment there’s no way to disable log rotation and I believe removing lines 141 to 143 from , would allow this.
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig node (I guess)
/area kubelet can you show the stack trace?
The stack trace is 5000 lines long and apart from the following message, I don’t think it is relevant:
/assign
You can try to quote the value with double quotation when the value is negative, like the following: syncFrequency: 0s volumeStatsAggPeriod: 0s containerLogMaxSize: "-1"
I tried "-1", but still error
volumeStatsAggPeriod: -1s means disable
Which Kubernetes version have you installed? As if on my v1.19.4 system,no errors occured after I quoted the value with double quotation.
v1.20.2
I’m on v1.20.4. That’s already the case. Also, can only be set as a string in kubelet’s configuration, trying to set an integer will raise a parsing error (see ). The problem is not with the configuration, I’ve linked to the exact line in the code that checks for a negative value and raises the error.
Maybe you can try to disable this featureGate
Seems to work, I don’t know why I didn’t find this feature gate before.