jiebi/CodeConvo huggingface dataset:
Change:
SyncFrequency:      5 * time.Second, HTTPCheckFrequency: 5 * time.Second, } <del> go otherKubelet.RunKubelet("", "", servers[0], "localhost", 0) </del> <ins> go otherKubelet.RunKubelet("", "", servers[0], "localhost", "", 0) </ins> // Ok. we're good to go. glog.Infof("API Server started on %s", apiserver.URL)

Discussion:
When using or with a key/value that has a multi-line string as value, that value will appear as quoted string in the log message, i.e. the log message will still be a single line. It would be nicer to print the value in text mode so that it goes across multiple lines, with clear indicators for start and end of the value. Indention could be used to avoid mistaking some embedded line as the start of a new log message. In JSON mode, the value should be formatted normally. /sig instrumentation /wg structured-logging Always printing as a single line can can make the log output unreadable ().
When adding something like this, can be reverted and implemented differently.
My original thinking was that only objects that explicitly ask for multi-line output get formatted that way. But that means that we need to review log calls very carefully. An alternative is to automatically switch from quoting strings to multi-line output based on some heuristic, for example when there's more than one line break.
Here's a potential implementation:
If structured logging is needed in any other case I can contribute, please inform if needed.
/triage accepted /assign /priority important-soon /area logging /cc /cc
We have the same problem as in kube-scheduler also in kubelet, it's just that no-one has seen and/or complained about the multi-line strings. With the benchmark + log analysis tool from I found the following multi-line string parameters in a kubelet log: <details</details
Change:
cloudConfig.TokenSource = google.ComputeTokenSource("") cloudConfig.UseMetadataServer = true <ins> featureMap := make(map[string]bool) cloudConfig.AlphaFeatureGate = &AlphaFeatureGate{featureMap} </ins> if configFile != nil { if configFile.Global.ApiEndpoint != "" { cloudConfig.ApiEndpoint = configFile.Global.ApiEndpoint

Discussion:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: I created a service (type LoadBalancer) on a 1.8.3 cluster. What you expected to happen: A load balancer to be deployed to GCP How to reproduce it (as minimally and precisely as possible): On a v1.8.3 cluster with GCP integration, deploy a service type LoadBalancer. The controller-manager was started with . However, was not specified. Example service: Anything else we need to know?: Stack trace captured in gist: Environment: Kubernetes version (use ): v1.8.3 Cloud provider or hardware configuration: GCP OS (e.g. from /etc/os-release): Ubuntu16 Kernel (e.g. ): 4.10.0-38-generic Install tools: Kubernetes-the-hard-way Others:
/sig gcp
Change:
return nil, err } options := metav1.PatchOptions{ <del> Force:  &obj.ForceConflicts, DryRun: []string{metav1.DryRunAll}, </del> <ins> Force:        &obj.ForceConflicts, FieldManager: obj.FieldManager, DryRun:       []string{metav1.DryRunAll}, </ins> } return resource.NewHelper(obj.Info.Client, obj.Info.Mapping).Patch( obj.Info.Namespace,

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: fails. What you expected to happen: I would expect the PatchOptions to not include FieldManager. The following fix will eliminate the problem. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): 1.16 and 1.17 Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
/sig cli
cc
/wg apply
cc
I agree, we clearly missed that. Would you mind sending the fix in the form of a PR? Also please include a test, because that shouldn't have happened if I had tested my code properly :-(
Clearly we should also cherry-pick that into 1.17. I'll send the PR on Monday if you prefer! Thanks.
Ok, I will send a PR. However, I can't include a test immediately because I don't understand how the test works.
Thanks, I’ll try to show you how to get started!
Any update we clearly need this promptly since code-freeze is coming! Thanks.
I'll send a PR on Monday if you haven't! Thanks.
Sorry, I haven't started working on this test. Thanks.
Change:
processStartTime.WithLabelValues().Set(start) return nil } <del> func getProcessStart() (float64, error) { pid := os.Getpid() p, err := procfs.NewProc(pid) if err != nil { return 0, err } if stat, err := p.Stat(); err == nil { return stat.StartTime() } return 0, err } </del>

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: Start kubelet on a Windows node and you will get this error: What you expected to happen: The process start time to be read appropriately for Windows How to reproduce it (as minimally and precisely as possible): Start kubelet on a Windows node Anything else we need to know?: The gauge falls back to but we get this error. This information is avaliable via the windows package so we should be able to get an accurate time. Environment: Kubernetes version (use ): 1.20.1 Cloud provider or hardware configuration: azure OS (e.g: ): Windows 2019 Kernel (e.g. ): Version 10.0..1637 Install tools: aks-engine (but would be any) Network plugin and version (if this is a network-related bug): Others: /sig windows /assign
/triage accepted
Change:
203.0.113.1	podFoo.domainFoo	podFoo # Entries added by HostAliases. <del> 123.45.67.89	foo 123.45.67.89	bar 123.45.67.89	baz 456.78.90.123	park 456.78.90.123	doo 456.78.90.123	boo </del> <ins> 123.45.67.89	foo	bar	baz 456.78.90.123	park	doo	boo </ins> `, }, }

