jiebi/CodeConvo huggingface dataset:
Change:
There is a defer calling in this method: defer close(resultCh) It may crash the goroutine created at line 777, which then will make the whole kubelet crash. A simple fix Another simple fix
cc do you think this make sense?
You could just drop the channel and go with a mutex to update the set.
indeed.

Discussion:
"runtime" "sort" "strings" <ins> "sync" </ins> "time" "github.com/golang/glog"

// another goroutine isn't already in action. func (kl *Kubelet) podKiller() { killing := sets.NewString() <del> resultCh := make(chan types.UID) defer close(resultCh) </del> <ins> // guard for the killing set lock := sync.Mutex{} </ins> for { select { case podPair, ok := <-kl.podKillingCh:

runningPod := podPair.RunningPod apiPod := podPair.APIPod <del> if killing.Has(string(runningPod.ID)) { // The pod is already being killed. break </del> <ins> lock.Lock() exists := killing.Has(string(runningPod.ID)) if !exists { killing.Insert(string(runningPod.ID)) </ins> } <del> killing.Insert(string(runningPod.ID)) go func(apiPod *v1.Pod, runningPod *kubecontainer.Pod, ch chan types.UID) { defer func() { ch <- runningPod.ID }() glog.V(2).Infof("Killing unwanted pod %q", runningPod.Name) err := kl.killPod(apiPod, runningPod, nil, nil) if err != nil { glog.Errorf("Failed killing the pod %q: %v", runningPod.Name, err) } }(apiPod, runningPod, resultCh) </del> <ins> lock.Unlock() </ins> <del> case podID := <-resultCh: killing.Delete(string(podID)) </del> <ins> if !exists { go func(apiPod *v1.Pod, runningPod *kubecontainer.Pod) { glog.V(2).Infof("Killing unwanted pod %q", runningPod.Name) err := kl.killPod(apiPod, runningPod, nil, nil) if err != nil { glog.Errorf("Failed killing the pod %q: %v", runningPod.Name, err) } lock.Lock() killing.Delete(string(runningPod.ID)) lock.Unlock() }(apiPod, runningPod) } </ins> } } }
Change:
<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.--Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see ): What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): Is this a BUG REPORT or FEATURE REQUEST? (choose one): <!-- If this is a BUG REPORT, please: Fill in as much of the template below as you can. If you leave out information, we can't help you as well. If this is a FEATURE REQUEST, please: Describe in detail the feature/behavior/change you'd like to see. In both cases, be ready for followup questions, and please respond in a timely manner. If we can't reproduce a bug or think a feature already exists, we might close your issue. If we're wrong, PLEASE feel free to reopen it and explain why. --Kubernetes version (use ): Environment: Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others: What happened: I was following to install a cluster but failed due to the following. What you expected to happen: How to reproduce it (as minimally and precisely as possible): Anything else do we need to know:
The current workaround solution is remove in ./kube-
please have a look
thanks for the quick response
Just FYI, I think that you should fix both kube-up and kube-down
i have already move: source "${KUBE_ROOT}" to the head of ,is there something can't work?
Thanks, I did not have a try but just a reminder, just check code, yes, I think it works. Thanks
Seems the kube-up still does not work, filed another issue here
can you help take a look? Thanks!
/sig cluster-lifecycle
hi, I still see the issue but wondering since you have closed considering planned deprecation of the script. Does this issue still requires a fix or any decision was made not to work on it? Thanks!
Thanks , I think that we can close this now as it is not supported any more.
sure and thank you for the quick response and closing it !!

Discussion:
set -e SSH_OPTS="-oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oLogLevel=ERROR -C" <ins> source "${KUBE_ROOT}/cluster/common.sh" </ins> MASTER="" MASTER_IP=""

export CONTEXT="ubuntu" export KUBE_SERVER="http://${KUBE_MASTER_IP}:8080" <del> source "${KUBE_ROOT}/cluster/common.sh" </del> # set kubernetes user and password load-or-gen-kube-basicauth

export KUBE_CONFIG_FILE=${KUBE_CONFIG_FILE:-${KUBE_ROOT}/cluster/ubuntu/config-default.sh} source "${KUBE_CONFIG_FILE}" <del> source "${KUBE_ROOT}/cluster/common.sh" </del> tear_down_alive_resources check-pods-torn-down
Change:
Is this a BUG REPORT or FEATURE REQUEST? (choose one): Bug Repport Kubernetes version (use ): 1.5.1 (Both Server and Client) Environment: Cloud provider or hardware configuration: AWS OS (e.g. from /etc/os-release): UBUNTU 16.04 Kernel (e.g. ): 4.4.0-47-generic Install tools: Chef What happened: Kubelet picks up dot files in --pod-manifest-path causing stuff to breaks by replacing existing pods. What you expected to happen: Exclude dot files from being picked up under --pod-manifest-path How to reproduce it (as minimally and precisely as possible): Take any manifest, copy it as and kubelet will deploy that new manifest Anything else do we need to know: From the slack channel it's been identified to be introduce by (by on Slack)
Just sent a simple fix, while still open for discussion.

