jiebi/CodeConvo huggingface dataset:
Change:
}}, }, true) } <del> func TestForgetWatcher(t *testing.T) { backingStorage := &dummyStorage{} cacher, _, err := newTestCacher(backingStorage) require.NoError(t, err) defer cacher.Stop() require.Equal(t, 0, len(cacher.watchers.allWatchers)) require.Equal(t, 0, len(cacher.watchers.valueWatchers)) var forgetWatcherFn func(bool) var forgetCounter int forgetWatcherWrapped := func(drainWatcher bool) { forgetCounter++ forgetWatcherFn(drainWatcher) } w := newCacheWatcher( 0, func(_ string, _ labels.Set, _ fields.Set) bool { return true }, nil, storage.APIObjectVersioner{}, testingclock.NewFakeClock(time.Now()).Now().Add(2*time.Minute), true, schema.GroupResource{Resource: "pods"}, "1", ) forgetWatcherFn = forgetWatcher(cacher, w, 0, namespacedName{}, "", false) cacher.watchers.addWatcher(w, 0, namespacedName{}, "", false) require.Equal(t, 0, len(cacher.watchers.valueWatchers)) require.Equal(t, 1, len(cacher.watchers.allWatchers)) forgetWatcherWrapped(false) require.Equal(t, 0, len(cacher.watchers.allWatchers)) require.Equal(t, 0, len(cacher.watchers.valueWatchers)) require.Equal(t, 1, forgetCounter) forgetWatcherWrapped(false) require.Equal(t, 0, len(cacher.watchers.allWatchers)) require.Equal(t, 0, len(cacher.watchers.valueWatchers)) require.Equal(t, 2, forgetCounter) } </del>

Discussion:
A data race manifested in job link: NA NA No response No response No response /sig api-machinery
/cc
/assign
ack, fixing ...
/triage accepted
Change:
fmtField("Parent timestamp", fmt.Sprintf("%s", t)) fmtField("Reserved", hexs(header.Reserved[:])) <del> parentName := utf16BytesToString(header.ParentUnicodeName[:], binary.BigEndian) </del> <ins> parentNameBytes, _, err := transform.Bytes( unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM).NewDecoder(), header.ParentUnicodeName[:], ) if err != nil { panic(err) } parentName := string(parentNameBytes) </ins> fmtField("Parent Name", parentName) // Parent locator entries ignored since it's a dynamic disk sum := 0

Discussion:
I ran an OSS license scan of a codebase that has this project as a dependency and came across an interesting hit. This go-vhd dependency specified here: has a snippet of code from StackOverflow which is license under creative commons sharealike. Here's the code in question: I'm not a license expert, so I don't know if there are any real issues/conflicts here or not, but wanted to share to see what you all think. Here's SO's license info for reference: My understanding is that the potential issue would be with this clause: which could potentially require go-vhd and projects that depend on it to use the Creative Commons license as well.
Thanks for the report! can you please take a look if this is concerning? If so, we'll check if we can avoid this dependency (looks unlikely unless we duplicate what it's ) or we'll follow up upstream to update the code. /cc OWNERS for this repo
CC-BY-SA can be problematic in Apache-2.0 projects like k8s because of the ShareAlike aspect as noted. I'd recommend working with upstream to rewrite just that one function particularly since it looks like it's fairly limited.
let's please move this issue to kubernetes/kubernetes?
/provider azure
/sig release /area code-organization
The label(s) cannot be applied, because the repository doesn't have them <detailsIn response to : /sig release /area code-organization 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
cc /assign
/area code-organization
/assign
/milestone v1.19 /priority important-soon
Not a huge difference, but this is likely actually licensed under , not 4.0. See
the k/k code actually does not reference , since that function is in , do you mean we should remove from k/k totally?
Yes, we would either need to remove from k/k or ask the maintainers of to update . This means that (and k/k if we end up using it) would need to be licensed until CC-BY-SA.
Would this ultimately be backported to older versions of k8s or would you just do it in 1.19?

thanks, Let me remove the code in v1.19, actually that part of functionality is deprecated in Azure cloud provider already. My initial thought is only do this in v1.19
/kind bug /priority important-soon /sig cloud-provider /area provider/azure
Since it isn't trivial to remove as a dependency entirely (), I've created upstream to track updating the code there.
Change:
targetIP := *ipConfig.PrivateIPAddress return targetIP, nil } <ins> // splitProviderID converts a providerID to a NodeName. func splitProviderID(providerID string) (types.NodeName, error) { matches := providerIDRE.FindStringSubmatch(providerID) if len(matches) != 2 { return "", errors.New("error splitting providerID") } return types.NodeName(matches[1]), nil } </ins>

