jiebi/CodeConvo huggingface dataset:
Change:
return fmt.Errorf("port %s still open", proxyPort) } <del> // a simple echoServer that only accepts one connection. Returns port actually // being listened on, or an error. func echoServer(t *testing.T, addr string) (string, error) { l, err := net.Listen("tcp", addr) </del> <ins> var port string func init() { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) w.Write([]byte(r.URL.Path[1:])) })) u, err := url.Parse(ts.URL) </ins> if err != nil { <del> return "", fmt.Errorf("failed to start echo service: %v", err) </del> <ins> panic(fmt.Sprintf("failed to parse: %v", err)) } _, port, err = net.SplitHostPort(u.Host) if err != nil { panic(fmt.Sprintf("failed to parse: %v", err)) </ins> } <del> go func() { defer l.Close() conn, err := l.Accept() if err != nil { t.Errorf("failed to accept new conn to echo service: %v", err) } io.Copy(conn, conn) conn.Close() }() _, port, err := net.SplitHostPort(l.Addr().String()) return port, err </del> } func testEchoConnection(t *testing.T, address, port string) { <del> conn, err := net.Dial("tcp", net.JoinHostPort(address, port)) </del> <ins> path := "aaaaa" res, err := http.Get("http://" + address + ":" + port + "/" + path) </ins> if err != nil { <del> t.Fatalf("error connecting to proxy: %v", err) } magic := "aaaaa" if _, err := conn.Write([]byte(magic)); err != nil { t.Fatalf("error writing to proxy: %v", err) </del> <ins> t.Fatalf("error connecting to server: %v", err) </ins> } <del> buf := make([]byte, 5) if _, err := conn.Read(buf); err != nil { t.Fatalf("error reading from proxy: %v", err) </del> <ins> defer res.Body.Close() data, err := ioutil.ReadAll(res.Body) if err != nil { t.Errorf("error reading data: %v %v", err, string(data)) </ins> } <del> if string(buf) != magic { t.Fatalf("bad echo from proxy: got: %q, expected %q", string(buf), magic) </del> <ins> if string(data) != path { t.Errorf("expected: %s, got %s", path, string(data)) </ins> } } func TestProxy(t *testing.T) { <del> port, err := echoServer(t, "127.0.0.1:0") if err != nil { t.Fatalf("Unexpected error: %v", err) } </del> lb := NewLoadBalancerRR() lb.OnUpdate([]api.Endpoints{ {JSONBase: api.JSONBase{ID: "echo"}, Endpoints: []string{net.JoinHostPort("127.0.0.1", port)}}})