Discussion:
What would you like to be : Currently, specifying multiple aliases for a single host using results in a line for each alias in . Example: leads to an file containing something like Why is this needed: Having multiple entries for the same IP address in can break DNS resolution for some software. See for more details <!-- DO NOT EDIT BELOW THIS LINE --/kind feature
/sig node
Change:
manager.podStoreSynced = alwaysReady manager.jobStoreSynced = alwaysReady <del> jobSynced := false manager.syncHandler = func(ctx context.Context, jobKey string) (bool, error) { jobSynced = true return true, nil } </del> stopCh := make(chan struct{}) defer close(stopCh) <del> go sharedInformers.Core().V1().Pods().Informer().Run(stopCh) </del> <ins> podInformer := sharedInformers.Core().V1().Pods().Informer() go podInformer.Run(stopCh) cache.WaitForCacheSync(stopCh, podInformer.HasSynced) </ins> go manager.Run(context.TODO(), 1) // Create job but don't add it to the store. cases := map[string]struct { <del> job           *batch.Job inCache       bool wantJobSynced bool </del> <ins> job     *batch.Job inCache bool </ins> }{ "job_does_not_exist": { job: newJob(2, 2, 6, batch.NonIndexedCompletion),

Discussion:
pull-kubernetes-unit TestWatchOrphanPods/orphan May 4th Waiting for Pod to get the finalizer removed: timed out waiting for the condition No response /sig apps
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
/assign
Likely a bug in
Change:
c.forget(false) c.stop() } <ins> glog.V(2).Infof("cacheWatcher add function blocked processing for %v", time.Since(startTime)) </ins> } func (c *cacheWatcher) sendWatchCacheEvent(event watchCacheEvent) {

Discussion:
https://k8s- Failed: [] Load capacity [Feature:Performance] should be able to handle 30 pods per node {Kubernetes e2e suite} Previous issues for this test:
This is pretty much the same failure, that are happening in "gce-enormous" suite and we currently debugging them with The main reason of those failures is that we are terminating all watchers for a particular resource type from time to time, and some of them are actually causing a snowball effect. After more looking into it, my hypothesis is that our machinery for aggregating watchers in apiserver sometimes is just to slow. In particular, I some log in my local branch and what I'm observing is that in etcd_watcher, we are: accumulating objects in incoming channel but also accumulating objects in outgoing channel, and the accumulation there is usually higher [I will send a PR to put those logs into master - they seem to be pretty useful for debugging such issues.] So my current hypothesis is that dispatching watch events to watchers is what is too slow. We will continue debugging.
The logs that I seem to confirm my hypothesis - outgoing channel is generally more full then the incoming channel in etcd_watcher: vs I'm working on the PR that should at least improve the situation.
https://k8s- Failed: [] Load capacity [Feature:Performance] should be able to handle 30 pods per node {Kubernetes e2e suite}
https://k8s- Failed: [] Load capacity [Feature:Performance] should be able to handle 30 pods per node {Kubernetes e2e suite}
https://k8s- Failed: [] Load capacity [Feature:Performance] should be able to handle 30 pods per node {Kubernetes e2e suite}
[FLAKE-PING] This flaky-test issue would love to have more attention.

https://k8s- Failed: [] Load capacity [Feature:Performance] should be able to handle 30 pods per node {Kubernetes e2e suite}
https://k8s- Failed: [] Load capacity [Feature:Performance] should be able to handle 30 pods per node {Kubernetes e2e suite}
https://k8s- Failed: [] Load capacity [Feature:Performance] should be able to handle 30 pods per node {Kubernetes e2e suite}
https://k8s- Failed: [] Load capacity [Feature:Performance] should be able to handle 30 pods per node {Kubernetes e2e suite}
https://k8s- Failed: [] Load capacity [Feature:Performance] should be able to handle 30 pods per node {Kubernetes e2e suite}
Please apply the label to this issue if it does not need to be fixed before we launch 1.4. Otherwise please advise on how to proceed with respect to 1.4.
This was a regression - I fixed it by reverting an offending PR: This seems to be fixed now.
I have 33 pods in my container (1 is substantive, the other 32 just run on log files). I get this all the time now. I'm running 1.5.4.
- to be honest, I don't undertsand what your wrote. what is "container" in "33 pods in my container"? Also, if you believe there is a bug somewhere, please open a new issue instead of adding comment to more than half-year-old one.
Change:
syncFn func(key string) error queue workqueue.RateLimitingInterface <ins> // last generation this controller updated the condition per CRD name (to avoid two // different version of the apiextensions-apiservers in HA to fight for the right message) lastSeenGenerationLock sync.Mutex lastSeenGeneration     map[string]int64 </ins> } // NewConditionController constructs a non-structural schema condition controller.

Discussion:
/sig api-machinery /kind bug /assign sttts because the controller that maintains the condition runs multiple instances in HA apiserver clusters, the controller must not duel in cases where the validation messages change slightly between releases
Change:
} gorestfulContainer := restful.NewContainer() <del> gorestfulContainer.ServeMux = http.NewServeMux() </del> gorestfulContainer.Router(restful.CurlyRouter{}) // e.g. for proxy/{kind}/{name}/{*} gorestfulContainer.RecoverHandler(func(panicReason interface{}, httpWriter http.ResponseWriter) { logStackOnRecover(s, panicReason, httpWriter)

