jiebi/CodeConvo huggingface dataset:
Change:
containerList, _ := runtimeService.ListContainers(nil) for _, c := range containerList { if _, exists := podSandboxMap[c.PodSandboxId]; !exists { <del> return nil, fmt.Errorf("no PodsandBox found with Id '%s'", c.PodSandboxId) </del> <ins> return nil, fmt.Errorf("no PodsandBox found with Id '%s' for container with ID '%s' and Name '%s'", c.PodSandboxId, c.Id, c.Metadata.Name) </ins> } containerMap.Add(podSandboxMap[c.PodSandboxId], c.Metadata.Name, c.Id) }

Discussion:
Add more message for no PodSandbox container when kubelet start. When error return, We need more message to solve it, contains container name and container id.
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
/assign
Change:
} } <ins> // Enforce CLI specified namespace on server request. if o.EnforceNamespace { o.VisitedNamespaces.Insert(o.Namespace) } </ins> // Generates the objects using the resource builder if they have not // already been stored by calling "SetObjects()" in the pre-processor. infos, err := o.GetObjects()

Discussion:
What happened: While testing out the flag, I created a manifest with the following contents: I ran , and the resources appeared on my minikube cluster: Then, I removed the deployment from the manifest: And re-ran the same command, . To my surprise, however, the deployment wasn't removed; the only output from kubectl was . What you expected to happen: I expected the pruner to find the deployment with the matching label, , and prune it. How to reproduce it (as minimally and precisely as possible): I believe my example above is minimal and easily reproducible. Anything else we need to know?: This small change to the code for resolves the issue: Environment: Kubernetes version (use ): v1.16.3 Cloud provider or hardware configuration: N/A OS (e.g: ): N/A Kernel (e.g. ): N/A Install tools: N/A Network plugin and version (if this is a network-related bug): N/A Others: N/A
/sig cli
/assign cc
Change:
}) } } <ins> func TestCleanScope(t *testing.T) { testCases := []struct { name          string requestInfo   *request.RequestInfo expectedScope string }{ { name:          "empty scope", requestInfo:   &request.RequestInfo{}, expectedScope: "", }, { name: "resource scope", requestInfo: &request.RequestInfo{ Name:              "my-resource", Namespace:         "my-namespace", IsResourceRequest: false, }, expectedScope: "resource", }, { name: "namespace scope", requestInfo: &request.RequestInfo{ Namespace:         "my-namespace", IsResourceRequest: false, }, expectedScope: "namespace", }, { name: "cluster scope", requestInfo: &request.RequestInfo{ Namespace:         "", IsResourceRequest: true, }, expectedScope: "cluster", }, } for _, test := range testCases { t.Run(test.name, func(t *testing.T) { if CleanScope(test.requestInfo) != test.expectedScope { t.Errorf("failed to clean scope: %v", test.requestInfo) } }) } } </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 --the issue stays in the CleanScope function where all GET calls will end up with scope "namespace" and end up with verb "LIST" 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: /assign /sig api-machinery
/triage accepted
Change:
pods, err := podClient.List(labels.SelectorFromSet(labels.Set(map[string]string{"time": value})), fields.Everything()) Expect(len(pods.Items)).To(Equal(1)) <del> By("retrieving the pod") podOut, err := podClient.Get(pod.Name) if err != nil { Fail(fmt.Sprintf("Failed to get pod: %v", err)) } By("updating the pod") value = "time" + value pod.Labels["time"] = value pod.ResourceVersion = podOut.ResourceVersion pod.UID = podOut.UID pod.Spec.Host = podOut.Spec.Host pod, err = podClient.Update(pod) if err != nil { Fail(fmt.Sprintf("Failed to update pod: %v", err)) } </del> <ins> // Standard get, update retry loop expectNoError(wait.Poll(time.Millisecond*500, time.Second*30, func() (bool, error) { By("updating the pod") value = strconv.Itoa(time.Now().Nanosecond()) if pod == nil { // on retries we need to re-get pod, err = podClient.Get(name) if err != nil { return false, fmt.Errorf("failed to get pod: %v", err) } } pod.Labels["time"] = value pod, err = podClient.Update(pod) if err == nil { Logf("Successfully updated pod") return true, nil } if errors.IsConflict(err) { Logf("Conflicting update to pod, re-get and re-update: %v", err) pod = nil // re-get it when we retry return false, nil } return false, fmt.Errorf("failed to update pod: %v", err) })) </ins> expectNoError(waitForPodRunning(c, pod.Name)) By("verifying the updated pod is in kubernetes") pods, err = podClient.List(labels.SelectorFromSet(labels.Set(map[string]string{"time": value})), fields.Everything()) Expect(len(pods.Items)).To(Equal(1)) <del> fmt.Println("pod update OK") </del> <ins> Logf("Pod update OK") </ins> }) It("should contain environment variables for services", func() {