Discussion:
https://travis-
Looking.
Another instance, or a different thing? https://travis-
Change:
* Connections from Pods to Services with 0 endpoints will now ICMP reject immediately, rather than blackhole and timeout. ([#72534](https://github.com/kubernetes/kubernetes/pull/72534), [@thockin](https://github.com/thockin)) * Services of type=LoadBalancer which have no endpoints will now immediately ICMP reject connections, rather than time out. ([#74394](https://github.com/kubernetes/kubernetes/pull/74394), [@thockin](https://github.com/thockin)) * Ensure the backend pools are set correctly for Azure SLB with multiple backend pools (e.g. outbound rules) ([#76691](https://github.com/kubernetes/kubernetes/pull/76691), [@feiskyer](https://github.com/feiskyer)) <del> * Connections from Pods to Services with 0 endpoints will now ICMP reject immediately, rather than blackhole and timeout. ([#72534](https://github.com/kubernetes/kubernetes/pull/72534), [@thockin](https://github.com/thockin)) </del> * Services of type=LoadBalancer which have no endpoints will now immediately ICMP reject connections, rather than time out. ([#74394](https://github.com/kubernetes/kubernetes/pull/74394), [@thockin](https://github.com/thockin)) * fix race condition issue for smb mount on windows ([#75371](https://github.com/kubernetes/kubernetes/pull/75371), [@andyzhangx](https://github.com/andyzhangx)) * fix smb unmount issue on Windows ([#75087](https://github.com/kubernetes/kubernetes/pull/75087), [@andyzhangx](https://github.com/andyzhangx))

Discussion:
What happened: There is a duplicate row in the Changelog for v1.12.7 How to reproduce it (as minimally and precisely as possible): the first and the fourth row are exactly the same. /sig docs
Change:
} func TestDescribeNamespace(t *testing.T) { <del> fake := fake.NewSimpleClientset(&corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: "myns", </del> <ins> exampleNamespaceName := "example" testCases := []struct { name      string namespace *corev1.Namespace expect    []string }{ { name: "no quotas or limit ranges", namespace: &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: exampleNamespaceName, }, Status: corev1.NamespaceStatus{ Phase: corev1.NamespaceActive, }, }, expect: []string{ "Name", exampleNamespaceName, "Status", string(corev1.NamespaceActive), "No resource quota", "No LimitRange resource.", }, }, { name: "has conditions", namespace: &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: exampleNamespaceName, }, Status: corev1.NamespaceStatus{ Phase: corev1.NamespaceTerminating, Conditions: []corev1.NamespaceCondition{ { LastTransitionTime: metav1.NewTime(time.Date(2014, time.January, 15, 0, 0, 0, 0, time.UTC)), Message:            "example message", Reason:             "example reason", Status:             corev1.ConditionTrue, Type:               corev1.NamespaceDeletionContentFailure, }, }, }, }, expect: []string{ "Name", exampleNamespaceName, "Status", string(corev1.NamespaceTerminating), "Conditions", "Type", string(corev1.NamespaceDeletionContentFailure), "Status", string(corev1.ConditionTrue), "Reason", "example reason", "Message", "example message", "No resource quota", "No LimitRange resource.", }, </ins> }, <del> }) c := &describeClient{T: t, Namespace: "", Interface: fake} d := NamespaceDescriber{c} out, err := d.Describe("", "myns", DescriberSettings{ShowEvents: true}) if err != nil { t.Errorf("unexpected error: %v", err) </del> } <del> if !strings.Contains(out, "myns") { t.Errorf("unexpected out: %s", out) </del> <ins> for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { fake := fake.NewSimpleClientset(testCase.namespace) c := &describeClient{T: t, Namespace: "", Interface: fake} d := NamespaceDescriber{c} out, err := d.Describe("", testCase.namespace.Name, DescriberSettings{ShowEvents: true}) if err != nil { t.Errorf("unexpected error: %v", err) } for _, expected := range testCase.expect { if !strings.Contains(out, expected) { t.Errorf("expected to find %q in output: %q", expected, out) } } }) </ins> } }

Discussion:
should output Conditions. For example: Including Conditions in the output is useful. In this example, a Condition can explain why a namespace deletion has not completed. While the output below includes Conditions, I believe the output of would be easier to read.
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 cli
/assign
Change:
}, }, }, <ins> { name: "pod with init containers", opts: &DebugOptions{ Image:      "busybox", PullPolicy: corev1.PullIfNotPresent, }, pod: &corev1.Pod{ Spec: corev1.PodSpec{ InitContainers: []corev1.Container{ { Name: "init-container-1", }, { Name: "init-container-2", }, }, Containers: []corev1.Container{ { Name: "debugger", }, }, }, }, expected: &corev1.EphemeralContainer{ EphemeralContainerCommon: corev1.EphemeralContainerCommon{ Name:                     "debugger-1", Image:                    "busybox", ImagePullPolicy:          "IfNotPresent", TerminationMessagePolicy: "File", }, }, }, { name: "pod with ephemeral containers", opts: &DebugOptions{ Image:      "busybox", PullPolicy: corev1.PullIfNotPresent, }, pod: &corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ { Name: "debugger", }, }, EphemeralContainers: []corev1.EphemeralContainer{ { EphemeralContainerCommon: corev1.EphemeralContainerCommon{ Name: "ephemeral-container-1", }, }, { EphemeralContainerCommon: corev1.EphemeralContainerCommon{ Name: "ephemeral-container-2", }, }, }, }, }, expected: &corev1.EphemeralContainer{ EphemeralContainerCommon: corev1.EphemeralContainerCommon{ Name:                     "debugger-1", Image:                    "busybox", ImagePullPolicy:          "IfNotPresent", TerminationMessagePolicy: "File", }, }, }, </ins> } { t.Run(tc.name, func(t *testing.T) { tc.opts.IOStreams = genericclioptions.NewTestIOStreamsDiscard()

Discussion:
What happened: When using to create a debug container for a pod that has multiple init containers or ephemeral containers, fails with . What you expected to happen: should create a debug container in pod successfully. How to reproduce it (as minimally and precisely as possible): The EphemeralContainers feature gate must be enabled by using flag in your cluster. Anything else we need to know?: Environment: Kubernetes version (use ):Cloud provider or hardware configuration: OS (e.g: ): NAME="CentOS Linux" VERSION="7 (Core)" Kernel (e.g. ): Linux node-1 3.10.0-957.el7.x8664 SMP Thu Nov 8 23:39:32 UTC 2018 x8664 x8664 x8664 GNU/Linux Install tools: Network plugin and version (if this is a network-related bug): Others: /sig cli
I have investigated this issue and it looks like this issue happens in the following cases. When using without option When using with option In those cases, the containerNameToRef function is called and each for-loop in the function refers to the same despite the range is , or .
cc If this issue needs to be fixed, I would like to work on this.
/assign
Thanks for the report and for fixing it!
Change:
newService("s4", "123", false), }, expectedUpdateCalls: []fake_cloud.FakeUpdateBalancerCall{ <del> {Name: lbName("s1"), Region: region, Hosts: []string{"node0", "node1", "node73"}}, {Name: lbName("s3"), Region: region, Hosts: []string{"node0", "node1", "node73"}}, </del> <ins> {Name: "a888", Region: region, Hosts: []string{"node0", "node1", "node73"}}, {Name: "a999", Region: region, Hosts: []string{"node0", "node1", "node73"}}, </ins> }, }, }

