jiebi/CodeConvo huggingface dataset:
Change:
}, } <ins> actualRoutes, err := az.ListRoutes(ctx, clusterName) if err != nil { klog.V(3).Infof("CreateRoute: creating route: failed(ListRoutes) clusterName= %q instance=%q with error=%v", clusterName, kubeRoute.TargetNode, err) return err } for _, actualRoute := range actualRoutes { if strings.EqualFold(actualRoute.Name, kubeRoute.Name) && strings.EqualFold(string(actualRoute.TargetNode), string(kubeRoute.TargetNode)) && strings.EqualFold(actualRoute.DestinationCIDR, kubeRoute.DestinationCIDR) { klog.V(2).Infof("CreateRoute: route is already existed and matched, no need to re-create or update") return nil } } </ins> klog.V(3).Infof("CreateRoute: creating route: instance=%q cidr=%q", kubeRoute.TargetNode, kubeRoute.DestinationCIDR) err = az.CreateOrUpdateRoute(route) if err != 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: Kubernetes shouldn't put route table when it's already been configured. Azure cloud provider should check whether the route has already been created before invoking . 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: /sig cloud-provider /priority important-soon
Why this is a bug? A PUT operation should be idempotent and multiple calls should get the same result?
Right. But cloud provider shouldn't make unnecessary API calls.
To check whether it is configured, we need a GET call, so we're going to replace PUT call with GET call in this case?
it's not a replace, we need to LIST routes and check whether it has already been there, then PUT if it's not.
I got your point. But if we directly send a PUT request, seems route RP will also do this comparation? Is there any issue making us have to do the comparation by ourselves instead of sending PUT request to route RP?
It would help to reduce the chances of ARM PUT throttling.
I'd like to work on this
/assign
Change:
fi # Network plugin if [[ -n "${NETWORK_PROVIDER:-}" || -n "${NETWORK_POLICY_PROVIDER:-}" ]]; then <del> if [[ "${NETWORK_PROVIDER:-}" == "cni" || "${NETWORK_POLICY_PROVIDER:-}" == "calico" ]]; then flags+=" --cni-bin-dir=/home/kubernetes/bin" else flags+=" --network-plugin-dir=/home/kubernetes/bin" fi </del> <ins> flags+=" --cni-bin-dir=/home/kubernetes/bin" </ins> if [[ "${NETWORK_POLICY_PROVIDER:-}" == "calico" ]]; then # Calico uses CNI always. flags+=" --network-plugin=cni"

Discussion:
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT <!-- If this is a BUG REPORT, please: Fill in as much of the template below as you can. If you leave out information, we can't help you as well. If this is a FEATURE REQUEST, please: Describe in detail the feature/behavior/change you'd like to see. In both cases, be ready for followup questions, and please respond in a timely manner. If we can't reproduce a bug or think a feature already exists, we might close your issue. If we're wrong, PLEASE feel free to reopen it and explain why. --Kubernetes version (use ): Environment: Cloud provider or hardware configuration: bare-metal OS (e.g. from /etc/os-release): Ubuntu 14.04 Kernel (e.g. ): Linux dev-k8s-controller-p1 4.4.0-53-generic ~14.04.1-Ubuntu SMP Fri Dec 2 03:43:31 UTC 2016 x8664 x8664 x86_64 GNU/Linux Install tools: chef cookbook Others: Docker 1.12.6, calico 2.1 CNI binaries: kubelet config: What happened: When trying to run pod error message is generated: So it seems that kubelet is trying to find CNI binaries in paths: /opt/loopback/bin /etc/cni/net.d /opt/calico/bin But it should look at since this is the default valur for parameter. What you expected to happen: Pod starts. How to reproduce it (as minimally and precisely as possible): Run pod: with kubelet 1.6 and CNI binaries in those path (default for calico): Anything else we need to know: After copy to and pod starts fine.
Good, very helpful to me
When set and not set , default path of CNI binaries will not take effect, the path specified by will be used instead. We should use and instead of if use CNI plugin.
I will push a PR to deprecate the flag. It is confusing. Closing this issue.
Was that ? It was closed without merging. I agree should be deprecated.
I think is needed before is removed. The flag is still not deprecated, I will send a PR to deprecate it.
Change:
<healthScaleFactor>100.0</healthScaleFactor> </hudson.tasks.junit.JUnitResultArchiver> <ins> # Implements Docker Build and Publish Plugin # https://wiki.jenkins-ci.org/display/JENKINS/CloudBees+Docker+Build+and+Publish+plugin # From the docs: 'This plugin provides the ability to build projects with a Dockerfile, and publish the resultant # tagged image (repo) to the docker registry.' # # repoName: docker registry repo name to publish the image # dockerfilePath: workspace relative path to the 'Dockerfile' to build # tag: Tag to apply to the built image # credentialsId: Jenkins 'Username with password' credentials ID (hex string) to authenticate to docker registry. #                Found under http:<jenkinsurl>/credentials -> "Advanced" - builder: name: docker-build-publish builders: - raw: xml: | <com.cloudbees.dockerpublish.DockerBuilder plugin="docker-build-publish@1.1"> <server plugin="docker-commons@1.2"/> <registry plugin="docker-commons@1.2"> <credentialsId>{credentialsId}</credentialsId> </registry> <repoName>{repoName}</repoName> <noCache>true</noCache> <forcePull>true</forcePull> <dockerfilePath>{dockerfilePath}</dockerfilePath> <skipBuild>false</skipBuild> <skipDecorate>false</skipDecorate> <repoTag>{tag}</repoTag> <skipPush>false</skipPush> <createFingerprint>true</createFingerprint> <skipTagLatest>true</skipTagLatest> </com.cloudbees.dockerpublish.DockerBuilder> - shell: | #!/bin/bash set -e set -x docker rmi -f {repoName}:{tag} </ins> # Default email recipients are set in Jenkins global config - defaults: name: global