Discussion:
This is wrong because something else could have updated the pod in the mean time, invalidating your resource version. (Specifically, kubelet writes statuses.) It should do a get/update loop that retries as long as it gets a conflict error. to find an owner
PR almost ready - just struggling to get e2e tests to run :-)
At last. SUCCESS! -- 5 Passed 34 Skipped I0424 09:04:47. ] All tests pass PR incoming in a few minutes.
Change:
return fmt.Errorf("cannot autoscale a %v: %v", mapping.GroupVersionKind.Kind, err) } <del> generator, err := o.generatorFunc(info.Name, mapping) </del> <ins> generator, err := o.generatorFunc(o.Name, info.Name, mapping) </ins> if err != nil { return err }

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: the hpa name is always info.Namenot --name 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:
/assign
/sig cli
Change:
# do_start() { <ins> # Raise the file descriptor limit - we expect to open a lot of sockets! ulimit -n 65536 </ins> # Return #   0 if daemon has been started #   1 if daemon was already running

Discussion:
When I run a density test in a large cluster I've noticed the following error in scheduler and kubelet: E0402 13:42:04. 4061 ] apiserver received an error that is not an api.Status: Put http://127.0.0.1:4001/v2/keys/registry/pods/default/my-hostname-density30--d93e-11e4-8f0b-bc30 5be02f04mlp5u?prevExist=false: dial tcp 127.0.0.1:4001: too many open files This could be either because either etcd or apiserver has too low ulimit -n
cc
Since etcd is running now in a pod it has a limit for fd set to (10e6) so I'll see if increasing this for apiserver helps.
etcd is running in a pod since yesterday afternoon. (It was introduced first on friday evening, rolledback on sunday, and reintroduced yesterday afternoon.) Just FYI, to help co-relate timelines..
I increased the limit for apiserver to 10e6 and started counting opened fd using a simple bash loop: datels /proc/4048/fd | wc -l where 4048 is a PID of apiserver. I haven't noticed any more "too many" errors in few consecutive runs of density test on 50 node cluster with 30 pods per node. At the same time I've noticed that number of opened fd reached ~2000. I'm gonna send a PR to increase the limit to something more reasonable.
Change:
<ins> ### Version 8.8  (Mon October 1 2018 Zihong Zheng <zihongz@google.com>) - Update to use debian-base:0.3.2. </ins> ### Version 8.7  (Tue September 4 2018 Zihong Zheng <zihongz@google.com>) - Support extra `--prune-whitelist` resources in kube-addon-manager. - Update kubectl to v1.10.7.

Discussion:
Is this a BUG REPORT or FEATURE REQUEST?: /kind feature Alpine fixed a RCE vulnerability in apk in 3.8.1 () Update the base image used for addon-manager () to pick it up. Note: I'd send a PR if it depended directly on alpine image, not bashell/alpine.
There are no sig labels on this issue. Please add a sig label by either: 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. See the . The in method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals. <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
/assing
Ping
Change:
// TestCoSchedulingWithPermitPlugin tests invocation of permit plugins. func TestCoSchedulingWithPermitPlugin(t *testing.T) { // Create a plugin registry for testing. Register only a permit plugin. <del> registry := framework.Registry{permitPluginName: NewPermitPlugin} </del> <ins> perPlugin := &PermitPlugin{} registry := framework.Registry{permitPluginName: NewPermitPlugin(perPlugin)} </ins> // Setup initial permit plugin for testing. plugins := &schedulerconfig.Plugins{