Discussion:
Since this PR got merged, the ELB e2e test, which was consistently succeeding, is now consistently failing: Revert now that is in, and fix the tests that were relying on it. (details) Commit by arob Revert now that is in, and fix the tests that were relying on it. The file was modified The file was modified The file was modified I'm going to roll it back to confirm.
Change:
Use the [master.yaml](cloud-configs/master.yaml) and [node.yaml](cloud-configs/node.yaml) cloud-configs to provision a multi-node Kubernetes cluster. <ins> *Attention:* This requires at least CoreOS version 593.0.0/598.0.0. </ins> ## Overview * Provision the master node

Discussion:
Hello, I have installed the latest kubernetes binaries on CoreOS running on GCE. The cloud-config is as per instructions on "getting started guides". After I installed 3 Pods, the state on all were constantly "pending". I looked around but none of the previous solutions worked. After messing around a lot for 3 days it turned out to be the following line. I had 3 in pending status now one Pod is "successful" the others are "running". Change the config for docker daemon from ExecStart=/usr/bin/docker -d -s=overlay -H fd:// --bip={FLANNELMTU} To ExecStart=/usr/bin/docker -d -s=btrfs -H fd:// --bip={FLANNELMTU}
Usually this means that you have a scheduling conflict. What does print? My guess is that you have set on your pods, and you have more replicas than you have machines, and so some pods can not schedule due to hostPort conflicts.
The event dump as follows. I have the entire cluster in a stand alone machine. The cloud-config is this one
So it looks like you are trying to get node level logging up using Flunetd -Elasticsearch? Let me know if there is something I can do to help.
satnam, I will contact you if I have any questions with Flunetd -Elasticsearch. Much appreciated.
Not sure if related but CoreOS instructions are borked for 0.10.x or 0.11.x. Will PR changes today. See .
Actually, changed the layer driver from to which means he's using an older version of CoreOS. I can't reproduce this behavior with CoreOS 593.0.0/598.0.0 and Kubernetes 0.9.3, 0.10.1 or 0.11.0.
I am using coreos-beta-584-0-0-v20150218 . Perhaps a warning should go on getting-started-guides to say it only applies to CoreOS after 593.0.0/598.0.0.
Change:
} if runtime.GOOS == "windows" { <del> if strings.HasSuffix(info.Name(), ".exe") { </del> <ins> fileExt := strings.ToLower(filepath.Ext(fullPath)) switch fileExt { case ".bat", ".cmd", ".com", ".exe": </ins> return true, nil } return false, nil

Discussion:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : Currently, the kubectl plugins system - when running under Windows - will determine that a plugin is executable by looking at the plugin's extension, comparing it to '.exe'. I think we should allow plugins w/ a few more known extensions (.bat, .com, .cmd; for example). Why is this needed: This would give more of a similar experience to plugins under *nix, where shell scripts are often used.
/sig cli
Please see the PR below:
Change:
} func (obj InfoObject) Last() (map[string]interface{}, error) { <del> if obj.Info.Object == nil { </del> <ins> if obj.Remote == nil { </ins> return nil, nil // No object is live, return empty } <del> accessor, err := meta.Accessor(obj.Info.Object) </del> <ins> accessor, err := meta.Accessor(obj.Remote) </ins> if err != nil { return nil, err }

Discussion:
/kind bug /sig cli /area kubectl Hello. This is my first interaction with the Kubernetes community, so please forgive me if i have left out any crucial details, or if, perhaps, this is PEBKAC after all! I am keen to have a working feature, as described in and I am running K8s v1.9.3 and realise that this feature is in alpha, but i thought i would ask anyway. We're not on v1.9.4 yet, but the changelog doesn't mention the feature. What you expected to happen: I have some services deployed to Kubernetes with YAML files, that has been working reliably. We always use to deploy things. When a service is already deployed, and i make a minor change in the config file, for example the service port, i expect to see that in the diff. Instead, gives no output and exits with a . How to reproduce it (as minimally and precisely as possible): Consider the file : I make sure that it is correctly running on the cluster: Great, looking good. Now, i change the value to use Docker image tag and save. Now, i run: The stderr/stdout output is empty, and the exit code is . Anything else we need to know?: Environment: Kubernetes version: Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3", GitCommit:"", GitTreeState:"clean", BuildDate:"2018-02-09T21:50:44Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3+coreos.0", GitCommit:"", GitTreeState:"clean", BuildDate:"2018-02-10T01:42:55Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
I have this same issue - if I change, say, to in my , running returns empty. If I try tweaking the version I'm diffing (which I don't understand) - e.g. - then I see a bunch of differences, but not actually the change I was expecting in the number of replicas.
I'll take this. Sorry for the inconvenience.
Change:
hostNetwork: true containers: - name: fluentd-gcp <del> image: gcr.io/google-containers/fluentd-gcp:2.0.5 </del> <ins> image: gcr.io/google-containers/fluentd-gcp:2.0.7 </ins> # If fluentd consumes its own logs, the following situation may happen: # fluentd fails to send a chunk to the server => writes it to the log => # tries to send this message to the server => fails to send a chunk and so on.

Discussion:
A number of addon images have CVEs that have been fixed in the upstream base images. We should update these images before the final 1.7 release. 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
/cc
cc
The new image appears to have removed . I'm not sure if this was expected, but it caused at least fluentd to stop working on COS (). This might also affect kubeproxy, which uses (a derivative of ).
also the metadata-proxy, prometheus-to-sd, the fluentd-event-exporter, and ip-masq-agent.
anything more to do for this issue?
yes, I need to get merged and update those images again. I also need to bump a few other images (dns and ip-masq-agent).
should be the last update needed.
Change:
${KUBE_TIMEOUT}  -cover -covermode="${KUBE_COVERMODE}"  -coverprofile="${cover_report_dir}/${_pkg}/${cover_profile}"  <del> "${_pkg}"  </del> <ins> "${_pkg}"  </ins> ${testargs[@]:+${testargs[@]}} go test ${goflags[@]:+${goflags[@]}}  ${KUBE_RACE}  ${KUBE_TIMEOUT}  -cover -covermode="${KUBE_COVERMODE}"  -coverprofile="${cover_report_dir}/${_pkg}/${cover_profile}"  <del> "${_pkg}"  </del> <ins> "${_pkg}"  </ins> ${testargs[@]:+${testargs[@]}}  | tee ${junit_filename_prefix:+"${junit_filename_prefix}-$_pkg_out.stdout"}  | grep "${go_test_grep_pattern}"" 

Discussion:
Is this a BUG REPORT or FEATURE REQUEST? (choose one): bug Kubernetes version (use ): master (SHA ) What happened: What you expected to happen: Generate code coverage report on Mac How to reproduce it (as minimally and precisely as possible):
/cc
does it work for you prior to this commit? There may be an escaping issue, currently on mobile and unable to verify that hypothesis.
, just create PR to fix that, PTAL. That should be a typo: some missed for in embedded script.
Change:
est.lock.Lock() defer est.lock.Unlock() <del> rrv := est.relatedResourceVersions(endpointSlice) _, ok := rrv[endpointSlice.Name] </del> <ins> rrv, ok := est.relatedResourceVersions(endpointSlice) if !ok { return false } _, ok = rrv[endpointSlice.Name] </ins> return ok }

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 endpointSliceTracker creates a set of resource versions for each service, the resource versions in the set could be deleted when endpointslices are deleted, but the set and its key in the map is never deleted, leading to memory leak. What you expected to happen: The set of resource versions should be delete from endpointSliceTracker when the service is deleted. Environment: Kubernetes version (use ): 1.18.5
There are no sig labels on this issue. Please add an appropriate label by using one of the following commands: - Please see the for a listing of the SIGs, working groups, and committees available. <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
/cc
Change:
klog.V(3).Infof("ensureVMSSInPool: found vmss %s being deleted, skipping", vmssName) continue } <del> if err != nil { return err } </del> if vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations == nil { klog.V(4).Infof("EnsureHostInPool: cannot obtain the primary network interface configuration, of vmss %s", vmssName) continue

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: Kube-controller-manager panic when wrong Azure VMSS name is configured: This is because the error is not validated first in the following code path: Azure cloud provider should check whether err happens and whether vmss is nil here. What you expected to happen: Azure cloud provider should report errors on such case, so that customers could get the root raw error and then fix the configuration. How to reproduce it (as minimally and precisely as possible): Create Kuberenetes cluster with basic load balancer, configure a wrong VMSS name and then create/delete LoadBalancer typed services. Anything else we need to know?: The issue also happens on older versions, so the fixes need to cherry-pick on other branches. /area provider/azure /sig cloud-provider /milestone v1.20 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
Change:
if [[ "${NETWORK_PROVIDER:-}" == "kubenet" ]] ||  [[ "${NETWORK_PROVIDER:-}" == "cni" ]]; then #TODO(andyzheng0831): We should make the cni version number as a k8s env variable. <del> local -r cni_tar="cni-9d5e6e60e79491207834ae8439e80c943db65a69.tar.gz" download-or-bust "" "https://storage.googleapis.com/kubernetes-release/network-plugins/${cni_tar}" </del> <ins> local -r cni_tar="cni-07a8a28637e97b22eb8dfe710eeae1344f69d16e.tar.gz" local -r cni_sha1="19d49f7b2b99cd2493d5ae0ace896c64e289ccbb" download-or-bust "${cni_sha1}" "https://storage.googleapis.com/kubernetes-release/network-plugins/${cni_tar}" </ins> local -r cni_dir="${KUBE_HOME}/cni" mkdir -p "${cni_dir}" tar xzf "${KUBE_HOME}/${cni_tar}" -C "${cni_dir}" --overwrite

Discussion:
I have a container that got the broadcast address of podCIDR subnet. My CNI conf is: And the container in question has which is the broadcast address for the subnet. So it can't figure out the MAC of cbr0 because all frames are getting sent to (or at least, that's what seems to indicate). Eg: tcpdump alonside a wget on vs a similar normal container
Looks like a bug in ipam. Will try to put together a fix.
I stress tested your fix overnight with the networking suite I'm writing (the one that found the bug), didn't hit the failure in 100 runs, we should get it in asap
Great. It would be better to pull from upstream once the fix is merged. Otherwise, we have to fork it like we did in 1.3.
Marking this p0 flake so it shows up in release queries
[FLAKE-PING] This flaky-test issue would love to have more attention.
[FLAKE-PING] This flaky-test issue would love to have more attention.
Change:
saw_fatal = true panic(e) }) <del> cmd.SetArgs([]string{test.arg}) </del> <ins> cmd.SetArgs(strings.Split(test.arg, " ")) </ins> cmd.Execute() }()