Discussion:
This is required to make Cloud Controller Manager operational on the various clouds that Kubernetes runs on. We have already PRs for the following clouds: GCE - AWS - Azure - OpenStack - The following clouds still need to be addresses: CloudStack Mesos OVirt Photon Rackspace vSphere If anyone is interested in contributing to this effort, please ping me directly (on kubernetes slack or through email)
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 cluster-lifecycle
cc:
I will take care of the vSphere and Photon.
I will take care of the Rackspace.
Merging for OpenStack
Reposting I am trying to use my custom out-of-tree cloud provider with Kubernetes. But I noticed that kubelet calls apis like with empty for cloud provider. Digging in the code for 1.7 branch, I see that is null for cloud-providers. As a result returns empty string. As a result, ByID() methods don't work for cloud providers since is not set.
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. Prevent issues from auto-closing with an comment. 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 stale
Rotten issues close after 30d of inactivity. Reopen the issue with . Mark the issue as fresh with . Send feedback to sig-testing, kubernetes/test-infra and/or . /close
Change:
names[ref.Name] = ref } for i := range pod.Spec.InitContainers { <del> ref := &pod.Spec.Containers[i] </del> <ins> ref := &pod.Spec.InitContainers[i] </ins> names[ref.Name] = ref } for i := range pod.Spec.EphemeralContainers { <del> ref := &pod.Spec.Containers[i] </del> <ins> ref := (*corev1.Container)(&pod.Spec.EphemeralContainers[i].EphemeralContainerCommon) </ins> names[ref.Name] = ref } return names

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:
"AllowedPrefixes": [ "k8s.io/utils/buffer", "k8s.io/utils/exec", <ins> "k8s.io/utils/inotify", </ins> "k8s.io/utils/integer", <ins> "k8s.io/utils/io", "k8s.io/utils/keymutex", "k8s.io/utils/mount", </ins> "k8s.io/utils/net", "k8s.io/utils/nsenter", "k8s.io/utils/path",

Discussion:
What happened: There is to manage import ways under but that doesn't work at our upstream CI. We can enable it by But if doing that, we will face the following error with What you expected to happen: I hope the check is always running to block invalid import ways at upstream CI system. How to reproduce it (as minimally and precisely as possible): As line into arguments.InputDirs of
/sig testing /area e2e-test-framework
Change:
Replicas int `json:"replicas" description:"number of replicas desired"` // Selector is a label query over pods that should match the Replicas count. <del> Selector map[string]string `json:"selector,omitempty" description:"label keys and values that must match in order to be controlled by this replication controller"` </del> <ins> // If Selector is empty, it is defaulted to the labels present on the Pod template. Selector map[string]string `json:"selector,omitempty" description:"label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template"` </ins> // TemplateRef is a reference to an object that describes the pod that will be created if // insufficient replicas are detected.

Discussion:
It doesn't make sense to define pod template with a set of labels that is strict subset of replicaSelector (or at least I can't find an use-case). For that reason I think that the labels in pod template part of replication controller should be optional and user should care about them only if he wants to define a superset of what replicaSelector already defines.
I've heard the same comments from a client. I think that it'd be more intuitive if we always specify pod labels in the template (so that we can copy&paste pod definition), and replicaSelector is optional (by default pod labels).
It would be reasonable for the selector to be a subset. I'm fine with intelligent defaulting but we need to be careful not to conflate the 2 concepts, which I think would increase the amount of confusion.
Setting RC selector from pod template labels SGTM. Any concerns It wouldn't have to work with separate templates, though it would be desirable if it did. It would be nice if we could add preconditions based on other objects (resource version of pod template in this case) to etcd transactions.
I think we agreed in another issue that defaulting the selector from the pod template labels is reasonable. No argument from me. One problem with pod templates is that we lose the strict relationship between selector and template, so if you change the template the RC needs to behave intelligently (I refuse to create more pods because the template selector doesn't match mine, etc)
We should do this, and we should default replicas to 1. We could also consider defaulting replication controller labels from pod template labels. That way, essentially the only thing that would need to be specified for a singleton RC would be the pod template.
I don't think we can default replicas to 1, since we can't tell the difference between an explicit zero and a default zero, and I think there are lots of reasonable cases where you want to set replicas == 0 on create. (esp. in the context of socket activation)
Responded on the PR: We can distinguish default from 0 if we make it a pointer.
Change:
LastHeartbeatTime:  metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), LastTransitionTime: fakeNow, }, <ins> { Type:               v1.NodePIDPressure, Status:             v1.ConditionUnknown, Reason:             "NodeStatusNeverUpdated", Message:            "Kubelet never posted node status.", LastHeartbeatTime:  metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), LastTransitionTime: fakeNow, }, </ins> }, }, },