Discussion:
We need to commit all the jenkins job configurations into yaml files. Otherwise the yaml updater will soon delete these jobs. Please see for example PRs
Done
Change:
} }) <del> It("should provide Internet connection for containers", func() { </del> <ins> It("should provide Internet connection for containers [Feature:Networking-IPv4]", func() { </ins> By("Running container which tries to ping 8.8.8.8") framework.ExpectNoError( <del> framework.CheckConnectivityToHost(f, "", "ping-test", "8.8.8.8", 30)) </del> <ins> framework.CheckConnectivityToHost(f, "", "ping-test", "8.8.8.8", framework.IPv4PingCommand, 30)) }) It("should provide Internet connection for containers [Feature:Networking-IPv6][Experimental]", func() { By("Running container which tries to ping google.com") framework.ExpectNoError( framework.CheckConnectivityToHost(f, "", "ping-test", "google.com", framework.IPv6PingCommand, 30)) </ins> }) // First test because it has no dependencies on variables created later on.

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 feature What happened: e2e tests provide only an (IPv4) ping test for external connectivity. What you expected to happen: Need a way to conditionally run a ping6 external connectivity check, and disable the (IPv4) external connectivity check, for IPv6-only clusters. How to reproduce it (as minimally and precisely as possible): Examine the e2e code ((), or run this test on an IPv6-only cluster. Anything else we need to know?: This test will be needed for IPv6 gating CI tests, at least until Kubernetes dual-stack is fully implemented. /area ipv6 Environment: Kubernetes version (use ): Latest master Cloud provider or hardware configuration**: VirtualBox cluster, Ubuntu 16.04.1 host, CentOS 7 guests OS (e.g. from /etc/os-release): CentOS 7 Kernel (e.g. ): 3.10.0-514.26.2.el7.x8664 SMP Tue Jul 4 15:04:05 UTC 2017 x8664 x8664 x8664 GNU/Linux Install tools: Others:
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 network
Change:
} } <ins> func TestAdmitEmptyPodNamespace(t *testing.T) { containerName := "container" pod := &api.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "mypod", Labels: map[string]string{ "security": "S2", }, }, Spec: api.PodSpec{ Containers: []api.Container{ { Name: containerName, Env:  []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABCD", Value: "value3"}}, }, }, }, } pip := &settings.PodPreset{ ObjectMeta: v1.ObjectMeta{ Name:      "hello", Namespace: "different", // (pod will be submitted to namespace 'namespace') }, Spec: settings.PodPresetSpec{ Selector: v1.LabelSelector{ MatchExpressions: []v1.LabelSelectorRequirement{ { Key:      "security", Operator: v1.LabelSelectorOpIn, Values:   []string{"S2"}, }, }, }, Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, Env:     []api.EnvVar{{Name: "abcd", Value: "value"}, {Name: "ABC", Value: "value"}}, EnvFrom: []api.EnvFromSource{ { ConfigMapRef: &api.ConfigMapEnvSource{ LocalObjectReference: api.LocalObjectReference{Name: "abc"}, }, }, { Prefix: "pre_", ConfigMapRef: &api.ConfigMapEnvSource{ LocalObjectReference: api.LocalObjectReference{Name: "abc"}, }, }, }, }, } originalPod, err := api.Scheme.Copy(pod) if err != nil { t.Fatal(err) } err = admitPod(pod, pip) if err != nil { t.Fatal(err) } // verify PodSpec has not been mutated if !reflect.DeepEqual(pod, originalPod) { t.Fatalf("Expected pod spec of '%v' to be unchanged", pod.Name) } } </ins> func admitPod(pod *api.Pod, pip *settings.PodPreset) error { informerFactory := informers.NewSharedInformerFactory(nil, controller.NoResyncPeriodFunc()) store := informerFactory.Settings().InternalVersion().PodPresets().Informer().GetStore()

Discussion:
/kind bug What happened: A pod with an empty namespace field was mutated by a pod preset in a different namespace. What you expected to happen: Pod presets should only operate on pods in the same namespace. How to reproduce it (as minimally and precisely as possible): Submit a pod with an empty namespace field and observe pod preset mutation. Anything else we need to know?: This is a fix for an alpha non-default feature. Fix submitted in
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 api-machinery
Change:
pflag.CommandLine.AddGoFlagSet(goflag.CommandLine) pflag.Parse() pflag.VisitAll(func(flag *pflag.Flag) { <del> glog.Infof("FLAG: --%s=%q", flag.Name, flag.Value) </del> <ins> glog.V(4).Infof("FLAG: --%s=%q", flag.Name, flag.Value) </ins> }) }

Discussion:
Reported by in Filing a bug for easy tracking. After , now prints all flags and the version. This is pretty unconventional and should probably be fixed. /cc
There are no sig labels on this issue. Please by:<br(1) mentioning a sig: <br(2) specifying the label manually: <br<brNote: method (1) will trigger a notification to the team. You can find the team list and label list
/sig cli
/cc for approval.
cc/ cc/
Is it causing a problem? It does help (a lot) for debugging both in production and e2e test failures.
Oh, wait. I see. The info log is going to stdout or stderr instead of to a log file. Maybe we can detect this in the flag-printing code and only log the flags if the logs are being sent to a file?
Who's going to work on this? Can someone be assigned?
Is this already been fixed in ?
Change:
e2eservice.TestReachableHTTP(ctx, ingress, svcPort, loadBalancerLagTimeout) ginkgo.By("checking reachability from pods when LoadBalancerSourceRanges is unset") <del> // We can use timeout 0 here since we know from above that the service is // already running (and we aren't waiting for changes to it to propagate). checkReachabilityFromPod(ctx, true, 0, namespace, acceptPod.Name, ingress) checkReachabilityFromPod(ctx, true, 0, namespace, dropPod.Name, ingress) </del> <ins> // There are different propagation delay for the APIs for different nodes, so it tries // a few times, despite previously it was confirmed that the Service was reachable. checkReachabilityFromPod(ctx, true, e2eservice.KubeProxyEndpointLagTimeout, namespace, acceptPod.Name, ingress) checkReachabilityFromPod(ctx, true, e2eservice.KubeProxyEndpointLagTimeout, namespace, dropPod.Name, ingress) </ins> // Create source ranges that allow acceptPod but not dropPod or // cluster-external sources. We assume that the LBSR rules will either see

Discussion:
master-informing: gce-cos-master-slow Failure cluster No response /sig network
checking why has the context deadline exceeded?
I see, is because of this /assign sending a fix for this
/triage accepted
Change:
nc.eventRecorder.Event(namespace, api.EventTypeNormal, "DeleteNamespace", fmt.Sprintf("Marking for deletion")) _, err := nc.federatedApiClient.Core().Namespaces().Update(updatedNamespace) if err != nil { <del> glog.Errorf("Failed to update namespace %s: %v", updatedNamespace.Name, err) nc.deliverNamespace(namespace.Name, 0, true) return </del> <ins> return fmt.Errorf("failed to update namespace: %v", err) </ins> } } <del> // TODO: delete all namespace content. </del> <ins> // Right now there is just 5 types of objects: ReplicaSet, Secret, Ingress, Events and Service. // Temporarly these items are simply deleted one by one to squeeze this code into 1.4. // TODO: Make it generic (like in the regular namespace controller) and parallel. err := nc.federatedApiClient.Core().Services(namespace.Name).DeleteCollection(&api.DeleteOptions{}, api.ListOptions{}) if err != nil { return fmt.Errorf("failed to delete service list: %v", err) } err = nc.federatedApiClient.Extensions().ReplicaSets(namespace.Name).DeleteCollection(&api.DeleteOptions{}, api.ListOptions{}) if err != nil { return fmt.Errorf("failed to delete replicaset list from namespace: %v", err) } err = nc.federatedApiClient.Core().Secrets(namespace.Name).DeleteCollection(&api.DeleteOptions{}, api.ListOptions{}) if err != nil { return fmt.Errorf("failed to delete secret list from namespace: %v", err) } err = nc.federatedApiClient.Extensions().Ingresses(namespace.Name).DeleteCollection(&api.DeleteOptions{}, api.ListOptions{}) if err != nil { return fmt.Errorf("failed to delete ingresses list from namespace: %v", err) } err = nc.federatedApiClient.Core().Events(namespace.Name).DeleteCollection(&api.DeleteOptions{}, api.ListOptions{}) if err != nil { return fmt.Errorf("failed to delete events list from namespace: %v", err) } </ins> // Remove kube_api.FinalzerKubernetes if len(updatedNamespace.Spec.Finalizers) != 0 {

Discussion:
In PR the specific resource types are handled explicitly. Need to delete them in more generic way, in a similar way that namespace controller does.
- switching this to 1.6 as it's too late for 1.5. ok? (please switch it right back if you disagree)
did fix this?
Please close or move to next-candidate with work remaining to be done.
Yes fixed by
Change:
<ins> /* Copyright 2020 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package filters import ( "net/http" "strings" ) // WithHSTS is a simple HSTS implementation that wraps an http Handler. // If hstsDirectives is empty or nil, no HSTS support is installed. func WithHSTS(handler http.Handler, hstsDirectives []string) http.Handler { if len(hstsDirectives) == 0 { return handler } allDirectives := strings.Join(hstsDirectives, "; ") return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { // Chrome and Mozilla Firefox maintain an HSTS preload list // issue : golang.org/issue/26162 // Set the Strict-Transport-Security header if it is not already set if _, ok := w.Header()["Strict-Transport-Security"]; !ok { w.Header().Set("Strict-Transport-Security", allDirectives) } handler.ServeHTTP(w, req) }) } </ins>

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:
// attachFileDevice takes a path to a regular file and makes it available as an // attached block device. func attachFileDevice(path string, exec utilexec.Interface) (string, error) { <del> blockDevicePath, err := getLoopDevice(path, exec) </del> <ins> blockDevicePath, err := getLoopDevice(path) </ins> if err != nil && err.Error() != ErrDeviceNotFound { return "", err }

Discussion:
I tried to use a local volume block device in minikube. Its trying to call losetup with the -j option and its failing as the losetup in minikube does not provide this option. This may effect other distro's as well. The end result is lock block devices don't work on the platform.
/sig storage
Probably caused by this code:
Did a strace on losetup -j. looks like the same info can be had by: cat /sys/block/loop0/loop/backing_file
Just had the same problem with Ceph cluster creation in minikube, the osd-prepare doesn't start because of this:
FYI: has the same problem in minikube. Replacing the /sbin/losetup busybox link with a "real" losetup helped for now, but isn't a solution of course.
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
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten
/remove-lifecycle rotten
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
/remove-lifecycle stale
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
/remove-lifecycle stale
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-contributor-experience at . /lifecycle stale
/remove-lifecycle stale
/help
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 : /help </details
Change:
t.Errorf("Didn't expect the pod to be scheduled.") } <del> if filterPlugin.numFilterCalled < tt.expectFilterNumCalled { t.Errorf("Expected the filter plugin to be called at least %v times, but got %v.", tt.expectFilterNumCalled, filterPlugin.numFilterCalled) </del> <ins> if numFilterCalled := atomic.LoadInt32(&filterPlugin.numFilterCalled); numFilterCalled < tt.expectFilterNumCalled { t.Errorf("Expected the filter plugin to be called at least %v times, but got %v.", tt.expectFilterNumCalled, numFilterCalled) </ins> } if numScoreCalled := atomic.LoadInt32(&scorePlugin.numScoreCalled); numScoreCalled < tt.expectScoreNumCalled { t.Errorf("Expected the score plugin to be called at least %v times, but got %v.", tt.expectScoreNumCalled, numScoreCalled)

Discussion:
<!-- Please only use this template for submitting reports about flaky tests or jobs (pass or fail with no underlying change in code) in Kubernetes CI --Which jobs are flaking: integration-master Which test(s) are flaking: TestPostFilterPlugin Testgrid link: Reason for failure: Anything else we need to know: links to appreciated links to specific failures in spyglass appreciated <!-- Please see the deflaking doc () for more guidance! --/sig testing
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 scheduling /remove-sig testing
/assign
Change:
tar xf elasticsearch-1.5.2.tar.gz &&  rm elasticsearch-1.5.2.tar.gz <ins> RUN mkdir -p /elasticsearch-1.5.2/config/templates </ins> COPY elasticsearch.yml /elasticsearch-1.5.2/config/elasticsearch.yml <ins> COPY template-k8s-logstash.json /elasticsearch-1.5.2/config/templates/template-k8s-logstash.json </ins> COPY run.sh / COPY elasticsearch_logging_discovery /

Discussion:
When i doing an elasticsearch aggs with the following statement: then, i got this: Actually, i want the pod names like this:
I have solved this problem by adding a index template for k8s logs. Now, I can aggregation pod names of the same namespace.
How are you sending your logs to elasticsearch? Using the default fluentd configuration?
First, I use the default fluentd configuration. Secondly, My application is written with nodejs language, using library.