Discussion:
whether should init gorestful.container.ServeMux once none No response <details</details<details</details<details</details<details</details<details</details<details</details
/sig api-machinery
/assign /triage accepted
Hi , as for my understanding, func 'NewAPIServerHandler' initialize gorestfulContainer.ServeMux each time due to gorestfulContainer.ServeMux = http.NewServeMux() when the function is called ,am i right ?
Looks like it is duplicated and we should be able to remove the call. Feel free to assign if anyone would like to send a PR for this.
I want to work on this but need to some guidance
Yes, and it should already have been initialized when calling
yes got it , so we can remove call gorestfulContainer.ServeMux = http.NewServeMux() ?
yes
/assign I will raised PR.
Hi I have raised PR could you check ?
Change:
out := normalizeLocation(in) out = stripTimes(out) out = stripAddresses(out) <ins> out = normalizeInitFunctions(out) </ins> if expected.NormalizeOutput != nil { out = expected.NormalizeOutput(out) }

Discussion:
Internal job that runs k8s UT with master golang. https://prow.ppc64le- UT is failing when run with golang tip version. Around 24th of August No response This being a negative test scenario, looking at the test log, it seems the failure message from rest client isn't matching the expected in the string at The part of the text that doesn't match is: Expected: Actual: Steps to reproduce: master golang version clone kubernetes/test/e2e/framework/pod test -v -run TestFailureOutput /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
/remove-kind failing-test /kind cleanup
is it happening in x86 too? is a golang bug ? there is also another bigger problem
Yes it is happening in x86 too. Yes, it could even be a golang bug too. But thought some upgrades in golang might require modification here in k8s. The above panic error that you pointed out already has an issue
This issue is introduced post addition of https://go- Global level functions are getting wrapped by synthetic init and so is getting changed to in actual traceback. Fix strategy has to be decided to support golang change mentioned above. Tagging others to request more inputs. /cc
^^
I think the output test is too strict: it shouldn't depend on the name given to anonymous functions. On the other hand, it should still ensure that functions like are printed as expected. This can be solved by further transforming the text during - I'll prepare a PR. /assign
Change:
glog.Errorf("Specified Node IP not found in cloudprovider") return } <del> nodeAddresses = []v1.NodeAddress{*nodeIP} </del> } newNode := node.DeepCopy() newNode.Status.Addresses = nodeAddresses

Discussion:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If this may be security issue, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: When using the flag on the kubelet, the node's list no longer reports , , addresses. What you expected to happen: That I can explicitly set to an IP, but the other addresses will still show up. How to reproduce it (as minimally and precisely as possible): Create a new kops cluster, modify the kubelet to use the flag with the eth0 on the node. Run Anything else we need to know?: This change will probably take place in  This came up as a result of Environment: Kubernetes version (use ): 1.9.x Cloud provider or hardware configuration: AWS OS (e.g. from /etc/os-release): any Kernel (e.g. ): any Install tools: kops /sig network /sig node I'll make a PR for this change shortly
Change:
# cleanup kubectl delete svc prune-svc 2>&1 "${kube_flags[@]}" <ins> ## kubectl apply -f some.yml --force # Pre-condition: no service exists kube::test::get_object_assert services "{{range.items}}{{$id_field}}:{{end}}" '' # apply service a kubectl apply -f hack/testdata/service-revision1.yaml "${kube_flags[@]}" # check right service exists kube::test::get_object_assert 'services a' "{{${id_field}}}" 'a' # change immutable field and apply service a output_message=$(! kubectl apply -f hack/testdata/service-revision2.yaml 2>&1 "${kube_flags[@]}") kube::test::if_has_string "${output_message}" 'field is immutable' # apply --force to recreate resources for immutable fields kubectl apply -f hack/testdata/service-revision2.yaml --force "${kube_flags[@]}" # check immutable field exists kube::test::get_object_assert 'services a' "{{.spec.clusterIP}}" '10.0.0.12' # cleanup kubectl delete -f hack/testdata/service-revision2.yaml "${kube_flags[@]}" </ins> set +o nounset set +o errexit }

Discussion:
/kind bug What happened: From I expected kubectl apply to support deleting a resource and recreating it, if changes cannot be applied. kubectl replace works: What you expected to happen: How to reproduce it (as minimally and precisely as possible): ` Change clusterIP to any IP address. Anything else we need to know?: Environment: Kubernetes version (use ): client v1.11.0, cluster v1.11.1 Cloud provider or hardware configuration: QEMU/KVM OS (e.g. from /etc/os-release): Cluster CentOS Linux release 7.5.1804 (Core), client macOS Kernel (e.g. ): 3.10.0-862.6.3.el7.x86_64 Install tools: kubeadm Others:
/cc
/assign
Change:
} } } <del> metrics.Record(r, requestInfo, metrics.APIServerComponent, "", http.StatusTooManyRequests, 0, 0) </del> <ins> metrics.RecordRequestTermination(r, requestInfo, metrics.APIServerComponent, http.StatusTooManyRequests) </ins> tooManyRequests(r, w) } }

Discussion:
What happened: When the kube-apiserver timeouts on a request, we end up doubling the counts measured in : apiserverrequestcounts apiserverrequesttotal apiserverrequestlatencies apiserverrequestlatenciessummary apiserverrequestdurationseconds apiserverresponsesizes What you expected to happen: We only count our requests a single time in our metrics. How to reproduce it (as minimally and precisely as possible): Add a 60 second sleep in the func . You may want to filter by resource (like pods or something) and verb for testing (otherwise this will be quite annoying). Manually hit that endpoint and look at the metric output. /assign
/sig api-machinery instrumentation /cc
Thanks for filing. Can we, while fixing this, add a metric counting timed-out requests? You can't tell from the latency distribution, even if we made the buckets more useful.
Yeah, that's the current plan. I've relayed the idea to offline and he has concurred.
Change:
// parseField scans a field until a terminator func (p *Parser) parseField(cur *ListNode) error { p.consumeText() <del> var r rune for { r = p.next() if isTerminator(r) { p.backup() break } </del> <ins> for p.advance() { </ins> } value := p.consumeText() if value == "*" { cur.append(newWildcard()) } else { <del> cur.append(newField(value)) </del> <ins> cur.append(newField(strings.Replace(value, "", "", -1))) </ins> } return p.parseInsideAction(cur) } <ins> // advance scans until next non-escaped terminator func (p *Parser) advance() bool { r := p.next() if r == '' { p.next() } else if isTerminator(r) { p.backup() return false } return true } </ins> // isTerminator reports whether the input is at valid termination character to appear after an identifier. func isTerminator(r rune) bool { if isSpace(r) || isEndOfLine(r) {

Discussion:
I love using but I cannot figure out how to print an annotation that contains a special character like or or . This does not work: nor this: nor this: nor this: kubectl get pods tmp--dhpx0 -o jsonpath="{$['metadata']['annotations']['']}" (the last one should work according to what I can find about jsonPath, but doesn't, and anyhow is hard to get shell escaping right for. Need a way to quote a
A use case for this is extracting "created-by" or "init-container" annotations. I've wanted to do both in the last month and fought jsonpath.
FYI, this is possible with go-template. We should still fix the jsonpath though. Similar issue:
Change:
return err } o.AuthClient = client.AuthorizationV1() <ins> o.DiscoveryClient = client.Discovery() </ins> o.Namespace = "" if !o.AllNamespaces { o.Namespace, _, err = f.ToRawKubeConfigLoader().Namespace()

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 you expected to happen: if returns true I expect to be able to perform the action without issue. Note in this case my service user has a rolebinding in a single namespace (and that is also what my kubecontext is set to.) if I change my default to a different namespace then the command returns false How to reproduce it (as minimally and precisely as possible): create a namespace (test) create a service account in that namespace create a role that gives get list and watch permissions to create a rolebinding from that role to the service account. Anything else we need to know?: this is special because namespaces are not scoped to a namespace. if you replace the command with then you get the exepcted result however this breaks the path of least suprise. Environment: Kubernetes version (use ):Cloud provider or hardware configuration: GKE OS (e.g: ): Kernel (e.g. ): Install tools: Others:
/sig auth
asks the authorization system if the given verb can be performed on the given noun at the given scope. It does not interpret whether the resource exists at that scope. We could warn if we find the specified resource and it does not exist at the specified scope (just like we warn if you ask about a resource that we can't find), but we would still interrogate the authorization system and return the results as we do today. /kind feature /remove-kind bug
/cc