Discussion:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If the matter is security related, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: What happened: when the node lost connection with master , using 'kubectl describe node' find the NodePIDPressure is false , no switch to unknown. What you expected to happen: PIDPressure Unknown Fri, 14 Sep 2018 05:13:09 +0800 Fri, 14 Sep 2018 05:13:53 +0800 NodeStatusUnknown Kubelet stopped posting node status. How to reproduce it (as minimally and precisely as possible): stop kubelet, wait the node Notready check the node status 'kubectl describe node' Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
/sig node
Change:
expectedLBs = make([]network.LoadBalancer, 0) setMockLBs(az, ctrl, &expectedLBs, "service", 1, i+1, c.isInternalSvc) // finally, delete it. <ins> if c.wrongRGAtDelete { az.LoadBalancerResourceGroup = "nil" } </ins> err = az.EnsureLoadBalancerDeleted(context.TODO(), testClusterName, &c.service) expectedLBs = make([]network.LoadBalancer, 0) mockLBsClient := mockloadbalancerclient.NewMockInterface(ctrl)

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: controller-manager is stuck in deleting an incorrectly configured LB type service. it cannot be recovered until restarted. What you expected to happen: controller-manager should recover. At least it should allow us to create the service without restarting it. How to reproduce it (as minimally and precisely as possible): put a random IP in above yaml and make sure the resource group doen't exist. Anything else we need to know?: Environment: Kubernetes version (use ): 1.12.4 Cloud provider or hardware configuration: AKS OS (e.g: ): Kernel (e.g. ): Install tools: Others:
/sig azure
I also want to add that the above repro is stuck in 403. It's possible for it to be stuck in 404 as well when the SP has the right permission.
Can you share the log for 404?
Thanks for reporting the issue. /assign Do you mean other services couldn't be configured when this happens?
correct.
FYI, we had the same issue when the Idle Timeout annotation was set to "3" which isn't a supported case. Will this PR also cover this edge case ?
Unfortunately , this is still not fixed. The idle timeout is not 403 or 404. We need another fix for this (and possibly more for other annotations)
Change:
return fmt.Errorf("unable to add because the healthz endpoint has already been created") } s.healthzChecks = append(s.healthzChecks, checks...) <del> return s.addLivezChecks(livezGracePeriod, checks...) </del> <ins> if err := s.AddLivezChecks(livezGracePeriod, checks...); err != nil { return err } return s.AddReadyzChecks(checks...) </ins> } <del> // addReadyzChecks allows you to add a HealthCheck to readyz. func (s *GenericAPIServer) addReadyzChecks(checks ...healthz.HealthChecker) error { </del> <ins> // AddReadyzChecks allows you to add a HealthCheck to readyz. func (s *GenericAPIServer) AddReadyzChecks(checks ...healthz.HealthChecker) error { </ins> s.readyzLock.Lock() defer s.readyzLock.Unlock() if s.readyzChecksInstalled {

Discussion:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : When using GenericAPIServer you can only add new checks via function which adds them to all , , and endpoints. All other methods like are private. I would like to request those methods to be made public: Why is this needed: Developers of apiservers should be able to define their readiness probes add them to specific endpoint of their choosing. For example in case of Metrics Server we defined probes: Readiness - Metrics cache is full. As MS serves data only from cache, traffic will be only sent after cache is full. Liveness - Metric scraping loop is not deadlocked. It doesn't make sense to have those probes to both endpoints. Not ready metric cache should not cause MS being killed via liveness probe. Delayed scrape should not cause traffic not being served from cache due failing readiness probe. /assign
/sig apimachinery
The label(s) cannot be applied, because the repository doesn't have them <detailsIn response to : /sig apimachinery 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
/sig api-machinery
/cc /triage accepted
I can see this. PR welcome.
Change:
framework.ExpectNoError(err) scheduledPods, notScheduledPods := e2epod.GetPodsScheduled(masterNodes, allPods) <del> printed := false printOnce := func(msg string) string { if !printed { printed = true return msg } return "" } framework.ExpectEqual(len(notScheduledPods), expectedNotScheduled, printOnce(fmt.Sprintf("Not scheduled Pods: %#v", notScheduledPods))) framework.ExpectEqual(len(scheduledPods), expectedScheduled, printOnce(fmt.Sprintf("Scheduled Pods: %#v", scheduledPods))) </del> <ins> framework.ExpectEqual(len(notScheduledPods), expectedNotScheduled, fmt.Sprintf("Not scheduled Pods: %#v", notScheduledPods)) framework.ExpectEqual(len(scheduledPods), expectedScheduled, fmt.Sprintf("Scheduled Pods: %#v", scheduledPods)) </ins> } // verifyReplicasResult is wrapper of verifyResult for a group pods with same "name: labelName" label, which means they belong to same RC

