jiebi/CodeConvo huggingface dataset:
Change:
"k8s.io/kubernetes/pkg/kubelet/network/kubenet" "k8s.io/kubernetes/pkg/kubelet/server/streaming" "k8s.io/kubernetes/pkg/kubelet/util/cache" <ins> utilstore "k8s.io/kubernetes/pkg/kubelet/util/store" </ins> "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" "k8s.io/kubernetes/pkg/kubelet/dockershim/metrics"

Discussion:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . --Is this a BUG REPORT or FEATURE REQUEST?: /kind bug CheckpointNotFoundError has been completely removed by But GetPodPortMappings method was not updated to return nil, when a checkpoint was not available. What happened: The CNI network (that is done for the shared containers only for windows) call would fail in this case, which is breaking CNI in windows. What you expected to happen: How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
Related issue
/sig node /sig windows
/assign
Previous PR for tracking
Change:
return false, bindPathTarget, nil } <ins> func checkSubPathFileEqual(subpath Subpath, bindMountTarget string) (bool, error) { s, err := os.Lstat(subpath.Path) if err != nil { return false, fmt.Errorf("stat %s failed: %s", subpath.Path, err) } t, err := os.Lstat(bindMountTarget) if err != nil { return false, fmt.Errorf("lstat %s failed: %s", bindMountTarget, err) } if !os.SameFile(s, t) { return false, nil } return true, nil } </ins> func getSubpathBindTarget(subpath Subpath) string { // containerName is DNS label, i.e. safe as a directory name. return filepath.Join(subpath.PodDir, containerSubPathDirectoryName, subpath.VolumeName, subpath.ContainerName, strconv.Itoa(subpath.VolumeMountIndex))

Discussion:
When we merged - we introduced comparison of subpath sources: But subpaths source comparison never works properly for all volume types, even if subpath and source remains unchaged. This is because we are comparing wrong things. For a given volume - is usually: But according - the root is - . This means that - if creation of a container times out, then another container can not start until old container exits, because subapth comparison above will be false and kubelet will try to umount the subpath bind mount and it will keep failing with "device is busy" errors. So subpath bind mount can not be reused at all. This is sort of expensive, for containers that use selinux. Because it means each container creation will potentially run recursive chcon again on the entire subpath etc.
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 /sig storage
cc
/remove-sig node
Change:
return c.convert(sv, dv, s) } <ins> // callCustom calls 'custom' with sv & dv. custom must be a conversion function. func (c *Converter) callCustom(sv, dv, custom reflect.Value, scope *scope) error { if !sv.CanAddr() { sv2 := reflect.New(sv.Type()) sv2.Elem().Set(sv) sv = sv2 } else { sv = sv.Addr() } if !dv.CanAddr() { if !dv.CanSet() { return scope.error("can't addr or set dest.") } dvOrig := dv dv := reflect.New(dvOrig.Type()) defer func() { dvOrig.Set(dv) }() } else { dv = dv.Addr() } args := []reflect.Value{sv, dv, reflect.ValueOf(scope)} ret := custom.Call(args)[0].Interface() // This convolution is necessary because nil interfaces won't convert // to errors. if ret == nil { return nil } return ret.(error) } </ins> // convert recursively copies sv into dv, calling an appropriate conversion function if // one is registered. func (c *Converter) convert(sv, dv reflect.Value, scope *scope) error {