Discussion:
fs.StringSliceVar(&s.APIServerList, "api-servers", []string{}, "List of Kubernetes API servers for publishing events, and reading pods and services. (ip:port), comma separated.") fs.MarkDeprecated("api-servers", "Use --kubeconfig instead. Will be removed in a future version.") <del> fs.StringVar(&s.PodManifestPath, "pod-manifest-path", s.PodManifestPath, "Path to to the directory containing pod manifest files to run, or the path to a single pod manifest file.") </del> <ins> fs.StringVar(&s.PodManifestPath, "pod-manifest-path", s.PodManifestPath, "Path to to the directory containing pod manifest files to run, or the path to a single pod manifest file. Files starting with dots will be ignored.") </ins> fs.DurationVar(&s.SyncFrequency.Duration, "sync-frequency", s.SyncFrequency.Duration, "Max period between synchronizing running containers and config") fs.DurationVar(&s.FileCheckFrequency.Duration, "file-check-frequency", s.FileCheckFrequency.Duration, "Duration between checking config files for new data") fs.DurationVar(&s.HTTPCheckFrequency.Duration, "http-check-frequency", s.HTTPCheckFrequency.Duration, "Duration between checking http for new data")

import ( "fmt" "os" <ins> "strings" </ins> "github.com/golang/glog" "golang.org/x/exp/inotify"

} func (s *sourceFile) processEvent(e *inotify.Event) error { <ins> // Ignore file start with dots if strings.HasPrefix(e.Name, ".") { glog.V(4).Infof("Ignored pod manifest: %s, because it starts with dots", e.Name) return nil } </ins> var eventType podEventType switch { case (e.Mask & inotify.IN_ISDIR) > 0:
Change:
Three tests now create RoleBindings to give permissions to test service accounts: NodeProblemDetector Ingress PreStop Creating RBAC Rolebindings currently requires the user issuing the create call to have the required permissions. If RBAC is not enabled, and the cluster hasn't been configured with any RBAC bootstrapping, that won't be possible. We should make this test code conditional on whether RBAC is in use.
c.f.
Quick fix is to tolerate forbidden errors there and assume e2e setups using methods other than RBAC have already granted permissions to the service accounts
I'll put together a PR to tolerate the 403 in the test helper.
I think this can be closed now that the e2e RBAC setup is best effort and failures there don't affect the test if another authorizer is in use
I agree. My original thought was that we'd make the RBAC test stuff only happen on RBAC-enabled setups. But, since we're going to be pushing setups towards using RBAC, we might as well have those pieces stick around in the common code (as best-effort).

Discussion:
"path/filepath" "time" <ins> apierrors "k8s.io/kubernetes/pkg/api/errors" </ins> legacyv1 "k8s.io/kubernetes/pkg/api/v1" rbacv1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" "k8s.io/kubernetes/pkg/runtime/schema"

}, }, }) <ins> if apierrors.IsForbidden(err) { // The user is not allowed to create ClusterRoleBindings. This // probably means that RBAC is not being used. If RBAC is being // used, this test will probably fail later. framework.Logf("Attempt to create ClusterRoleBinding was forbidden: %v.", err) return } </ins> framework.ExpectNoError(err) err = framework.WaitForAuthorizationUpdate(jig.client.Authorization(),

"time" "k8s.io/kubernetes/pkg/api" <ins> apierrors "k8s.io/kubernetes/pkg/api/errors" </ins> "k8s.io/kubernetes/pkg/api/v1" legacyv1 "k8s.io/kubernetes/pkg/api/v1" metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"

"fmt" "time" <ins> apierrors "k8s.io/kubernetes/pkg/api/errors" </ins> "k8s.io/kubernetes/pkg/api/v1" legacyv1 "k8s.io/kubernetes/pkg/api/v1" metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"

}, }, }) <ins> if apierrors.IsForbidden(err) { // The user is not allowed to create ClusterRoleBindings. This // probably means that RBAC is not being used. If RBAC is being // used, this test will probably fail later. framework.Logf("Attempt to create ClusterRoleBinding was forbidden: %v.", err) return } </ins> framework.ExpectNoError(err) err = framework.WaitForAuthorizationUpdate(f.ClientSet.Authorization(),
Change:
https://k8s- Failed: TestMultithreadedThrottling {flowcontrol}
Got 4 failures recently.

Discussion:
// record wall time endTime := time.Now() <del> if duration := endTime.Sub(startTime); duration < time.Second { </del> <ins> // tolerate a 1% clock change because these things happen if duration := endTime.Sub(startTime); duration < (time.Second * 99 / 100) { </ins> // We shouldn't be able to get 100 tokens out of the bucket in less than 1 second of wall clock time, no matter what t.Errorf("Expected it to take at least 1 second to get 100 tokens, took %v", duration) } else {
Change:
Is this a BUG REPORT or FEATURE REQUEST? (choose one):BUG REPORT Kubernetes version (use ):Client Version: version.Info{Major:"1", Minor:"6+", GitVersion:"v1.6.0-alpha.0.2610+-dirty", GitCommit:"", GitTreeState:"dirty", BuildDate:"2016-12-29T06:28:44Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"6+", GitVersion:"v1.6.0-alpha.0.2610+-dirty", GitCommit:"", GitTreeState:"dirty", BuildDate:"2016-12-29T06:28:44Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"linux/amd64"} What happened:
Could someone from please help with triage. Thanks!
There is already a PR on the way.

Discussion:
"//pkg/runtime:go_default_library", "//pkg/util/errors:go_default_library", "//pkg/util/strategicpatch:go_default_library", <ins> "//pkg/util/validation:go_default_library", </ins> "//vendor:github.com/spf13/cobra", ], )

cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource" "k8s.io/kubernetes/pkg/runtime" <ins> "k8s.io/kubernetes/pkg/util/validation" </ins> ) // SelectorOptions is the start of the data required to perform the operation.  As new fields are added, add them here instead of

cmd := &cobra.Command{ Use:     "selector (-f FILENAME | TYPE NAME) EXPRESSIONS [--resource-version=version]", Short:   "Set the selector on a resource", <del> Long:    fmt.Sprintf(selectorLong), </del> <ins> Long:    fmt.Sprintf(selectorLong, validation.LabelValueMaxLength), </ins> Example: selectorExample, Run: func(cmd *cobra.Command, args []string) { cmdutil.CheckErr(options.Complete(f, cmd, args, out))

if len(o.resources) < 1 && cmdutil.IsFilenameEmpty(o.fileOptions.Filenames) { return fmt.Errorf("one or more resources must be specified as <resource> <name> or <resource>/<name>") } <ins> if o.selector == nil { return fmt.Errorf("one selector is required") } </ins> return nil }

// getResourcesAndSelector retrieves resources and the selector expression from the given args (assuming selectors the last arg) func getResourcesAndSelector(args []string) (resources []string, selector *metav1.LabelSelector, err error) { <del> if len(args) > 1 { resources = args[:len(args)-1] </del> <ins> if len(args) == 0 { return []string{}, nil, nil </ins> } <ins> resources = args[:len(args)-1] </ins> selector, err = metav1.ParseToLabelSelector(args[len(args)-1]) return resources, selector, err }

MatchExpressions: []metav1.LabelSelectorRequirement{}, }, }, <ins> { name:          "no resource and selector", args:          args{args: []string{}}, wantResources: []string{}, wantErr:       false, wantSelector:  nil, }, </ins> } for _, tt := range tests { gotResources, gotSelector, err := getResourcesAndSelector(tt.args.args)
Change:
Federation system started via kubefed is broken on master Kubernetes version (use ): Environment: Cloud provider or hardware configuration: GCE OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: kube- Others: What happened: As part of - change the api-server options were moved out from genericapiserver package. One of the options moved was - but when using to start a federation plane it still starts with following option: Which obviously results in pod never coming up because that option no longer exists there. I am working on fixing it. cc
Fixed in . Also in

Discussion:
"federation-apiserver", "--bind-address=0.0.0.0", "--etcd-servers=http://localhost:2379", <del> "--service-cluster-ip-range=10.0.0.0/16", </del> "--secure-port=443", "--client-ca-file=/etc/federation/apiserver/ca.crt", "--tls-cert-file=/etc/federation/apiserver/server.crt",
Change:
<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.--Is this a request for help? No What keywords did you search in Kubernetes issues before filing this one? panic, findAndRemoveDeletedPods Is this a BUG REPORT or FEATURE REQUEST? BUG REPORT Kubernetes version (use ): 1.5.1 Environment: Cloud provider or hardware configuration: GKE OS (e.g. from /etc/os-release): gci 56 (8938.0.0) Kernel (e.g. ): Install tools: Others: What happened: I created a pod and it went into the failed state. I couldn't find any info about the failure, so I logged into the GKE node and ran "journalctl -u kubelet" and saw: When I tail the log, the error messages continue indefinitely with multiple messages printed every second. Digging into I see: So I'm wondering if perhaps there is a bug where is in some cases. What you expected to happen: I did not expect to see the kublet log full of "invalid memory address or nil pointer dereference" errors. How to reproduce it (as minimally and precisely as possible): Sorry, I don't have a good way to reproduce this error. Anything else do we need to know: I'm running several pods, each with a GCE persistent disk mounted. When the pods finish, I run a different set of pods that mount the same persistent disks. I've seen various issues in past K8S versions where persistent disks don't get detached and reattached properly across K8S nodes, but so far with 1.5.1 it seems to have been working well up until now.
CC
guess it doesn't matter how it happens; it does. creating a fix.
If the pod is still around(even if failed state), can you paste output of . Just wondering how did the pod get in that state.
More information about the failed pod ():
looking at seems that there is a field for temporal volumes (configmaps, secrets, etc) and a field for persistent volumes and only one is set at a time.
Thanks for the quick PR!

Discussion:
} // Skip non-memory backed volumes belonging to terminated pods volume := volumeToMount.VolumeSpec.Volume <ins> if volume == nil { continue } </ins> if (volume.EmptyDir == nil || volume.EmptyDir.Medium != v1.StorageMediumMemory) && volume.ConfigMap == nil && volume.Secret == nil { continue
Change:
Is this a BUG REPORT or FEATURE REQUEST? (choose one):BUG REPORT Kubernetes version (use ):Client Version: version.Info{Major:"1", Minor:"6+", GitVersion:"v1.6.0-alpha.0.2850+-dirty", GitCommit:"", GitTreeState:"dirty", BuildDate:"2017-01-06T09:06:04Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"6+", GitVersion:"v1.6.0-alpha.0.2753+-dirty", GitCommit:"", GitTreeState:"dirty", BuildDate:"2017-01-04T08:46:56Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"} What happened: How to reproduce it (as minimally and precisely as possible): the owner of file is not right
Do you need to be building as root?
I get an annoying message when building as normal user: So I run as root. There will return a error if the outpt build directory is not owned by root when running as root. I think we could use to fix it.
I hope to get some of your suggestions
did you previously build as ? you might need to before a build as a normal user works again.

Discussion:
set -o nounset set -o pipefail <ins> USER_ID=$(id -u) GROUP_ID=$(id -g) </ins> DOCKER_OPTS=${DOCKER_OPTS:-""} DOCKER=(docker ${DOCKER_OPTS}) DOCKER_HOST=${DOCKER_HOST:-""}

# Set up the context directory for the kube-build image and build it. function kube::build::build_image() { mkdir -p "${LOCAL_OUTPUT_BUILD_CONTEXT}" <ins> # Make sure the context directory owned by the right user for syncing sources to container. chown -R ${USER_ID}.${GROUP_ID} "${LOCAL_OUTPUT_BUILD_CONTEXT}" </ins> cp /etc/localtime "${LOCAL_OUTPUT_BUILD_CONTEXT}/"

--name "${KUBE_DATA_CONTAINER_NAME}" --hostname "${HOSTNAME}" "${KUBE_BUILD_IMAGE}" <del> chown -R $(id -u).$(id -g) </del> <ins> chown -R ${USER_ID}.${GROUP_ID} </ins> "${REMOTE_ROOT}" /usr/local/go/pkg/ )
Change:
<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.--Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see ): No. What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT <!-- If this is a BUG REPORT, please: Fill in as much of the template below as you can. If you leave out information, we can't help you as well. If this is a FEATURE REQUEST, please: Describe in detail* the feature/behavior/change you'd like to see. In both cases, be ready for followup questions, and please respond in a timely manner. If we can't reproduce a bug or think a feature already exists, we might close your issue. If we're wrong, PLEASE feel free to reopen it and explain why. --Kubernetes version (use ): Environment: Cloud provider or hardware configuration: GCE OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others: What happened: The is constantly flooded with the following error once per second: What you expected to happen: Log not flooded with error. How to reproduce it (as minimally and precisely as possible): Start a cluster at the above version. Check the on master. Anything else do we need to know: I didn't create any StatefulSets or PDBs. I only created some RCs.
Attn
cc This looks related to
Looks like an authorization issue. It doesn't seem to happen on a local cluster. From APIServer logs:

Discussion:
rbac.NewRule("get", "list", "watch").Groups(extensionsGroup).Resources("replicasets").RuleOrDie(), rbac.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("replicationcontrollers").RuleOrDie(), rbac.NewRule("get", "list", "watch").Groups(policyGroup).Resources("poddisruptionbudgets").RuleOrDie(), <ins> rbac.NewRule("get", "list", "watch").Groups(appsGroup).Resources("statefulsets").RuleOrDie(), </ins> rbac.NewRule("update").Groups(policyGroup).Resources("poddisruptionbudgets/status").RuleOrDie(), eventsRule(), },

- list - watch - apiGroups: <ins> - apps attributeRestrictions: null resources: - statefulsets verbs: - get - list - watch - apiGroups: </ins> - policy attributeRestrictions: null resources:
Change:
When I run it locally: Small test case to induce failure: I am using git version 2.11.0, if it makes any difference.
Also applies to
This is caused by the most recent git upgrade and affects all of our deps but gazel is the one we pull the most. how do we mitigate this?
We could possibly set in verify/update-gazel, but that feels a bit iffy because it has to be global. Possibly print out the command to fix it in case the go get fails?
Source code for is here . There doesn't seem to be an open issue for this.
I filed
says
Sorry for the trouble. We'll change a bit to ensure the manual configuration is not necessary.
Was this fixed in
No need to change the configuration anymore. We've changed itself to support the new git quirks.
thanks for fixing this!

