jiebi/CodeConvo huggingface dataset:
Change:
Is this a BUG REPORT or FEATURE REQUEST? : BUG: With CRI enabled by default, kubelet reports the version of CRI instead of container runtime version: Kubernetes version (use ): Master and 1.6. What you expected to happen: Kubelet should report the version of container runtime. Will file a PR to fix this. cc

Discussion:
return nil, err } <del> return newRuntimeVersion(typedVersion.Version) </del> <ins> return newRuntimeVersion(typedVersion.RuntimeVersion) </ins> } // APIVersion returns the cached API version information of the container
Change:
an API server with , populate with data, stop server etcd2 to etcd3 the API server with data is missing from the API. The etcd2 client takes the configured prefix and passes it to the etcd client as . The etcd3 client simply passes in the configured prefix. is a no-op on the default prefix (`/registry), but can modify custom prefixes that did not start with a slash. cc
I think we have to preserve the behavior from the etcd2 client setup. It's a no-op for the default prefix, but requiring a change to a custom prefix when switching from etcd2 to etcd3 is really unexpected, especially when the failure mode is that the apiserver starts up as if it's a brand new cluster (including creating default projects, kubernetes service, etc)
cc
/cc re: upgrade testing.
Throwing release blocker on here just so we don't lose it (given data loss potential)
- thank for debugging and fixing it.

Discussion:
t.Errorf("Expect an NotFound error, got %v", err) } } <ins> func TestPrefix(t *testing.T) { scheme, codecs := testScheme(t) codec := apitesting.TestCodec(codecs, examplev1.SchemeGroupVersion) server := etcdtesting.NewEtcdTestClientServer(t) defer server.Terminate(t) testcases := map[string]string{ "custom/prefix":     "/custom/prefix", "/custom//prefix//": "/custom/prefix", "/registry":         "/registry", } for configuredPrefix, effectivePrefix := range testcases { helper := newEtcdHelper(server.Client, scheme, codec, configuredPrefix) if helper.pathPrefix != effectivePrefix { t.Errorf("configured prefix of %s, expected effective prefix of %s, got %s", configuredPrefix, effectivePrefix, helper.pathPrefix) } } } </ins>

codec:       codec, versioner:   versioner, transformer: transformer, <del> pathPrefix:  prefix, watcher:     newWatcher(c, codec, versioner, transformer), </del> <ins> // for compatibility with etcd2 impl. // no-op for default prefix of '/registry'. // keeps compatibility with etcd2 impl for custom prefixes that don't start with '/' pathPrefix: path.Join("/", prefix), watcher:    newWatcher(c, codec, versioner, transformer), </ins> } if !quorumRead { // In case of non-quorum reads, we can set WithSerializable()

} return key, setOutput } <ins> func TestPrefix(t *testing.T) { codec := apitesting.TestCodec(codecs, examplev1.SchemeGroupVersion) cluster := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1}) transformer := prefixTransformer{prefix: []byte("test!")} testcases := map[string]string{ "custom/prefix":     "/custom/prefix", "/custom//prefix//": "/custom/prefix", "/registry":         "/registry", } for configuredPrefix, effectivePrefix := range testcases { store := newStore(cluster.RandClient(), false, codec, configuredPrefix, transformer) if store.pathPrefix != effectivePrefix { t.Errorf("configured prefix of %s, expected effective prefix of %s, got %s", configuredPrefix, effectivePrefix, store.pathPrefix) } } } </ins>
Change:
This mirrors what we do for dockertools. /cc
Is there a maintained list of docker versions supported ?
Is this the proper place to check
That was the proper place to check, but those code are being deprecated. The new one doesn't have a check yet, and that's what this issue is for.
Let me add the check.
/assign

Discussion:
dockerRuntimeName = "docker" kubeAPIVersion    = "0.1.0" <ins> // https://docs.docker.com/engine/reference/api/docker_remote_api/ // docker version should be at least 1.10.x minimumDockerAPIVersion = "1.22.0" </ins> // String used to detect docker host mode for various namespaces (e.g. // networking). Must match the value returned by docker inspect -f // '{{.HostConfig.NetworkMode}}'.

containerManager:  cm.NewContainerManager(cgroupsName, client), checkpointHandler: checkpointHandler, } <ins> // check docker version compatibility. if err = ds.checkVersionCompatibility(); err != nil { return nil, err } // create streaming server if configured. </ins> if streamingConfig != nil { var err error ds.streamingServer, err = streaming.NewServer(*streamingConfig, ds.streamingRuntime)

return cgroupParent, nil } <ins> // checkVersionCompatibility verifies whether docker is in a compatible version. func (ds *dockerService) checkVersionCompatibility() error { apiVersion, err := ds.getDockerAPIVersion() if err != nil { return err } minAPIVersion, err := semver.Parse(minimumDockerAPIVersion) if err != nil { return err } // Verify the docker version. result := apiVersion.Compare(minAPIVersion) if result < 0 { return fmt.Errorf("docker API version is older than %s", minimumDockerAPIVersion) } return nil } </ins> // getDockerAPIVersion gets the semver-compatible docker api version. func (ds *dockerService) getDockerAPIVersion() (*semver.Version, error) { var dv *dockertypes.Version
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: The help for needs to be updated to reflect the latest change. What you expected to happen: How to reproduce it (as minimally and precisely as possible): Anything else we need to know:
cc I will work on this together with

Discussion:
* A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect. * The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters. * The value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[2]d characters. <del> * The effect must be NoSchedule or PreferNoSchedule. </del> <ins> * The effect must be NoSchedule, PreferNoSchedule or NoExecute. </ins> * Currently taint can only apply to node.`) taint_example = templates.Examples(`
Change:
Looking at our latest e2e CI , they appear to be due to the fact that the "federations value" for kube-dns install a domain with a trailing dot. The trailing period does not appear when I bring up the cluster manually with I suspect that somewhere we are reconstructing a FEDERATIONSDOMAINMAP when it is unset and a trailing period gets there.
is this blocking for 1.6?
Fixed by

Discussion:
// TODO: the name/domain name pair should ideally be checked for naming convention // as done in kube-dns federation flags check. // https://github.com/kubernetes/dns/blob/master/pkg/dns/federation/federation.go <del> util.FedDomainMapKey: fmt.Sprintf("%s=%s", name, dnsZoneName), </del> <ins> // TODO v2: Until kube-dns can handle trailing periods we strip them all. //          See https://github.com/kubernetes/dns/issues/67 util.FedDomainMapKey: fmt.Sprintf("%s=%s", name, strings.TrimRight(dnsZoneName, ".")), </ins> }, }, Spec: extensions.DeploymentSpec{

Namespace: namespaceName, Labels:    componentLabel, Annotations: map[string]string{ <del> util.FedDomainMapKey: fmt.Sprintf("%s=%s", federationName, dnsZoneName), </del> <ins> util.FedDomainMapKey: fmt.Sprintf("%s=%s", federationName, strings.TrimRight(dnsZoneName, ".")), </ins> }, }, Spec: v1beta1.DeploymentSpec{
Change:
https://k8s- Failed: [] Downward API should provide default from node allocatable [Conformance] {E2eNode Suite}
this looks like the same issue fixed
For reference, this showed the following panic: which is fixed in referenced pr.

Discussion:
// WalkFunc which is called for each file and directory in the pod cgroup dir visitor := func(path string, info os.FileInfo, err error) error { <ins> if err != nil { glog.V(4).Infof("cgroup manager encountered error scanning cgroup path %q: %v", path, err) return filepath.SkipDir } </ins> if !info.IsDir() { return nil } pids, err = getCgroupProcs(path) if err != nil { <del> glog.V(5).Infof("cgroup manager encountered error getting procs for cgroup path %v", path) </del> <ins> glog.V(4).Infof("cgroup manager encountered error getting procs for cgroup path %q: %v", path, err) </ins> return filepath.SkipDir } pidsToKill.Insert(pids...)

// container cgroups haven't been GCed yet. Get attached processes to // all such unwanted containers under the pod cgroup if err = filepath.Walk(dir, visitor); err != nil { <del> glog.V(5).Infof("cgroup manager encountered error scanning pids for directory: %v", dir) </del> <ins> glog.V(4).Infof("cgroup manager encountered error scanning pids for directory: %q: %v", dir, err) </ins> } } return pidsToKill.List()
Change:
We should keep track of how stale stats used for evictions are. This will help track improvements in eviction latency, and help uncover regressions. cc If someone could assign this to me, I would appreciate that.
closing via

Discussion:
"//pkg/kubelet/cm:go_default_library", "//pkg/kubelet/eviction/api:go_default_library", "//pkg/kubelet/lifecycle:go_default_library", <ins> "//pkg/kubelet/metrics:go_default_library", </ins> "//pkg/kubelet/pod:go_default_library", "//pkg/kubelet/qos:go_default_library", "//pkg/kubelet/server/stats:go_default_library",

"k8s.io/kubernetes/pkg/kubelet/cm" evictionapi "k8s.io/kubernetes/pkg/kubelet/eviction/api" "k8s.io/kubernetes/pkg/kubelet/lifecycle" <ins> "k8s.io/kubernetes/pkg/kubelet/metrics" </ins> kubepod "k8s.io/kubernetes/pkg/kubelet/pod" "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/pkg/kubelet/server/stats"

glog.Infof("eviction manager: pods ranked for eviction: %s", format.Pods(activePods)) <ins> //record age of metrics for met thresholds that we are using for evictions. for _, t := range thresholds { timeObserved := observations[t.Signal].time if !timeObserved.IsZero() { metrics.EvictionStatsAge.WithLabelValues(string(t.Signal)).Observe(metrics.SinceInMicroseconds(timeObserved.Time)) } } </ins> // we kill at most a single pod during each eviction interval for i := range activePods { pod := activePods[i]

PodWorkerStartLatencyKey      = "pod_worker_start_latency_microseconds" PLEGRelistLatencyKey          = "pleg_relist_latency_microseconds" PLEGRelistIntervalKey         = "pleg_relist_interval_microseconds" <ins> EvictionStatsAgeKey           = "eviction_stats_age_microseconds" </ins> // Metrics keys of remote runtime operations RuntimeOperationsKey        = "runtime_operations" RuntimeOperationsLatencyKey = "runtime_operations_latency_microseconds"

}, []string{"operation_type"}, ) <ins> EvictionStatsAge = prometheus.NewSummaryVec( prometheus.SummaryOpts{ Subsystem: KubeletSubsystem, Name:      EvictionStatsAgeKey, Help:      "Time between when stats are collected, and when pod is evicted based on those stats by eviction signal", }, []string{"eviction_signal"}, ) </ins> ) var registerMetrics sync.Once

prometheus.MustRegister(RuntimeOperations) prometheus.MustRegister(RuntimeOperationsLatency) prometheus.MustRegister(RuntimeOperationsErrors) <ins> prometheus.MustRegister(EvictionStatsAge) </ins> }) }
Change:
BUG REPORT: Kubernetes version latest master: Environment: Ubuntu 16.04 LTS, Linux 4.2.0-42-generic: What happened: The doesn't provide mutual exclusion. Two processes can both grab the same flock at the same time. What you expected to happen: Only one process should be able to grab the flock. How to reproduce it (as minimally and precisely as possible): Anything else we need to know: Although the flock doesn't work, the does work. Since we usually specify together with , so the 1st process will exit anyway. However we still need to fix the flock..
cc
Sent a PR to fix this ()

Discussion:
name = "go_default_library", srcs = ["flock_unix.go"], tags = ["automanaged"], <del> deps = ["//vendor:golang.org/x/sys/unix"], </del> ) filegroup(

package flock <del> import ( "os" "sync" "golang.org/x/sys/unix" ) var ( // lock guards lockfile. Assignment is not atomic. lock sync.Mutex // os.File has a runtime.Finalizer so the fd will be closed if the struct // is garbage collected. Let's hold onto a reference so that doesn't happen. lockfile *os.File ) </del> <ins> import "syscall" </ins> // Acquire acquires a lock on a file for the duration of the process. This method // is reentrant. func Acquire(path string) error { <del> lock.Lock() defer lock.Unlock() var err error if lockfile, err = os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0600); err != nil { return err } defer lockfile.Close() opts := unix.Flock_t{Type: unix.F_WRLCK} if err := unix.FcntlFlock(lockfile.Fd(), unix.F_SETLKW, &opts); err != nil { </del> <ins> fd, err := syscall.Open(path, syscall.O_CREAT|syscall.O_RDWR, 0600) if err != nil { </ins> return err } <del> return nil </del> <ins> // We don't need to close the fd since we should hold // it until the process exits. return syscall.Flock(fd, syscall.LOCK_EX) </ins> }
Change:
https://k8s- Failed: TestBlockingOwnerRefDoesBlock {garbagecollector}
cc:
https://k8s- Failed: TestBlockingOwnerRefDoesBlock {garbagecollector}
I don't have a good theory yet. It's occurring , so I'll fix the more urgent issues first.
If its that low, its not a blocker. Moving to 1.6.1
Could this be a race condition? Perhaps needs some retry logic? Note that the creation never reported an error that would be fatal to the test:
I checked the log, it appeared when GC was processing the foreground deletion of the owner RC, GC didn't find any dependents of RC. This probably is the same race we expected in no.1. To fix the test, the test can wait some seconds before sending the deletion request, so that the garbage collector will have time to update its dependency graph.

Discussion:
glog.Infof("Garbage Collector: Shutting down") } <ins> func (gc *GarbageCollector) HasSynced() bool { return gc.dependencyGraphBuilder.HasSynced() } </ins> func (gc *GarbageCollector) runAttemptToDeleteWorker() { for gc.attemptToDeleteWorker() { }

"k8s.io/client-go/discovery" "k8s.io/client-go/dynamic" restclient "k8s.io/client-go/rest" <ins> "k8s.io/client-go/tools/cache" </ins> "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset"

s, gc, clientSet := setup(t) defer s.Close() <del> ns := framework.CreateTestingNamespace("gc-foreground2", s, t) </del> <ins> ns := framework.CreateTestingNamespace("gc-foreground3", s, t) </ins> defer framework.DeleteTestingNamespace(ns, s, t) podClient := clientSet.Core().Pods(ns.Name)

go gc.Run(5, stopCh) defer close(stopCh) <ins> // this makes sure the garbage collector will have added the pod to its // dependency graph before handling the foreground deletion of the rc. timeout := make(chan struct{}) go func() { select { case <-time.After(5 * time.Second): close(timeout) } }() if !cache.WaitForCacheSync(timeout, gc.HasSynced) { t.Fatalf("failed to wait for garbage collector to be synced") } </ins> err = rcClient.Delete(toBeDeletedRCName, getForegroundOptions()) if err != nil { t.Fatalf("Failed to delete the rc: %v", err)
Change:
Vsphere volumes aren't relabelled in SELinux environment because they set in volume attributes. This flag is important for SELinux support to work - CC The fix is obviously simple and I am happy to make it but I would like to know if there was any reason vsphere volumes don't follow example of other volume types that support SELinux? cc
Made a small PR that fixes it -

Discussion:
func (b *vsphereVolumeMounter) GetAttributes() volume.Attributes { return volume.Attributes{ SupportsSELinux: true, <ins> Managed:         true, </ins> } }
Change:
The Stop() method in the Federated Informer races with deleteCluster() in how they both try to close (stopChan). Thanks for the heads up
Fixed by Thanks Maru.

Discussion:
assert.True(t, reflect.DeepEqual(updatedIngress2.Spec, fedIngress.Spec), "Spec of updated ingress is not equal") assert.Equal(t, updatedIngress2.ObjectMeta.Annotations["A"], fedIngress.ObjectMeta.Annotations["A"], "Updated annotation not transferred from federated to cluster ingress.") <del> // Test add cluster t.Log("Adding a second cluster") </del> fedIngress.Annotations[staticIPNameKeyWritable] = "foo" // Make sure that the base object has a static IP name first. fedIngressWatch.Modify(&fedIngress) <del> clusterWatch.Add(cluster2) t.Log("Checking that the ingress got created in cluster 2") </del> <ins> t.Log("Checking that the ingress got created in cluster 2 after a global ip was assigned") </ins> createdIngress2 := GetIngressFromChan(t, cluster2IngressCreateChan) assert.NotNil(t, createdIngress2) assert.True(t, reflect.DeepEqual(fedIngress.Spec, createdIngress2.Spec), "Spec of created ingress is not equal")

for key, informer := range f.targetInformers { glog.V(4).Infof("... Closing informer channel for %q.", key) close(informer.stopChan) <ins> // Remove each informer after it has been stopped to prevent // subsequent cluster deletion from attempting to double close // an informer's stop channel. delete(f.targetInformers, key) </ins> } }
Change:
The reboot test may cause corrupted checkpoint left on the node. https://k8s- This prevents the sandbox from being stopped properly, so kubelet cannot create a new one. One option is to log and remove the corrupted checkpoint, while cleaning up the pod sandbox resources with best effort (i.e., may leak resources). Another option is to not clean up, and force a human being to intervene and remove the corrupt checkpoint manually. The proper solution perhaps is to scan the checkpoints at startup (or periodically) and repair/remove corrupt checkpoints. /cc related:
/cc
should this block ?
If we can scan the checkpoints at startup time, then repair the corrupted checkpoint, which means, we can recover the state from the runtime, why we introduce the checkpoint at the first place? :-) I am ok with your idea upon the corrupted checkpoints, removing the bad ones as the workaround. Anyway, Kubelet will fire an event of failedSync with the proper message, some manual intervene (the remedy system) can be fired based on the event to resolve the leak resource issue.
I think this shouldn't be the blocker for v1.6, but has an acceptable workaround to address this, and I would like to include that if no one disagreed with that approach.
Adding to milestone to track
Moving this back to 1.6. The checkpoint implementation use , which does not sync at all. No wonder the checkpoints would be corrupted in the reboot tests. I reproduced this issue with a simple go program + reboots on a VM. The problem went away once I forced a I will upload a PR to fix this. /cc

Discussion:
import ( "fmt" <ins> "io" </ins> "io/ioutil" "os" "path/filepath"

return &FileStore{path: path}, nil } <ins> // writeFileAndSync is copied from ioutil.WriteFile, with the extra File.Sync // at the end to ensure file is written on the disk. func writeFileAndSync(filename string, data []byte, perm os.FileMode) error { f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm) if err != nil { return err } n, err := f.Write(data) if err == nil && n < len(data) { err = io.ErrShortWrite } f.Sync() if err1 := f.Close(); err == nil { err = err1 } return err } </ins> func (fstore *FileStore) Write(key string, data []byte) error { if err := validateKey(key); err != nil { return err

return err } tmpfile := filepath.Join(fstore.path, fmt.Sprintf("%s%s%s", tmpPrefix, key, tmpSuffix)) <del> if err := ioutil.WriteFile(tmpfile, data, 0644); err != nil { </del> <ins> if err := writeFileAndSync(tmpfile, data, 0644); err != nil { </ins> return err } return os.Rename(tmpfile, fstore.getCheckpointPath(key))
Change:
Once e2e tests are running, the tests keep running even if I press and exit the process that controls the TTY. But the tests actually keep running in the background and they keep printing stuff on a shell prompt which has already returned and thereby clobbering the STDOUT
/assign
GitHub didn't allow me to assign the following users: oomichi. 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

Discussion:
"log" "os" "os/exec" <ins> "os/signal" </ins> "path/filepath" "strings" "time"

} func wait(cmd string, args ...string) error { <ins> sigChannel := make(chan os.Signal, 1) signal.Notify(sigChannel, os.Interrupt) </ins> c := exec.Command(cmd, args...) c.Stdout = os.Stdout c.Stderr = os.Stderr if err := c.Start(); err != nil { return err } <ins> go func() { sig := <-sigChannel if err := c.Process.Signal(sig); err != nil { log.Fatalf("could not send %s signal %s: %v", cmd, sig, err) } }() </ins> return c.Wait() }
Change:
https://k8s- Failed: [] Dynamic provisioning [] DynamicProvisioner Default should be disabled by removing the default annotation[Slow] [Serial] [Disruptive] [Volume] {Kubernetes e2e suite} Failed: [] Dynamic provisioning [] DynamicProvisioner Default should be disabled by changing the default annotation[Slow] [Serial] [Disruptive] [Volume] {Kubernetes e2e suite}
These test have failed in the last few serial jobs () and may represent a regression. The tests were in by Assigning her to take a look. /assign cc:
CC
The e2e test is using IsDefaultStorageClassAnnotation, which used to equal the beta annotation, but then got changed to use the non-beta annotation. However, the default storage classes that are installed are using the beta annotation. So when the test tries to disable the default storage class by modifying or deleting the annotation, it is trying to use the non-beta annotation which does not exist, so it has no affect, since the the beta annotation is unchanged. So for now, the simple fix should be to make the test modify the beta annotation. I am working on it now and should have a PR out soon. Longer term, the test should be able to detect which annotation is being used and modify the appropriate one.
Looks like this is failing again with a different error: https://k8s-
This should be fixed by
Good to know, I'll leave open until we confirm in e2e
this test went green in the last two e2e's

Discussion:
Expect(err).NotTo(HaveOccurred()) if defaultStr == "" { <del> delete(sc.Annotations, storageutil.IsDefaultStorageClassAnnotation) </del> <ins> delete(sc.Annotations, storageutil.BetaIsDefaultStorageClassAnnotation) </ins> } else { if sc.Annotations == nil { sc.Annotations = make(map[string]string) } <del> sc.Annotations[storageutil.IsDefaultStorageClassAnnotation] = defaultStr </del> <ins> sc.Annotations[storageutil.BetaIsDefaultStorageClassAnnotation] = defaultStr </ins> } sc, err = c.StorageV1().StorageClasses().Update(sc)