Discussion:
In Go you cannot take the address of a because the map implementation hides that from you. Our conversion library assumes that any reflected map value can have Addr() taken, which causes a panic when you try to do the following for PodInfo conversion: The conversion code tries to call Addr() on the reflect.Value (the map's value, ContainerStatus value object) which fails because it cannot have an address. I worked around it by registering a conversion function on *PodInfo and then manually converting the map.
Oh you mean the reflection code can't addr that? ok sounds like a bug. Non-reflection code can certainly do it:
That playground is taking the address of a value before it's in the struct. You can't take the address of m ----- Original Message -----
Right, because go does magical c++ style references there. But I thought the map copying code handled that case specially already?
I think I see what you're talking about. I'll make a test.
I repro'd. Will fix.
It was actually the source value that caused the trouble. Thanks for the report!
Sorry, should have been clearer. ----- Original Message -----
Note that this map violates our API conventions. It should be a list of named subobjects.
Yeah this field has always been problematic. It's still a bug regardless-- could have triggered copying other maps.
Change:
framework.AddOrUpdateLabelOnNode(cs, nodeName, k, v) framework.ExpectNodeHasLabel(cs, nodeName, k, v) defer framework.RemoveLabelOffNode(cs, nodeName, k) // make the nodes have balanced cpu,mem usage <del> createBalancedPodForNodes(f, cs, ns, nodeList.Items, podRequestedResource, 0.6) </del> <ins> err := createBalancedPodForNodes(f, cs, ns, nodeList.Items, podRequestedResource, 0.6) framework.ExpectNoError(err) </ins> By("Trying to launch the pod with podAntiAffinity.") labelPodName := "pod-with-pod-antiaffinity" pod = createPausePod(f, pausePodConfig{

Discussion:
Chronically failing test. Perhaps covers deprecated behavior? /sig scalability /assign
shows up in
/sig scheduling is one of scheduling e2e test.
/assign I'll check this one.
According to the log, the balanced pods were not created by scheduler, the cpu/mem usage was unchanged.
This test failing every other run. Fix or disable? Blocking 1.7?
similar to , move to 1.8, but I'll still working on that.
Change:
numAllNodes: 3, diagnosis: Diagnosis{ PreFilterMsg: "Node(s) failed PreFilter plugin FalsePreFilter", <ins> NodeToStatusMap: NodeToStatusMap{ // They're inserted by the framework. // We don't include them in the reason message because they'd be just duplicates. "node1": NewStatus(Unschedulable, "Node(s) failed PreFilter plugin FalsePreFilter"), "node2": NewStatus(Unschedulable, "Node(s) failed PreFilter plugin FalsePreFilter"), "node3": NewStatus(Unschedulable, "Node(s) failed PreFilter plugin FalsePreFilter"), }, </ins> }, wantReasonMsg: "0/3 nodes are available: Node(s) failed PreFilter plugin FalsePreFilter.", }, { <ins> name:        "nodes failed Prefilter plugin and the preemption also failed", numAllNodes: 3, diagnosis: Diagnosis{ PreFilterMsg: "Node(s) failed PreFilter plugin FalsePreFilter", NodeToStatusMap: NodeToStatusMap{ // They're inserted by the framework. // We don't include them in the reason message because they'd be just duplicates. "node1": NewStatus(Unschedulable, "Node(s) failed PreFilter plugin FalsePreFilter"), "node2": NewStatus(Unschedulable, "Node(s) failed PreFilter plugin FalsePreFilter"), "node3": NewStatus(Unschedulable, "Node(s) failed PreFilter plugin FalsePreFilter"), }, // PostFilterMsg will be included. PostFilterMsg: "Error running PostFilter plugin FailedPostFilter", }, wantReasonMsg: "0/3 nodes are available: Node(s) failed PreFilter plugin FalsePreFilter. Error running PostFilter plugin FailedPostFilter.", }, { </ins> name:        "nodes failed one Filter plugin with an empty PostFilterMsg", numAllNodes: 3, diagnosis: Diagnosis{

Discussion:
When PreFilter returns UnschedulableAndUnresolvable, we don't need to run the preemption, but currently we run. This unexpected preemption could cause errors from the preemption by trying to read non-exist PreFilter data. As pointed out (), actually we didn't run the preemption in such cases in the past versions, but introduced this bug. /kind bug /kind regression /sig scheduling /triage accepted /priority important-soon
/assign
will fix this.
Change:
- $patch: replace result: mergingList: [] <ins> - description: add new field inside pointers original: mergeItemPtr: - name: 1 patch: mergeItemPtr: - name: 2 result: mergeItemPtr: - name: 1 - name: 2 - description: update nested pointers original: mergeItemPtr: - name: 1 mergeItemPtr: - name: 1 - name: 2 value: 2 - name: 2 patch: mergeItemPtr: - name: 1 mergeItemPtr: - name: 1 value: 1 result: mergeItemPtr: - name: 1 mergeItemPtr: - name: 1 value: 1 - name: 2 value: 2 - name: 2 </ins> sortMergeListTestCases: - description: sort one list of maps original:

Discussion:
PATCH http://IP:8080/api/v1beta3/namespaces/dev--ea6f-49cb-b5bb-/replicationcontrollers/redis-master {"spec":{"replicas":0}} answer: { "kind": "Status", "apiVersion": "v1beta3", "metadata": {}, "status": "Failure", "message": "the server responded with the status code 415 but did not return more information", "details": {}, "code": 415 } Before v0.15.0 it had worked well.
That error is returned by go-restful because it did not find any valid route with the same content type as specified in the request: Can you try setting the content-type in your request as is described here: cc
well, I've the same issue which is not fixed by setting the value, at least with the "strategic merge patch". Here's the request: Here's the response body: And here's the log trace of the request in the apiserver pod:
Come from a typo, purposed PR here:
Btw, I'm still having strange issues with sub-objects. Note that it appears only is the sub-object is already set. Here's the request: Here's the API log:
Looks like a bug in strategic merge -- it doesn't deal with pointers correctly:
cc
is it possible to have a milestone for this so I can tell if I should merger ? Thanks.
Change:
// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make // sure that all the tuple expansions are valid. type RuleWithOperations struct { <del> // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * // for all operations. </del> <ins> // Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * // for all of those operations and any future admission operations that are added. </ins> // If '*' is present, the length of the slice must be one. // Required. Operations []OperationType `json:"operations,omitempty" protobuf:"bytes,1,rep,name=operations,casttype=OperationType"`

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: Working on other doc bugs, I went looking for what calls admission plugins. I found four call sites for validating plugins, documented in . They correspond to the verbs CONNECT, CREATE, DELETE, and UPDATE. But only two of those verbs are documented at What you expected to happen: How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: 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:
Looks like docs are correct in and
The API doc can be updated to call out all four operations and clarify that "all" means "all four admission operations"
/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
/assign
Change:
} func (jm *ControllerV2) getJobsToBeReconciled(cronJob *batchv1.CronJob) ([]*batchv1.Job, error) { <del> var jobSelector labels.Selector if len(cronJob.Spec.JobTemplate.Labels) == 0 { jobSelector = labels.Everything() } else { jobSelector = labels.Set(cronJob.Spec.JobTemplate.Labels).AsSelector() } jobList, err := jm.jobLister.Jobs(cronJob.Namespace).List(jobSelector) </del> <ins> // list all jobs: there may be jobs with labels that don't match the template anymore, // but that still have a ControllerRef to the given cronjob jobList, err := jm.jobLister.Jobs(cronJob.Namespace).List(labels.Everything()) </ins> if err != nil { return nil, err }

Discussion:
Changing the label on a job template in a CronJob causes any Jobs held by the successful/failed history parameters to stop being tracked, so they never get cleaned up. Jobs with labels that don't match the (upgraded) CronJob, but still have an owner reference, should be subject to the history limit. a CronJob with a job template containing label , and non-zero history limit the CronJob to run and generate some Jobs (default 3 successful, 1 failed) the CronJob with a job template containing label the CronJob to run and generate some more Jobs there are more than 3 successful Jobs/1 failed Job! I believe this is the relevant code: The CronJob controller finds Jobs that it should care about by matching on the labels in the job template, this obviously breaks if the labels in the job template change. 21 Self-hosted No response No response No response No response_
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 apps
Experiencing another side-effect of this bug. If job template labels are updated while a cronjob has status (a scheduled job is running), then that cronjob gets stuck in . The cause seems to be the same as describes: once the job template labels are updated, cronjob controller V2 loses track of the jobs with the old labels, and therefore never updates the status of that active cronjob to indicate that the scheduled job has completed.
/assign
Change:
), expectedPrioritizers: sets.NewString(), }, <ins> { policy: `apiVersion: v1 kind: Policy predicates: - name: PredicateOne - name: PredicateTwo priorities: - name: PriorityOne weight: 1 - name: PriorityTwo weight: 5 `, expectedPredicates: sets.NewString( "CheckNodeCondition", // mandatory predicate "PredicateOne", "PredicateTwo", ), expectedPrioritizers: sets.NewString( "PriorityOne", "PriorityTwo", ), }, { policy: `apiVersion: v1 kind: Policy `, expectedPredicates: sets.NewString( "CheckNodeCondition", // mandatory predicate "CheckNodeDiskPressure", "CheckNodeMemoryPressure", "CheckNodePIDPressure", "CheckVolumeBinding", "GeneralPredicates", "MatchInterPodAffinity", "MaxAzureDiskVolumeCount", "MaxCSIVolumeCountPred", "MaxEBSVolumeCount", "MaxGCEPDVolumeCount", "NoDiskConflict", "NoVolumeZoneConflict", "PodToleratesNodeTaints", ), expectedPrioritizers: sets.NewString( "BalancedResourceAllocation", "InterPodAffinityPriority", "LeastRequestedPriority", "NodeAffinityPriority", "NodePreferAvoidPodsPriority", "SelectorSpreadPriority", "TaintTolerationPriority", "ImageLocalityPriority", ), }, { policy: `apiVersion: v1 kind: Policy predicates: [] priorities: [] `, expectedPredicates: sets.NewString( "CheckNodeCondition", // mandatory predicate ), expectedPrioritizers: sets.NewString(), }, </ins> } { // Add a ConfigMap object. configPolicyName := fmt.Sprintf("scheduler-custom-policy-config-%d", i)

Discussion:
Kubernetes scheduler enables you to overwrite default Predicates/Priorities as well as configuring extenders in a "scheduler policy". In latest scheduler componentconfig API (v1alpha1), it can be a file or a configmap: However, if you defines a scheduler config file and specify a YAML policy file: It doesn't work. It's because only JSON is supported: It'd nice to enhance it with an UniversalSerilizer so as to support both JSON and YAML. /sig scheduling /help /priority important-longterm
This request has been marked as needing help from a contributor. 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 : Kubernetes scheduler enables you to overwrite default Predicates/Priorities as well as configuring extenders in a "scheduler policy". /help /priority important-longterm </details
/assign
Change:
}, }, } <del> pod = e2epod.NewPodClient(f).Create(ctx, pod) framework.ExpectNoError(e2epod.WaitForPodContainerToFail(ctx, f.ClientSet, pod.Namespace, pod.Name, 0, "CreateContainerConfigError", framework.PodStartShortTimeout)) var err error pod, err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Get(ctx, pod.Name, metav1.GetOptions{}) framework.ExpectNoError(err) gomega.Expect(pod.Status.ContainerStatuses[0].State.Waiting.Message).To( gomega.ContainSubstring("failed to resolve recursive read-only mode: volume "mnt" requested recursive read-only mode, but it is not read-only")) </del> <ins> _, err := f.ClientSet.CoreV1().Pods(pod.Namespace).Create(ctx, pod, metav1.CreateOptions{}) gomega.Expect(err).To(gomega.MatchError(gomega.ContainSubstring("spec.containers[0].volumeMounts.recursiveReadOnly: Forbidden: may only be specified when readOnly is true"))) </ins> }) // By // See also the unit test [pkg/kubelet.TestResolveRecursiveReadOnly] for more invalid conditions (e.g., incompatible mount propagation) }) // It }) // Context ginkgo.Context("when the runtime does not support recursive read-only mounts", func() { f.It("should accept non-recursive read-only mounts", func(ctx context.Context) { <ins> e2eskipper.SkipUnlessFeatureGateEnabled(features.RecursiveReadOnlyMounts) </ins> ginkgo.By("waiting for the node to be ready", func() { waitForNodeReady(ctx) if supportsRRO(ctx, f) {