Discussion:
They should be consistent with all other commands that allow multiple arguments (since they already allow label selectors). should cordon all of them, not return an error.
Hi , can I take this if no one has been working on it?
Please also refer . These two and should take multiple arguments as it is very common to get subset of nodes in this way . So it would be very nice if these would work:
Change:
glog.V(2).Info("Using iptables Proxier.") execer := exec.New() <del> proxierIptables, err := iptables.NewProxier(utiliptables.New(execer, protocol), execer, s.SyncPeriod) </del> <ins> proxierIptables, err := iptables.NewProxier(utiliptables.New(execer, protocol), execer, s.SyncPeriod, s.MasqueradeAll) </ins> if err != nil { glog.Fatalf("Unable to create proxier: %v", err) }

Discussion:
Related to . As a safety mesure, it could be very useful to actually include a flag to proxy to MASQUERADE everything (acting very close to a userspace proxy). I think it's not very hard to do and a very good way to diagnose or even fallback in case of problem (I'm thinking about vxlan cases). Something like "--snat-clients" or "--snat-pods" could be appropriate.
/cc
Looking at the current code: It looks like we SNAT almost everything already now? Would adding a set-mark rule (behind the flag of course) at line 548 be sufficient? Deprecated Public IPs, Loadbalancer IPs, and NodePorts all appear to be marked for SNAT already (also endpoint loopback traffic).
I think that is the flag, yeah. , Benjamin Elder wrote:
Ok, I'll push out a PR for that in a moment. I should be able to take care of that and the cleanup flag (PR out but needs some more work) today. On Aug 20, 2015 2:12 PM, "Tim Hockin" wrote: