jiebi/CodeConvo huggingface dataset:
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: After deleting loadbalancer service, openstack cloud provider don't delete floatingip. What you expected to happen: After deleting loadbalancer service, openstack cloud provider delete floatingip. Anything else we need to know?: If ServiceAnnotationLoadBalancerFloatingNetworkId is specified to 'x.x.x.x' and the 'floating-network-id' is empty, openstack cloud provider don't delete floatingip. Environment: Kubernetes version (use ):latest Cloud provider or hardware configuration**: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
/sig openstack
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals

Discussion:
return nil } <del> if lbaas.opts.FloatingNetworkId != "" && loadbalancer != nil { </del> <ins> if loadbalancer != nil && loadbalancer.VipPortID != "" { </ins> portID := loadbalancer.VipPortID floatingIP, err := getFloatingIPByPortID(lbaas.network, portID) if err != nil && err != ErrNotFound {
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: Testing bringing up k8s cluster using kubeadm from latest k8s code from master branch. kubelet is not coming up and below is the errors from syslog: upon looking at the code from where the error is happening, it is evident that the err checking is missing. What you expected to happen: deployment to succeed. How to reproduce it (as minimally and precisely as possible): Use the latest code from k8s and build a k8s release and bring up cluster using kubeadm Anything else we need to know?: Environment: Kubernetes version (use ): latest Cloud provider or hardware configuration**: GCE OS (e.g. from /etc/os-release): 16.04 LTS (Xenial Xerus) Kernel (e.g. ): Linux e2e--master 4.4.0-21-generic -Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x8664 x8664 x86_64 GNU/Linux Install tools: kubeadm Others: /sig node /cc
PTAL

Discussion:
// use kubeletServer to construct the default KubeletDeps kubeletDeps, err := app.UnsecuredDependencies(kubeletServer) <ins> if err != nil { die(err) } </ins> // add the kubelet config controller to kubeletDeps kubeletDeps.KubeletConfigController = kubeletConfigController
Change:
According to code snippet The handles the ServiceUpdate events, it first check out whether or not current service need a LoadBalancer, and if not, it ensures corresponding LoadBalacner deleted. However, another branch of the statement is a little bit confusing. It says The load balancer doesn't exist yet, so create it_, and then it calls . I think at this time, we're not sure whether or not the load balancer already exists (since we didn't call ), so the proper behavior would be ensure load balancer exists (actually just calls indeed), so the comment (L-283) and the function name (L-285 ) isn't very appropriate, it's confusing right?
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig network
/area cloudprovider
Please see
I just follow and I think these are two different issues because 1) focus on the potential logical error in code (should check existence before calling create..) which I don't agree. I think the code logic is fine. But, 2) This issue focus on the code/comment expression, which means the code logic is okay but the comment and function name is NOT appropriate.
The only comment I think should be changed is L283.
Yes, I mean L283 too, however, I think the function name s. should also be changed.
- it may be called , i agree that if you do not have prior knowledge of the servicecontroller it may be confusing. can you open a PR ?
Takes me a lot of time for the first PR preparation... Now I've opened the PR, please check it out.

Discussion:
// TODO: We could do a dry-run here if wanted to avoid the spurious cloud-calls & events when we restart <del> // The load balancer doesn't exist yet, so create it. s.eventRecorder.Event(service, v1.EventTypeNormal, "CreatingLoadBalancer", "Creating load balancer") newState, err = s.createLoadBalancer(service) </del> <ins> s.eventRecorder.Event(service, v1.EventTypeNormal, "EnsuringLoadBalancer", "Ensuring load balancer") newState, err = s.ensureLoadBalancer(service) </ins> if err != nil { <del> return fmt.Errorf("Failed to create load balancer for service %s: %v", key, err), retryable </del> <ins> return fmt.Errorf("Failed to ensure load balancer for service %s: %v", key, err), retryable </ins> } <del> s.eventRecorder.Event(service, v1.EventTypeNormal, "CreatedLoadBalancer", "Created load balancer") </del> <ins> s.eventRecorder.Event(service, v1.EventTypeNormal, "EnsuredLoadBalancer", "Ensured load balancer") </ins> } // Write the state if changed

return err } <del> func (s *ServiceController) createLoadBalancer(service *v1.Service) (*v1.LoadBalancerStatus, error) { </del> <ins> func (s *ServiceController) ensureLoadBalancer(service *v1.Service) (*v1.LoadBalancerStatus, error) { </ins> nodes, err := s.nodeLister.ListWithPredicate(getNodeConditionPredicate()) if err != nil { return nil, err
Change:
In cluster/saltbase/salt/kube-proxy/kube-proxy.manifest, we have this: But kube-proxy also has a flag. Is there a reason to use the approach instead of using the flag? cc as you wrote the code, in
/cc who's working on moving kube-proxy to a DaemonSet
In general, oomscoreadj is not expected to be directly updated by pods and kubelet is expected to manage it. If kube-proxy runs in the Guaranteed QoS class, then it's OOM score adj will be set to a low number. Until that happens, kube-proxy process may want to be shielded from OOM kills to an extent (this matters only when kube-proxy's memory usage memory request) Meanwhile, it does not make sense to have two means to configure the same thing. I'll let decide which option he prefers and sunset the other option.
Thanks for clarifying. At this point, I prefer to use the built-in flag instead of relying on composing bash commands. Sent for this.

Discussion:
command: - /bin/sh - -c <del> - echo -998 > /proc/$$$/oom_score_adj && kube-proxy {{kubeconfig}} {{cluster_cidr}} --resource-container="" {{params}} 1>>/var/log/kube-proxy.log 2>&1 </del> <ins> - kube-proxy {{kubeconfig}} {{cluster_cidr}} --resource-container="" --oom-score-adj=-998 {{params}} 1>>/var/log/kube-proxy.log 2>&1 </ins> {{container_env}} {{kube_cache_mutation_detector_env_name}} {{kube_cache_mutation_detector_env_value}}

command: - /bin/sh - -c <del> - echo -998 > /proc/$$$/oom_score_adj && kube-proxy {{api_servers_with_port}} {{kubeconfig}} {{cluster_cidr}} --resource-container="" {{params}} 1>>/var/log/kube-proxy.log 2>&1 </del> <ins> - kube-proxy {{api_servers_with_port}} {{kubeconfig}} {{cluster_cidr}} --resource-container="" --oom-score-adj=-998 {{params}} 1>>/var/log/kube-proxy.log 2>&1 </ins> {{container_env}} {{kube_cache_mutation_detector_env_name}} {{kube_cache_mutation_detector_env_value}}

<del> // +build cgo,linux </del> <ins> // +build linux </ins> /* Copyright 2015 The Kubernetes Authors.

<del> // +build !cgo !linux </del> <ins> // +build !linux </ins> /* Copyright 2015 The Kubernetes Authors.
Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . --Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: Scheduler performance test does not work: What you expected to happen: How to reproduce it (as minimally and precisely as possible): Run schedulerperf by following: 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 scheduling

Discussion:
How To Run ------ <del> ``` cd kubernetes/test/integration/scheduler_perf </del> <ins> ```shell # In Kubernetes root path make generated_files cd test/integration/scheduler_perf </ins> ./test-performance.sh ```
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: kube-apiserver --help still shows this: It looks like the related feature can be turned off. However, dynamic volume provisioning Alpha has retried in 1.6. What you expected to happen: Remove from feature gate to avoid confusion. How to reproduce it (as minimally and precisely as possible): Run Anything else we need to know?: No Environment: Kubernetes version (use ): 1.7+ Cloud provider or hardware configuration**: Any OS (e.g. from /etc/os-release): Any Kernel (e.g. ): Any Install tools: Others:
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig api-machinery
/sig api-machinery
SIG API Machinery doesn't own the contents of the API. /sig storage

Discussion:
// alpha: v1.4 ExternalTrafficLocalOnly utilfeature.Feature = "AllowExtTrafficLocalEndpoints" <del> // owner: @saad-ali // alpha: v1.3 DynamicVolumeProvisioning utilfeature.Feature = "DynamicVolumeProvisioning" </del> // owner: @mtaufen // alpha: v1.4 DynamicKubeletConfig utilfeature.Feature = "DynamicKubeletConfig"

AppArmor:                                    {Default: true, PreRelease: utilfeature.Beta}, DynamicKubeletConfig:                        {Default: false, PreRelease: utilfeature.Alpha}, KubeletConfigFile:                           {Default: false, PreRelease: utilfeature.Alpha}, <del> DynamicVolumeProvisioning:                   {Default: true, PreRelease: utilfeature.Alpha}, </del> ExperimentalHostUserNamespaceDefaultingGate: {Default: false, PreRelease: utilfeature.Beta}, ExperimentalCriticalPodAnnotation:           {Default: false, PreRelease: utilfeature.Alpha}, Accelerators:                                {Default: false, PreRelease: utilfeature.Alpha},
Change:
AppArmor validator returns error if the runtime is not . For other runtime integrated via CRI, the runtime will be , and will not be able to provide AppArmor support because of this. Currently, we decided to always pass validation for remote runtime, but we need a better solution in the future. This is similar with , and also related to . /cc
I think we should pass validation for all container runtimes in validateHost, since it is host-wide. We could add runtime-specific validation after .
Let me remove this requirement. /assign

Discussion:
} // Check runtime support. Currently only Docker is supported. <del> if runtime != "docker" { return fmt.Errorf("AppArmor is only enabled for 'docker' runtime. Found: %q.", runtime) </del> <ins> if runtime != "docker" && runtime != "remote" { return fmt.Errorf("AppArmor is only enabled for 'docker' and 'remote' runtimes. Found: %q.", runtime) </ins> } return nil
Change:
uses everywhere, directly and via client-go. On the other hand, we have in :
any idea why the import checker does not catch this?
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals

Discussion:
<ins> reviewers: - stevekuznetsov - deads2k - sttts approvers: - stevekuznetsov - deads2k - sttts </ins>

importsBelowBase := strings.HasPrefix(imp, i.BaseDir) importsAllowed := false for _, allowed := range i.AllowedImports { <del> importsAllowed = importsAllowed || strings.HasPrefix(imp, allowed) </del> <ins> exactlyImportsAllowed := imp == allowed importsBelowAllowed := strings.HasPrefix(imp, fmt.Sprintf("%s/", allowed)) importsAllowed = importsAllowed || (importsBelowAllowed || exactlyImportsAllowed) </ins> } return importsBelowRoot && !importsBelowBase && !importsAllowed
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind flake What happened: TestApps always failed Anything else we need to know?: https://k8s- https://k8s- /sig testing
my pr appear same problem. i will investigate the cause later.
/sig cli
/assign
GitHub didn't allow me to assign the following users: zjj2wry. Note that only can be assigned. <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
fails when run by . Stress testing runs 1000 times locally without any errors. https://k8s-
Hit this again here https://k8s-
this is odd... the test output actually shows TestApps succeeding in that run:
Happened again: https://k8s- The messages were interleaved . was appended at the end. I think that threw off.
By the looks of test grid, it looks like it's been failing consistently in both presubmit and postsubmit builds: https://k8s- https://k8s- The logs are happy, the junit output is not. Maybe it has something to do with the fact that ginkgo is used to run the test cases? It's used for TestOpenapi tests as well. There was an issue on those tests failing for what looks like the same reason Looks like they were fixed by /kind bug /priority failing-test
cc
[MILESTONENOTIFIER] Milestone Labels Incomplete Action required: This issue requires label changes. If the required changes are not made within 6 days, the issue will be moved out of the v1.8 milestone. priority: Must specify exactly one of [, , ]. <detailsAdditional instructions available <a href=""here</aThe commands available for adding these labels are documented <a href=""here</a</details

Discussion:
deps = [ ":go_default_library", "//vendor/github.com/onsi/ginkgo:go_default_library", <ins> "//vendor/github.com/onsi/ginkgo/config:go_default_library", "//vendor/github.com/onsi/ginkgo/types:go_default_library", </ins> "//vendor/github.com/onsi/gomega:go_default_library", ], )

package apps_test import ( <del> "testing" </del> . "github.com/onsi/ginkgo" <ins> . "github.com/onsi/ginkgo/config" . "github.com/onsi/ginkgo/types" </ins> . "github.com/onsi/gomega" <ins> "fmt" "testing" </ins> ) func TestApps(t *testing.T) { RegisterFailHandler(Fail) <del> RunSpecs(t, "Apps Suite") </del> <ins> RunSpecsWithDefaultAndCustomReporters(t, "Apps Suite", []Reporter{newlineReporter{}}) </ins> } <ins> // Print a newline after the default newlineReporter due to issue // https://github.com/jstemmer/go-junit-report/issues/31 type newlineReporter struct{} func (newlineReporter) SpecSuiteWillBegin(config GinkgoConfigType, summary *SuiteSummary) {} func (newlineReporter) BeforeSuiteDidRun(setupSummary *SetupSummary) {} func (newlineReporter) AfterSuiteDidRun(setupSummary *SetupSummary) {} func (newlineReporter) SpecWillRun(specSummary *SpecSummary) {} func (newlineReporter) SpecDidComplete(specSummary *SpecSummary) {} // SpecSuiteDidEnd Prints a newline between "35 Passed | 0 Failed | 0 Pending | 0 Skipped" and "--- PASS:" func (newlineReporter) SpecSuiteDidEnd(summary *SuiteSummary) { fmt.Printf("n") } </ins>
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: In some validation functions, such as , , value returned may be wrong. When return some errors and , we may just return , that is not expected What you expected to happen: return correctly
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig api-machinery
/assign
Can you clarify "wrong"?
For example in will add and to field of ResourceQuotaSpec. Before , these two resources are not to standard resource sets, will return error since they are not fully-qualified neither. But will not return any error since the two resources are to standard quota resource name sets. The result above is not expected . Error happened in , we need to return it instead of returning when we ran

Discussion:
string(api.ResourcePersistentVolumeClaims), string(api.ResourceStorage), string(api.ResourceRequestsStorage), <ins> string(api.ResourceServicesNodePorts), string(api.ResourceServicesLoadBalancers), </ins> ) // IsStandardResourceName returns true if the resource is known to the system

} } <del> return field.ErrorList{} </del> <ins> return allErrs </ins> } // Validate container resource name

return append(allErrs, field.Invalid(fldPath, value, "must be a standard resource for containers")) } } <del> return field.ErrorList{} </del> <ins> return allErrs </ins> } // Validate resource names that can go in a resource quota

return append(allErrs, field.Invalid(fldPath, value, isInvalidQuotaResource)) } } <del> return field.ErrorList{} </del> <ins> return allErrs </ins> } // Validate limit range types
Change:
I tried to add the support for , but the always failed with the error print: I checked the code of k8s, and found that "NoNewPrivs" is admitted only if the runtime is docker or rkt in kubelet. Related code is as follows: Maybe we should define a interface to get the capability of "NoNewPrivs" form runtime-shim.
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig node
Sent to fix this. Thanks for finding this out!

Discussion:
return PodAdmitResult{Admit: true} } <del> // Always admit for remote runtime. if a.Runtime.Type() == kubetypes.RemoteContainerRuntime { </del> <ins> // Always admit runtimes except docker. if a.Runtime.Type() != kubetypes.DockerContainerRuntime { </ins> return PodAdmitResult{Admit: true} } <del> // Make sure it is either docker or rkt runtimes. if a.Runtime.Type() != kubetypes.DockerContainerRuntime && a.Runtime.Type() != kubetypes.RktContainerRuntime { </del> <ins> // Make sure docker api version is valid. rversion, err := a.Runtime.APIVersion() if err != nil { </ins> return PodAdmitResult{ Admit:   false, Reason:  "NoNewPrivs", <del> Message: fmt.Sprintf("Cannot enforce NoNewPrivs: %s runtime not supported", a.Runtime.Type()), </del> <ins> Message: fmt.Sprintf("Cannot enforce NoNewPrivs: %v", err), </ins> } } <del> if a.Runtime.Type() == kubetypes.DockerContainerRuntime { // Make sure docker api version is valid. rversion, err := a.Runtime.APIVersion() if err != nil { return PodAdmitResult{ Admit:   false, Reason:  "NoNewPrivs", Message: fmt.Sprintf("Cannot enforce NoNewPrivs: %v", err), } } v, err := rversion.Compare("1.23.0") if err != nil { return PodAdmitResult{ Admit:   false, Reason:  "NoNewPrivs", Message: fmt.Sprintf("Cannot enforce NoNewPrivs: %v", err), } </del> <ins> v, err := rversion.Compare("1.23.0") if err != nil { return PodAdmitResult{ Admit:   false, Reason:  "NoNewPrivs", Message: fmt.Sprintf("Cannot enforce NoNewPrivs: %v", err), </ins> } <del> // If the version is less than 1.23 it will return -1 above. if v == -1 { return PodAdmitResult{ Admit:   false, Reason:  "NoNewPrivs", Message: fmt.Sprintf("Cannot enforce NoNewPrivs: docker runtime API version %q must be greater than or equal to 1.23", rversion.String()), } </del> <ins> } // If the version is less than 1.23 it will return -1 above. if v == -1 { return PodAdmitResult{ Admit:   false, Reason:  "NoNewPrivs", Message: fmt.Sprintf("Cannot enforce NoNewPrivs: docker runtime API version %q must be greater than or equal to 1.23", rversion.String()), </ins> } }
Change:
While this issue happens without this complicated reproduction, here is a sure-fire way to get it. a long-running kubectl get. In this example, I have a cluster with about 2,000 configmaps each around 100KiB. Once you see these lines Press , then type , and then you'll see... What's happening is that the apiserver is hitting , and then it . As the code says, this should make it obvious to the client (kubectl) that it didn't get the entire body, because no 0-length EOF chunk gets sent. I can confirm from using tcpdump that no such chunk gets sent. However, kubectl doesn't notice this, and instead tries to decode a 0-length Response body, giving the cryptic message. What I expected to happen the very least, a less cryptic error message like "connected closed". , this gets detected by the code and we can internally retry, just as if we got, e.g.,
cc Possibly seen here, too: openshift/origin
/assign mengqiy
Created a PR to detect it. Further improvement may be retrying when detect connection closure
closing this since you filed a PR for it

Discussion:
], deps = [ "//vendor/github.com/golang/glog:go_default_library", <ins> "//vendor/golang.org/x/net/http2:go_default_library", </ins> "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",

"time" "github.com/golang/glog" <ins> "golang.org/x/net/http2" </ins> "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime"

func (r *Request) transformResponse(resp *http.Response, req *http.Request) Result { var body []byte if resp.Body != nil { <del> if data, err := ioutil.ReadAll(resp.Body); err == nil { </del> <ins> data, err := ioutil.ReadAll(resp.Body) switch err.(type) { case nil: </ins> body = data <ins> case http2.StreamError: // This is trying to catch the scenario that the server may close the connection when sending the // response body. This can be caused by server timeout due to a slow network connection. // TODO: Add test for this. Steps may be: // 1. client-go (or kubectl) sends a GET request. // 2. Apiserver sends back the headers and then part of the body // 3. Apiserver closes connection. // 4. client-go should catch this and return an error. glog.V(2).Infof("Stream error %#v when reading response body, may be caused by closed connection.", err) streamErr := fmt.Errorf("Stream error %#v when reading response body, may be caused by closed connection. Please retry.", err) return Result{ err: streamErr, } default: glog.Errorf("Unexpected error when reading response body: %#v", err) unexpectedErr := fmt.Errorf("Unexpected error %#v when reading response body. Please retry.", err) return Result{ err: unexpectedErr, } </ins> } }