jiebi/CodeConvo huggingface dataset:
Change:
<!-- 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 --Since upgrading to Kubernetes v1.19.11 (from v1.19.10) we see occasional panics in kubelet related to portforward streams: This issue seem to be introduced with should not panic and crash. We have not been able to successfully force this to happen, but it has happened 41 times in the last 2 weeks across 7 clusters (~100 nodes). Kubernetes version (use ):Cloud provider or hardware configuration: Self managed clusters on AWS. OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others: /sig node /cc
Hey thank you for the report! :pray: Uhh, thats unfortunate. The panic occurs there on L101: It looks like because works. The stack trace indicates the same: A on is a no-op, so would not be harmful. does also not seem to be , a crash in would have been visible in the stack trace. It may be possible that something assigned to the stream interface. Which means a check for will return , but accessing its fields is causing a segmentation fault. This does not explain why the crash is not visible in the trace.
With a quick look at the streaming code it's likely to be triggered by a timeout in waiting for streams: If the above case is hit then it goes down to , and if the timeout occurs before then it means that either or And then it attempts to remove the streams where at least one is : So it probably makes sense to check for either before passing to or inside the method where it crashes. This theory lines up with our kubelet logs, where I can see this just before the panic (didn't notice before):
Thank you for the summary working on a fix in
/triage accepted /assign
do you use dockershim within your cluster?
Yes, we still use dockershim.
Good, that's also why the panic happens within the kubelet.
Just to make sure I understand the scope of this issue, this only affects things like or other things that use the API, correct?
Exactly :+1:

Discussion:
func (c *connection) RemoveStreams(streams ...httpstream.Stream) { c.streamLock.Lock() for _, stream := range streams { <del> delete(c.streams, stream.Identifier()) </del> <ins> // It may be possible that the provided stream is nil if timed out. if stream != nil { delete(c.streams, stream.Identifier()) } </ins> } c.streamLock.Unlock() }

// remove all existing c.RemoveStreams(stream0, stream1) <ins> // remove nil stream should not crash c.RemoveStreams(nil) </ins> if len(c.streams) != 0 { t.Fatalf("should not have any streams, has %d", len(c.streams)) }
Change:
<!-- 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 --Konnectivity Service gets evicted when node gets tainted with NoExecute. Just like CoreDNS and KubeProxy, Konnectivity-agent should not get evicted when Node gets a taint. Have a port-forward running from a service and taint a node with a NoExecute option. Konnectivity-agent is deleted and can't get scheduled on the Node again until taint is removed. All other system pods use a wildcard toleration and are not effected by node taints. Kubernetes version (use ): 1.19.11 Cloud provider or hardware configuration: Azure OS (e.g: ): Ubuntu Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
As I know, only kube-proxy tolerates NoExecute. coredns does not. konnectivity agent's setting is same as coredns.
/cc Like dns-node-cache and kube-proxy, daemonset seems to have the toleration. /assign kubeadm kube-proxy is using below.
/sig cloud-provider
/assign
GitHub didn't allow me to assign the following users: jkh52. Note that only , repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see <detailsIn response to : /assign Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
As long as this stays DaemonSet, these broader tolerations seem acceptable. With GKE we have switched to Deployment, and intentionally do not have these broad tolerations (to avoid poor interaction with cluster-autoscaler).
/triage accepted

Discussion:
tolerations: - key: "CriticalAddonsOnly" operator: "Exists" <ins> - operator: "Exists" effect: "NoExecute" - operator: "Exists" effect: "NoSchedule" </ins> nodeSelector: kubernetes.io/os: linux containers:
Change:
<!-- 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 --Konnectivity Service gets evicted when node gets tainted with NoExecute. Just like CoreDNS and KubeProxy, Konnectivity-agent should not get evicted when Node gets a taint. Have a port-forward running from a service and taint a node with a NoExecute option. Konnectivity-agent is deleted and can't get scheduled on the Node again until taint is removed. All other system pods use a wildcard toleration and are not effected by node taints. Kubernetes version (use ): 1.19.11 Cloud provider or hardware configuration: Azure OS (e.g: ): Ubuntu Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
As I know, only kube-proxy tolerates NoExecute. coredns does not. konnectivity agent's setting is same as coredns.
/cc Like dns-node-cache and kube-proxy, daemonset seems to have the toleration. /assign kubeadm kube-proxy is using below.
/sig cloud-provider
/assign
GitHub didn't allow me to assign the following users: jkh52. Note that only , repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see <detailsIn response to : /assign Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
As long as this stays DaemonSet, these broader tolerations seem acceptable. With GKE we have switched to Deployment, and intentionally do not have these broad tolerations (to avoid poor interaction with cluster-autoscaler).
/triage accepted

Discussion:
operator: "Exists" - operator: "Exists" effect: "NoExecute" <del> - operator: "Exists" effect: "NoSchedule" </del> nodeSelector: kubernetes.io/os: linux containers:
Change:
<!-- 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 --, is not assigned is assigned Use to parse the command line parameters I am preparing to merge pr to solve this problem Kubernetes version (use ): N/A 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 cloud-provider /area provider/gcp
/area test
how about 'flags.VarP('
The pointer of 's values is assigned to the new address, and the relationship with the input parameter is broken. The 'flags.VarP(' also to no avail
/assign /triage accepted

Discussion:
import ( goflag "flag" <ins> "fmt" </ins> "strings" "github.com/spf13/pflag"

} func (s *StringSlice) Set(val string) error { <del> if s.value == nil || !s.changed { v := make([]string, 0) s.value = &v </del> <ins> if s.value == nil { return fmt.Errorf("no target (nil pointer to []string)") } if !s.changed { *s.value = make([]string, 0) </ins> } *s.value = append(*s.value, val) s.changed = true

} else if err != nil { t.Errorf("%d: expected nil error, got %v", i, err) } <del> if !reflect.DeepEqual(*v.value, test.expected) { t.Errorf("%d: expected %+v, got %+v", i, test.expected, *v.value) </del> <ins> if !reflect.DeepEqual(s, test.expected) { t.Errorf("%d: expected %+v, got %+v", i, test.expected, s) </ins> } if v.changed != test.changed { t.Errorf("%d: expected %t got %t", i, test.changed, v.changed)
Change:
ci-kubernetes-e2e-gci-gce-coredns ci-kubernetes-e2e-gci-gce-slow ci-kubernetes-e2e-gci-gce-ipvs Basically, all jobs that run the test :) [sig-network] Services [Slow] should be able to create and tear down a standard-tier load balancer 06-05
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 network it seems you reported failures in this test previously and seems a GCE feature dependent on the GCE controller, can you PTAL? cc
It has been so long that I entirely forgot what was the previous cause. From a quick look, the gce loadbalancer controller stuck on an address not found error (logs from ):
Full logs related to the problematic service : It reads like the controller thought the service desired tier network, where it actually wanted ? Would it be (purely based on the timing - don't see how that is related yet)
/assign Thanks It is indeed caused by . Pushed a PR to fix the e2e test.

Discussion:
// Test 2: re-create a LB of a different tier for the updated Service. ginkgo.By("updating the Service to use the premium (default) tier") svc, err = jig.UpdateService(func(svc *v1.Service) { <del> clearNetworkTier(svc) </del> <ins> setNetworkTier(svc, string(gcecloud.NetworkTierAnnotationPremium)) </ins> }) framework.ExpectNoError(err) // Verify that service has been updated properly.

svc.ObjectMeta.Annotations[key] = tier } <del> func clearNetworkTier(svc *v1.Service) { key := gcecloud.NetworkTierAnnotationKey if svc.ObjectMeta.Annotations == nil { return } delete(svc.ObjectMeta.Annotations, key) } </del> // TODO: add retries if this turns out to be flaky. func reserveRegionalAddress(cloud *gcecloud.Cloud, name string, netTier cloud.NetworkTier) (string, error) { Addr := &compute.Address{
Change:
wanted sync true, got sync false wanted sync true, got sync false wanted sync true, got sync false informer never changed resource versions from "": timed out waiting for the condition /kind failing-test /kind flake as it is in /sig auth Open it as it is the top flake of pull-kubernetes-integration:
Commented on PR.
/triage accepted
I've seen this test fail 2 times today on my PR Going to hope that I close my eyes and and never see it if it happens again I'll reopen this...
!
Opened to track flakes once again

Discussion:
// waitForEvents waits for adds, updates, and deletes to be populated with at least one event. func (is *informerSpy) waitForEvents(t *testing.T, wantEvents bool) { t.Helper() <ins> // wait for create/update/delete 3 events for 30 seconds waitTimeout := time.Second * 30 if !wantEvents { // wait just 15 seconds for no events waitTimeout = time.Second * 15 } </ins> <del> err := wait.PollImmediate(time.Second, time.Second*30, func() (bool, error) { </del> <ins> err := wait.PollImmediate(time.Second, waitTimeout, func() (bool, error) { </ins> is.mu.Lock() defer is.mu.Unlock() return len(is.adds) > 0 && len(is.updates) > 0 && len(is.deletes) > 0, nil

func waitForInformerSync(ctx context.Context, t *testing.T, informer cache.SharedIndexInformer, wantSynced bool, lastSyncResourceVersion string) { t.Helper() <del> syncCtx, cancel := context.WithTimeout(ctx, time.Second*30) </del> <ins> syncCtx, cancel := context.WithTimeout(ctx, time.Second*60) </ins> defer cancel() if gotSynced := cache.WaitForCacheSync(syncCtx.Done(), informer.HasSynced); wantSynced != gotSynced { t.Fatalf("wanted sync %t, got sync %t", wantSynced, gotSynced) } if len(lastSyncResourceVersion) != 0 { <del> if err := wait.PollImmediate(time.Second, time.Second*30, func() (bool, error) { </del> <ins> if err := wait.PollImmediate(time.Second, time.Second*60, func() (bool, error) { </ins> return informer.LastSyncResourceVersion() != lastSyncResourceVersion, nil }); err != nil { t.Fatalf("informer never changed resource versions from %q: %v", lastSyncResourceVersion, err)
Change:
<!-- 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 --If the provide is , run the below storage testcase, Hit below exception, At first glance, it looks like the return value is not correct, but looking into how the testcases was wrote, the root case should be that the testcase below doesn't support the provide, SSD PD on GCE/GKE gp2 EBS on AWS We should provide the correct error message which will be useful for trouble shooting instead. Kubernetes version (use ): All Cloud provider or hardware configuration: local OS (e.g: ): All Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
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 testing /sig storage /assign
NOTE: the "local" provider is specifically hack/local-up- any other cluster that is not one of "gce" etc. should use the default provider / "skeleton" provider (I know the naming is bad, but it's sort of an API now)
/remove-sig testing

Discussion:
continue } <ins> if zone, ok := test.Parameters["zone"]; ok { framework.ExpectNotEqual(len(zone), 0, "expect at least one zone") } </ins> ginkgo.By("Testing " + test.Name) suffix := fmt.Sprintf("%d", i) test.Client = c

func getRandomClusterZone(c clientset.Interface) string { zones, err := e2enode.GetClusterZones(c) <ins> zone := "" </ins> framework.ExpectNoError(err) <del> framework.ExpectNotEqual(len(zones), 0) zonesList := zones.UnsortedList() return zonesList[rand.Intn(zones.Len())] </del> <ins> if len(zones) != 0 { zonesList := zones.UnsortedList() zone = zonesList[rand.Intn(zones.Len())] } return zone </ins> }
Change:
<!-- 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 --As the p.isWorking won't be cleared while pod was deleted, so while creating or deleting pods repeatedly, length of p.isWorking keep increasing length of p.isWorking does not keep increasing creating or deleting pods repeatedly Kubernetes version (use ): 1.19.4 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:
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

Discussion:
p.podUpdates[uid] <- workUpdate delete(p.lastUndeliveredWorkUpdate, uid) } else { <del> p.isWorking[uid] = false </del> <ins> // put this line in removeWorker may cause dead lock, so keep reset it here delete(p.isWorking, uid) </ins> } }

} } <ins> func TestIsWorkingClearedAfterForgetPodWorkers(t *testing.T) { podWorkers, _ := createPodWorkers() numPods := 20 for i := 0; i < numPods; i++ { podWorkers.UpdatePod(&UpdatePodOptions{ Pod:        newPod(strconv.Itoa(i), "name"), UpdateType: kubetypes.SyncPodUpdate, }) } drainWorkers(podWorkers, numPods) if len(podWorkers.podUpdates) != numPods { t.Errorf("Incorrect number of open channels %v", len(podWorkers.podUpdates)) } podWorkers.ForgetNonExistingPodWorkers(map[types.UID]sets.Empty{}) if len(podWorkers.podUpdates) != 0 { t.Errorf("Incorrect number of open channels %v", len(podWorkers.podUpdates)) } if len(podWorkers.isWorking) != 0 { t.Errorf("Incorrect number of isWorking %v", len(podWorkers.isWorking)) } } </ins> type simpleFakeKubelet struct { pod       *v1.Pod mirrorPod *v1.Pod
Change:
/sig cli run (or just ). observe failure: xref:
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
Hi, I have filed to address this issue.
Thank you!

Discussion:
"github.com/spf13/cobra" "k8s.io/cli-runtime/pkg/genericclioptions" <del> cmdutil "k8s.io/kubectl/pkg/cmd/util" </del> <ins> cmdtesting "k8s.io/kubectl/pkg/cmd/testing" </ins> ) <del> func TestNewCmdVersionWithoutConfigFile(t *testing.T) { tf := cmdutil.NewFactory(&genericclioptions.ConfigFlags{}) </del> <ins> func TestNewCmdVersionClientVersion(t *testing.T) { tf := cmdtesting.NewTestFactory().WithNamespace("test") defer tf.Cleanup() </ins> streams, _, buf, _ := genericclioptions.NewTestIOStreams() o := NewOptions(streams) if err := o.Complete(tf, &cobra.Command{}); err != nil {

if err := o.Validate(); err != nil { t.Errorf("Unexpected error: %v", err) } <del> // FIXME soltysh: // since we have defaulting to localhost:8080 in staging/src/k8s.io/client-go/tools/clientcmd/client_config.go#getDefaultServer // we need to ignore the localhost:8080 server, when above gets removed this should be dropped too if err := o.Run(); err != nil && !strings.Contains(err.Error(), "localhost:8080") { </del> <ins> if err := o.Run(); err != nil { </ins> t.Errorf("Cannot execute version command: %v", err) } if !strings.Contains(buf.String(), "Client Version") {
Change:
/sig cloud-provider /area provider/gcp run (or just . observe failure: <details</detailsalso the logs from this failure are pretty low signal/noise ... xref:
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
cc ref:
I see the same failure too.. I think somehow the mtls endpoint is being generated on a call to which calls A previous method generates non-nil Client cert resource if the file is present in the home directory. . It depends on which machine the test is being run from. Deleting the file will probably make the test pass, but I dunno what else depends on that file. Is it ok if I changed the test to look for either or
Verified that the test passes with fix.
does this test depend on a live network connection then? or GCP credentials? either would be ... not ideal for a unit test.
thank you for looking into this.
it does not require either. The test is to make sure the go/compute API does not change the basePath syntax. We saw some version drop the "projects/" suffix, so want to make sure upgrading to a new compute API version does not break basePath assumptions.
Ok great, thanks. Do we know why it is changing locally? Ideally we want tests to reproduce locally, yet this dependency seems to be aware of CI vs local. EDIT: explains
thanks!

Discussion:
gce, err := fakeGCECloud(vals) // Loadbalancer controller code expects basepath to contain the projects string. expectBasePath := "https://compute.googleapis.com/compute/v1/projects/" <ins> // See https://github.com/kubernetes/kubernetes/issues/102757, the endpoint can have mtls in some cases. expectMtlsBasePath := "https://compute.mtls.googleapis.com/compute/v1/projects/" </ins> require.NoError(t, err) <del> if gce.service.BasePath != expectBasePath { t.Errorf("Compute basePath has changed. Got %q, want %q", gce.service.BasePath, expectBasePath) </del> <ins> if gce.service.BasePath != expectBasePath && gce.service.BasePath != expectMtlsBasePath { t.Errorf("Compute basePath has changed. Got %q, want %q or %q", gce.service.BasePath, expectBasePath, expectMtlsBasePath) </ins> } }
Change:
Iff the cpumanager feature gate (default: enabled) is explicitely disabled, calling podresources API causes a NPE in the kubelet. The stacktrace looks like This applies to any podresources API (either or ) Only triggers if the cpumanager feature gate is explicitely disabled (it is enabled by default in 1.20+) The podresources API should return either error or a valid value, not NPE. The simplest possible reproducer is probably to apply this patch And then run the podresources e2e tests We should probably add another e2e test to explicitly check this dlow Kubernetes version (use ): any since 1.20 (possibly introduced in commit ) Cloud provider or hardware configuration: any OS (e.g: ): any Kernel (e.g. ): any Install tools: N/A Network plugin and version (if this is a network-related bug): N/A Others: N/A
/sig node /triage accepted
possible workaround (not tested but everything suggests it should work) enable the cpumanager feature gate set the cpumanager policy to "none"

Discussion:
} func (cm *containerManagerImpl) GetCPUs(podUID, containerName string) []int64 { <del> return cm.cpuManager.GetCPUs(podUID, containerName).ToSliceNoSortInt64() </del> <ins> if cm.cpuManager != nil { return cm.cpuManager.GetCPUs(podUID, containerName).ToSliceNoSortInt64() } return []int64{} </ins> } func (cm *containerManagerImpl) GetAllocatableCPUs() []int64 { <del> return cm.cpuManager.GetAllocatableCPUs().ToSliceNoSortInt64() </del> <ins> if cm.cpuManager != nil { return cm.cpuManager.GetAllocatableCPUs().ToSliceNoSortInt64() } return []int64{} </ins> } func (cm *containerManagerImpl) ShouldResetExtendedResourceCapacity() bool {