Discussion:
<!-- Please only use this template for submitting reports about failing tests in Kubernetes CI jobs --Which jobs are failing: pull-kubernetes-integration Which test(s) are failing: TestPreemptWithPermitPlugin Since when has it been failing: 13:30 PST, Sep 9, 2019 Testgrid link: Reason for failure: Need investigations. Anything else we need to know: /sig scheduling
Another flaky It happens at 2019-08-06 05:43:47 +0000 UTC
The above repeated for 30 seconds.
I checked the code and log again. I think the reason is as following: When scheduler preempted , it failed to delete the pod(same as the case for , there might be something wrong with etcd), so it could not schedule because had not been deleted successfully.
/assign Find the root cause now, will send a PR soon.
Thanks for your work! Not sure whether you are still investigating it, the flaky test is impacting many PRs now, so I send a PR for it now, sorry for it.
Change:
expect := api.PodList{ ListMeta: api.ListMeta{ResourceVersion: "10"}, Items: []api.Pod{ <ins> // We expect list to be sorted by directory (e.g. namespace) first, then by name. {ObjectMeta: api.ObjectMeta{Name: "baz", ResourceVersion: "1"}}, </ins> {ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"}}, {ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "2"}}, },

Discussion:
kubectl returns resources in a random order, which makes it hard to look for things when users have a lot resources. Returning resources in deterministic order should be a helpful and trivial change (hopefully). We have an issue about pagination , but that's a larger and separate issue.
We should be cause to not do this on the * namespace - I think thats a special case. No disagreement for other list calls
What is the default etcd response order? Last created or last modified? Sent from my iPhone
I think the order is by key if sort param is given. If not given, the order is by last created (maybe, but we shouldn't trust it). It seems we are not trying to get sorted result from etcd.
Today, I think it's random order in the child key space in etcd (because the node structure uses a map), so you get golang map iteration order without sort. I don't know if sort on server is any cheaper than sort on client today, so we may want to do this in rest / registry rather than by passing etcd.
Apart from performance, sorting in clients means we can also take control of how responses are sorted, so for * namespace, we can sort by namespace, then by resource ID. , Clayton Coleman wrote: Master of Electrical and Computer Engineering Carnegie Mellon University
We can always hint sort to the registry storage layer in the future, so sorting on the client now won't kill us.
Just took a closer look at our rest/registry code to implement the sort (in client), but implementation-wise, it seems much easier to pass sort to etcd (one line change). Also, namespace is a prefix on resource, so sort across all namespace with etcd key will essentially sort resources by namespace then by Name. If we are to implement sort on client side, we can either: sort package: have each list object, ie.e PodList, ControllerList, implement sort interface. (We won't do this). have ListMeta implement sort interface, if there is a way to find enclosing structs (so we can use items field) have api.Object implement sort interface, verify object is list before sorting. sort algorithm ourself, and do it in rest. Is there other golang or kubernetes idom that I haven't been aware of that can be applied to this use case?

----- Original Message ----- I think sorting it on etcd is fine for now - that's the simplest possible thing that works.
Is there any material perf impact in etcd to enable it? Sent from my iPhone
Probably not material. Can always switch away if necessary
Famous last words :-) Sent from my iPhone
Got my hat ready
Change:
if registered.Has(nodeID) { continue } <del> _, err := s.kubeClient.Nodes().Create(&api.Node{ </del> <ins> node := &api.Node{ </ins> ObjectMeta: api.ObjectMeta{Name: nodeID}, Spec: api.NodeSpec{ Capacity: s.staticResources.Capacity, }, <del> }) </del> <ins> } addr := net.ParseIP(nodeID) if addr != nil { node.Status.HostIP = nodeID } else { addrs, err := net.LookupIP(nodeID) if err != nil { glog.Errorf("Can't get ip address of node %v", nodeID) } else if len(addrs) == 0 { glog.Errorf("No ip address for node %v", nodeID) } else { node.Status.HostIP = addrs[0].String() } } _, err := s.kubeClient.Nodes().Create(node) </ins> if err == nil { registered.Insert(nodeID) }

Discussion:
Why doesn't the 'node' entity have a hostname and/or IP fields? Currently its id field (soon to become name field) holds the IP but is that something that a REST api consumer can firmly rely on to get the node's IP/hostname so this field 'name/id' will always hold IP/hostname and not other information? (IP/hostname is useful for example for visualization of the minions available in a k8s cluster in UI and showing their IP/hostnames)
Minion does have a HostIP field in v1beta1, and NodeStatus has a HostIP field in v1beta3. When you GET the resource, is the value for that field not set? If so, on what cloudprovider? It's true that there is no hostname field, but the minion/node name itself is the hostname.
, I'm currently using the hack/local cluster setup , this is the output of GET for minion 127.0.0.1 with v1beta1, seems that HostIP is not returned at all (even not with empty value) { "kind": "Node", "id": "127.0.0.1", "uid": "-8527-11e4-8f4b-", "creationTimestamp": "2014-12-16T15:31:50+02:00", "selfLink": "/api/v1beta1/minions/127.0.0.1", "resourceVersion": 7, "apiVersion": "v1beta1", "resources": { "capacity": { "cpu": 1000, "memory": } } } Can you please elaborate/point to docs about the change in v3? so HostIP field is moved into a NodeStatus section/internal to Node entity? BTW why is it considered part of a status? thank you
The best documentation of v1beta3 is unfortunately the source right now: It adheres to the conventions described here: The fact that HostIP is not reported is probably a quirk with static minions. In reality, hosts can have multiple IP addresses, some private and some public, v4 and v6, dynamically assigned (e.g., using DHCP), etc. For now, we support single, private, static IP addresses, but in cases where hosts are specified using hostnames, the IP addresses are looked up.

So, status makes the most sense to me.
Yeah, HostIP is only queried from cloudprovider. you won't see hostIP in json if it's empty (see the tag)
why HostIP is not returned for local static setup? the id reflects the IP anyhow. it sounds like a bug, but this issue is tagged with "documentation".
Yes, I agree that it's a bug that HostIP isn't populated. The documentation aspect is to explain somewhere why it's in Status rather than Spec.
Change:
glog.Warningf("No API client: %v", err) } <del> cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider, s.CloudConfigFile) if err != nil { return err </del> <ins> if s.CloudProvider == options.AutoDetectCloudProvider { kcfg.AutoDetectCloudProvider = true } else { cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider, s.CloudConfigFile) if err != nil { return err } glog.V(2).Infof("Successfully initialized cloud provider: %q from the config file: %qn", s.CloudProvider, s.CloudConfigFile) kcfg.Cloud = cloud </ins> } <del> glog.V(2).Infof("Successfully initialized cloud provider: %q from the config file: %qn", s.CloudProvider, s.CloudConfigFile) kcfg.Cloud = cloud </del> } if kcfg.CAdvisorInterface == nil {

Discussion:
It appears that the kubelet will detect and use the cloud provider as detected by cadvisor thus overriding the cloud provider passed in at runtime: This will break our private cloud configuration where we do not use our cloud provider's load balancing and instead use our own load balancing tier. In my opinion, the cloud provider specified at kubelet runtime should be respected for the node. Am I reading this correctly? Any thoughts on how to handle this properly? Thank you!
If you specify any cloud provider through flags, it will be used by kubelet (see ). It's only when you don't specify any cloud provider that kubelet will detect the cloud provider from the machine info, as described by the comment.
that's exactly my situation, I want to run in our private cloud environment without any of the cloud integration. If I specify cloud-provider="" at runtime it will get overridden.
Ah I see. I guess specifying an empty string is the same as not specifying any cloud provider. This auto-detection feature was introduced by /cc the author and reviewer to see if this is an intended behavior:
Legitimate concern. I'm posting a fix. Do you consider this to be a regression or are you just getting started with k8s.
I am sorry, This was not the original intention. We can keep the auto detection with a flag, or make a flag to ask kubelet not to do it. Unless there is a way to see if the variable was assigned to that I missed. I can post a fix tomorrow if it won't exit by then.
Thank you. We're running on 1.2.4 and won't be running on 1.3 for a few months yet anyways and was just testing to look for future issues when I found this.
I assigned this issue to you since , and I can't assign this to anyway :-)
Thanks for testing our 1.3 release candidate, and reporting this regression to us. We are including the fix to 1.3.
Change:
func addNamespaceRoleBinding(namespace string, roleBinding rbac.RoleBinding) { if !strings.HasPrefix(namespace, "kube-") { <del> glog.Fatalf(`roles can only be bootstrapped into reserved namespaces starting with "kube-", not %q`, namespace) </del> <ins> glog.Fatalf(`rolebindings can only be bootstrapped into reserved namespaces starting with "kube-", not %q`, namespace) </ins> } existingRoleBindings := namespaceRoleBindings[namespace]

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?:BUG REPORT What happened: the err message in addNamespaceRoleBinding is wrong. ref to
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
/sig auth
Change:
method:        "PUT", expectAccept:  false, }, <ins> { name:          "test23", acceptPaths:   DefaultPathAcceptRE, rejectPaths:   DefaultPathRejectRE, acceptHosts:   DefaultHostAcceptRE, rejectMethods: DefaultMethodRejectRE, path:          "/api/v1/namespaces/default/pods/somepod/exec", host:          "localhost", method:        "POST", expectAccept:  false, }, { name:          "test24", acceptPaths:   DefaultPathAcceptRE, rejectPaths:   "", acceptHosts:   DefaultHostAcceptRE, rejectMethods: DefaultMethodRejectRE, path:          "/api/v1/namespaces/default/pods/somepod/exec", host:          "localhost", method:        "POST", expectAccept:  true, }, </ins> } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {

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 --- 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 cli
/triage accepted
Change:
lastUpdated: now, } <del> // Save the resolve, because it is still useful in case other services // are already marked dirty. THey can use it without making http request dm.setCacheEntryForService(info.service, cached) </del> <ins> // Do not save the resolve as the legacy fallback only fetches // one group version and an API Service may serve multiple // group versions. </ins> return &cached, nil case http.StatusOK:

Discussion:
Aggregated discovery caches when fetching from legacy discovery (). This causes apiservices who share the same service key to fetch from the cache and returns an empty document when their group-version differs from the initial apiservice that loaded the cache. See above See above No response_ 26 <detailslocal </details<details</details<details</details<details</details<details</details
/triage accepted
/sig api-machinery
Change:
}, }, }, <ins> "spec.jobTemplate.spec.template.spec.restartPolicy: Unsupported value": { ObjectMeta: metav1.ObjectMeta{ Name:      "mycronjob", Namespace: metav1.NamespaceDefault, UID:       types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ Schedule:          "* * * * ?", ConcurrencyPolicy: batch.AllowConcurrent, JobTemplate: batch.JobTemplateSpec{ Spec: batch.JobSpec{ Template: api.PodTemplateSpec{ Spec: api.PodSpec{ RestartPolicy: "Invalid", DNSPolicy:     api.DNSClusterFirst, Containers:    []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, }, }, }, }, </ins> } if utilfeature.DefaultFeatureGate.Enabled(features.TTLAfterFinished) { errorCases["spec.jobTemplate.spec.ttlSecondsAfterFinished:must be greater than or equal to 0"] = batch.CronJob{

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: Deployed an cronJob with an empty and it defaulted to which is an invalid option: Leaving the key out completely has the same result What you expected to happen: The empty key to default to something valid like or . Also document what this default is, my proposal would be to have as default since some tasks can't be reran easily. But it might be nice to force as default to enforce the stateless mindset even for crons :) How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: I guess not but I am open for questions :) Environment: Kubernetes version (use ): 1.19.2
My guess would be /sig api-machinery If it is better practice to wait for the triage instead of guessing the sig, let me know :+1:
/sig api-machinery
/assign
/remove-sig api-machinery /sig apps
/assign
/triage accepted