Discussion:
export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. source "${KUBE_ROOT}/hack/lib/init.sh" <ins> git config http.https://gopkg.in.followRedirects true </ins> go get -u gopkg.in/mikedanese/gazel.v13/gazel "${GOPATH}/bin/gazel" -root="$(kube::realpath ${KUBE_ROOT})"

export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. source "${KUBE_ROOT}/hack/lib/init.sh" <ins> git config http.https://gopkg.in.followRedirects true </ins> go get -u gopkg.in/mikedanese/gazel.v13/gazel if ! "${GOPATH}/bin/gazel" -validate -print-diff -root="$(kube::realpath ${KUBE_ROOT})" ; then echo
Change:
Is this a BUG REPORT or FEATURE REQUEST? (choose one): bug Kubernetes version (use ): master (SHA ) What happened: What you expected to happen: Generate code coverage report on Mac How to reproduce it (as minimally and precisely as possible):
/cc
does it work for you prior to this commit? There may be an escaping issue, currently on mobile and unable to verify that hypothesis.
, just create PR to fix that, PTAL. That should be a typo: some missed for in embedded script.

Discussion:
${KUBE_TIMEOUT}  -cover -covermode="${KUBE_COVERMODE}"  -coverprofile="${cover_report_dir}/${_pkg}/${cover_profile}"  <del> "${_pkg}"  </del> <ins> "${_pkg}"  </ins> ${testargs[@]:+${testargs[@]}} go test ${goflags[@]:+${goflags[@]}}  ${KUBE_RACE}  ${KUBE_TIMEOUT}  -cover -covermode="${KUBE_COVERMODE}"  -coverprofile="${cover_report_dir}/${_pkg}/${cover_profile}"  <del> "${_pkg}"  </del> <ins> "${_pkg}"  </ins> ${testargs[@]:+${testargs[@]}}  | tee ${junit_filename_prefix:+"${junit_filename_prefix}-$_pkg_out.stdout"}  | grep "${go_test_grep_pattern}""
Change:
We'd like to deprecate alpha provisioning in 1.6. In order to make current deployments working after upgrade to 1.6 we need to deploy a default StorageClass as part of installation/upgrade on vSphere so it will automatically provision volumes for PVCs marked with annotation - the annotation will be ignored and default storage class must provision the volume instead. On GCE and AWS, we use addon manager to install the default storage class, see Note that some extra code was needed in AWS and GCE installers to actually put the storage class into addons directory during installation, e.g. Please make sure that: A default StorageClass is deployed during "default" installation. It would be nice if admin could turn this off during installation (e.g. as on GCE) If any additional manual steps are needed to deploy the default storage class make sure they're documented in appropriate installation guide.
cc
thanks will look into this. CC
Documentation update for cloud provider

Discussion:
<ins> apiVersion: storage.k8s.io/v1beta1 kind: StorageClass metadata: name: default annotations: storageclass.beta.kubernetes.io/is-default-class: "true" labels: kubernetes.io/cluster-service: "true" provisioner: kubernetes.io/vsphere-volume parameters: diskformat: thin </ins>