Discussion:
What happened: When an issue happens at the following check in the conformance test "validates resource limits of pods that are allowed to run": the debugging message ("Scheduled Pods: %#v") doesn't appear in the log at all like the following: ` and that makes debugging difficult actually. What you expected to happen: The debugging message should appear in the log if an issue happens. Environment: Kubernetes version (use ): v1.15.1 Cloud provider or hardware configuration: OpenStack OS (e.g: ): Ubuntu 18.04.1 LTS Kernel (e.g. ): 4.15.0-55-generic Install tools: kubeadm Network plugin and version (if this is a network-related bug): Others:
/sig testing /sig scheduling
Change:
"strconv" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" <ins> utilnet "k8s.io/apimachinery/pkg/util/net" </ins> "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"

Discussion:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: kubectl cluster-info displays proxy urls for cluster services If those services are using https, the referenced urls do not work (they try to proxy using http) What you expected to happen: Services with a port name of https or 443 should use the ‘https:<name:<port‘ form How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration**: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others: /assign /sig cli
Change:
ExpiresIn:    json.Number(expiresIn), ExpiresOn:    json.Number(expiresOn), NotBefore:    json.Number(expiresOn), <del> Resource:     resourceID, </del> <ins> Resource:     tokenAudience, </ins> Type:         tokenType, }, environment: environment,

Discussion:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --What happened: When using kubectl, authentication fails with the below error For some reason kubectl is adding a lot of s to the start of the SPN - this can be observed in What you expected to happen: Authentication works as in previous versions of Kubectl How to reproduce it (as minimally and precisely as possible): Create a cluster using Azure AD authentication. Authenticate from a client and wait until the token expires. Use Kubectl and have it automatically refresh the token; it will fail due to the extra 'spn:' entries. Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration: on-premise OS (e.g: ): macOS 10.14.6 Kernel (e.g. ): Darwin Hostname 18.7.0 Darwin Kernel Version 18.7.0: Mon Feb 10 21:08:45 PST 2020; root:xnu-4903.278.28~1/RELEASEX8664 x86_64 Install tools: N/A Network plugin and version (if this is a network-related bug): N/A Others:
/sig cli
Kubectl version 1.18.0 Kubernetes version 1.16.6
can you confirm whether your original kubeconfig already has in apiserver-id or not? in the mean time, you may try it can convert your kubeconfig from azure module to exec module and do the token thing outside kubectl
At this point if I remove the tokens and try to reauth i get the error described above. I've tried it both ways with apiserver-id having an initially and not, both lead to the same behavior in the end.
i know what's going on now. will prepare a fix. the root cause is that token's target resource (adal.Token.Resource) needs to have prefix and this prefix gets unexpectedly to as well, which gets written back to kubeconfig. So every time kubectl is run, it adds to apiserver-id
/priority important-soon
I'm seeing this with kubectl 1.17.3 and kubernetes 1.16.7.

It's unclear to me what versions are impacted and in what version it is fixed, since only version 1.18 is mentioned.
This still happens on kubectl 1.16.12 and 1.17.8
This still happens on kubectl v1.18.5
same
can you guys share your kubectl version --client and kubeconfig with me? you can find me on kubernetes slack. the slack user name is same as my github handle.
Version 1.17.6 works fine.
Since I was mistaken thinking was still causing this for me, I figured I would just drop a note for others in case it's helpful. Turns out my problem was actually due to and looks to have been resolved as of the v3.3.0 release.
This issue has now reappeared for me - although not necessarily the same root cause. AKS 1.19.0 Authentication works, but it spams frequently.
Change:
candidates = append(candidates, containerStatus) } } <del> if len(candidates) <= p.containersToKeep { </del> <ins> if len(candidates) <= containersToKeep { </ins> return containerStatusbyCreatedList{} } sort.Sort(candidates) <del> return candidates[p.containersToKeep:] </del> <ins> return candidates[containersToKeep:] </ins> } // deleteContainersInPod issues container deletion requests for containers selected by getContainersToDeleteInPod. <del> func (p *podContainerDeletor) deleteContainersInPod(exitedContainerID string, podStatus *kubecontainer.PodStatus) { for _, candidate := range p.getContainersToDeleteInPod(exitedContainerID, podStatus) { </del> <ins> func (p *podContainerDeletor) deleteContainersInPod(exitedContainerID string, podStatus *kubecontainer.PodStatus, removeAll bool) { containersToKeep := p.containersToKeep if removeAll { containersToKeep = 0 } for _, candidate := range getContainersToDeleteInPod(exitedContainerID, podStatus, containersToKeep) { </ins> select { case p.worker <- candidate.ID: default:

Discussion:
Kubelet evicts pods whenever there is memory or disk pressure. It marks the pods as to evict them. To help with reducing disk pressure, kubelet should delete all containers belonging to pods right away. This will result in loss of logs. In the future, we can copy out logs from dead containers before deleting them. Logs can be rotated separately from dead containers. IMO, this feature is required for disk usage based evictions to work reliably in kubelet.