Discussion:
<img width="1064" alt="image" src=""### Failure cluster /kind failing-test <!-- If this is a flake, please add: /kind flake --/sig node
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
xref:
Another cluster of failures with a different failure: <img width="1498" alt="image" src=""
PR:
Change:
}) } } <ins> func TestCompareAuthzModes(t *testing.T) { var tests = []struct { name   string modesA []string modesB []string equal  bool }{ { name:   "modes match", modesA: []string{"a", "b", "c"}, modesB: []string{"a", "b", "c"}, equal:  true, }, { name:   "modes order does not match", modesA: []string{"a", "c", "b"}, modesB: []string{"a", "b", "c"}, }, { name:   "modes do not match; A has less modes", modesA: []string{"a", "b"}, modesB: []string{"a", "b", "c"}, }, { name:   "modes do not match; B has less modes", modesA: []string{"a", "b", "c"}, modesB: []string{"a", "b"}, }, } for _, rt := range tests { t.Run(rt.name, func(t *testing.T) { equal := compareAuthzModes(rt.modesA, rt.modesB) if equal != rt.equal { t.Errorf("failed compareAuthzModes:nexpected:n%vnsaw:n%v", rt.equal, equal) } }) } } </ins>

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: when i installed k8s using kubeadm and my custom config like then output is It is a bug that the default value(Node,RBAC) is entered but a warning message is displayed. A function must be to compare two string slices. What you expected to happen: If the default value and custom value are the same, no warning message should be displayed. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): 17.3 Install tools: kubeadm /area kubeadm /feature bug /sig cluster-lifecycle
/lifecycle active
Change:
} activeDeadlineSeconds = int64(0) <ins> minID = int64(-1) maxID = int64(2147483648) </ins> failureCases := map[string]api.PodSpec{ "bad volume": { Volumes:       []api.Volume{{}},

Discussion:
Help review this, thanks.
Are you asking for better validation on pod creation? I'm not really sure what you mean when you say "tip".
Yes, I mean it's better validate the pod when create. The tip mean the validation info response from server and show by client.
Change:
go_test( name = "go_default_test", srcs = [ <ins> "bootime_util_linux_test.go", </ins> "util_test.go", "util_unix_test.go", "util_windows_test.go",

Discussion:
What would you like to be : Currently, does not have unit test coverage. Specifically, there's no unit test coverage for . I'd like to see unit test coverage for . See for a sample of how to write platform specific unit tests. Why is this needed: There's a fairly small chance of being modified, and thus breaking, in the future without this test coverage. However, it should be relatively straightforward to add the test coverage, and could make a good first issue for a new contributor. There's also the benefit that it helps keep the test coverage in high :) And we never know, it might help catch a bug some day :) Extra note I think this ticket could be a great candidate for someone who is new to contributing to sig-node/k8s. I'd prefer to please give first dibs for picking this up to any folks who are currently underrepresented in the k8s community. Please reach out to on k8s Slack (or post directly in #sig-node and tag me) if you're interested, and I'll assign you the issue. I'm happy to mentor and be helpful in whatever way I can :)
Assigning this to Ali Farah (" (Ali, for some reason it won't let me assign you - can you assign yourself?) /sig node
Thanks ! /assign