jiebi/CodeConvo huggingface dataset:
Change:
As part of kubernetes/enhancements we encountered a potential bug. Environment: Kubernetes: 1.10 and 1.11 Docker version: from 17.03.1 checked on multiple cloudproviders. When a node restarts, and the kubelet cannot reach the apiserver, dockerd restarts all the containers in the node. the following logs are emitted: dockerd logs shows the following: when inspecting containers created by the kubelet we see that we create containers with the following restart policy: This is a blocker for kubernetes/enhancements as when the node restart the controller-manager cannot assume that it is safe to detach volumes as they might be mounted by the pods. /priority critical-urgent /kind bug /sig node
according to the docker doc, that looks correct: is this a docker bug?
does docker treat a system restart differently? I don't see a restart policy value other than / that would let us tell docker we didn't want containers auto-restarted on reboot
- forcing this to no mitigates the issue.
I couldn't reproduce this on my cluster (kubernets 1.13, GCE, COS image with docker 17.03.2-ce). I tried both methods -- 1) w/ k8s, stop apiserver, and restart the node, and 2) create a docker container with empty restart policy, reboot the node. Since this can be a docker bug, could you get an os image version + docker version, and commands to reproduce this?
- apologies, I double-checked both hosts were on 17.03.1-ce, I tried to reproduce with 17.3.2 but wasn't able to do so. From the nothing seems have fixed the issue. Can you confirm that you are able to reproduce the issue on 17.3.1 ? Also forcing the restartPolicy to mitigates the issue for this version. It seems like isn't treated consistently. - do you have any concern to change dockershim to set explicitly a restart policy to ?
It appears we are depending on the implicit default of "no" currently () If that behaves inconsistently on different docker versions, I think making it explicit is reasonable.
sgtm

Discussion:
}, HostConfig: &dockercontainer.HostConfig{ Binds: generateMountBindings(config.GetMounts()), <ins> RestartPolicy: dockercontainer.RestartPolicy{ Name: "no", }, </ins> }, }
Change:
There aren't any tests that cover ExternalPort services from Windows pods today. Here's an example manual case that can best explain what needs to be automated. a Windows pod on a Windows node this yaml This shows that DNS is working for the ExternalName service entry. The actual HTTP request fails (by design) because curl is putting the service name in the header which is rejected by the http server itself. /sig windows /good-first-issue
Can explain why you think http server is rejecting service name in header?
curl was using the URL given to set the hostname in the HTTP request. To illustrate what this does - here's another way to get the same result. Ask to give you the page for It can't serve that content so it returns a 404. Therefore, if I had run that would have succeeded.
/milestone v1.14
We could use the test ` for this. This test does: creates an initial ExternalName to and validates the DNS resolution. renames the ExternalName to and validates the new DNS resolution. changes the Service Type to ClusterIP and validates the new DNS resolution.
Is anyone working on this? I'd like to jump on it
sure, go for it. /assign
GitHub didn't allow me to assign the following users: keremgocen. Note that only and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. For more information please see <detailsIn response to : sure, go for it. /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
What kind of modifications are required to run e2e in [Windows]. TestName: I'm in process to promote DNS based e2e from into Conformance suite.
HI I am also looking into that test, as it is a bit flaky on Windows. My recommendation would be to increase the retry period / number of retries for the dig command.
Thanks for pointing its Flaky behavior on Windows. I'm in process to setup k8s cluster in Windows env and then troubleshoot.
Ok, looks like the right things are happening. is approved. Once merges it should show up in testgrid for Windows too. If doesn't make it, this can move to 1.15. I did manual testing (see steps above) and it's ok. Since there's a common test case that should work, we should rely on that instead of adding a Windows-only test. /remove-good-first-issue
/remove-help-wanted
/remove help-wanted

Discussion:
// createTargetedProbeCommand returns a command line that performs a DNS lookup for a specific record type func createTargetedProbeCommand(nameToResolve string, lookup string, fileNamePrefix string) (string, string) { fileName := fmt.Sprintf("%s_udp@%s", fileNamePrefix, nameToResolve) <del> probeCmd := fmt.Sprintf("dig +short +tries=12 %s %s > /results/%s", nameToResolve, lookup, fileName) </del> <ins> probeCmd := fmt.Sprintf("for i in `seq 1 30`; do dig +short %s %s > /results/%s; sleep 1; done", nameToResolve, lookup, fileName) </ins> return probeCmd, fileName }
Change:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : This is a place holder to track Conformance Coverage on the Topic. This issue should remain open until all related work is accomplished in the k/k repo This issue will contain analysis of the coverage. Existing tests and additional tests requested with links to those issues/PR's Why is this needed: Conformance coverage for CSI, etc. /area conformance /assign /cc
/sig testing

Discussion:
import ( "fmt" "path" <ins> "time" </ins> . "github.com/onsi/ginkgo" "k8s.io/api/core/v1"

framework.ConformanceIt("should support (non-root,0777,default) [LinuxOnly] [NodeConformance]", func() { doTest0777(f, testImageNonRootUid, v1.StorageMediumDefault) }) <ins> It("pod should support shared volumes between containers", func() { var ( volumeName                 = "shared-data" busyBoxMainVolumeMountPath = "/usr/share/volumeshare" busyBoxSubVolumeMountPath  = "/pod-data" busyBoxMainVolumeFilePath  = fmt.Sprintf("%s/shareddata.txt", busyBoxMainVolumeMountPath) busyBoxSubVolumeFilePath   = fmt.Sprintf("%s/shareddata.txt", busyBoxSubVolumeMountPath) message                    = "Hello from the busy-box sub-container" busyBoxMainContainerName   = "busybox-main-container" busyBoxSubContainerName    = "busybox-sub-container" resultString               = "" ) pod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "pod-sharedvolume-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ Volumes: []v1.Volume{ { Name: volumeName, VolumeSource: v1.VolumeSource{ EmptyDir: new(v1.EmptyDirVolumeSource), }, }, }, Containers: []v1.Container{ { Name:    busyBoxMainContainerName, Image:   imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sh"}, Args:    []string{"-c", "sleep 10"}, VolumeMounts: []v1.VolumeMount{ { Name:      volumeName, MountPath: busyBoxMainVolumeMountPath, }, }, }, { Name:    busyBoxSubContainerName, Image:   imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{"/bin/sh"}, Args:    []string{"-c", fmt.Sprintf("echo %s > %s", message, busyBoxSubVolumeFilePath)}, VolumeMounts: []v1.VolumeMount{ { Name:      volumeName, MountPath: busyBoxSubVolumeMountPath, }, }, }, }, RestartPolicy: v1.RestartPolicyNever, }, } var err error By("Creating Pod") pod = f.PodClient().CreateSync(pod) By("Waiting for the pod running") err = f.WaitForPodRunning(pod.Name) framework.ExpectNoError(err, "failed to deploy pod %s", pod.Name) By("Geting the pod") pod, err = f.PodClient().Get(pod.Name, metav1.GetOptions{}) framework.ExpectNoError(err, "failed to get pod %s", pod.Name) By("Reading file content from the nginx-container") resultString, err = framework.LookForStringInFile(f.Namespace.Name, pod.Name, busyBoxMainContainerName, busyBoxMainVolumeFilePath, message, 30*time.Second) framework.ExpectNoError(err, "failed to match expected string %s with %s", message, resultString) }) </ins> }) const (
Change:
<!-- 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!--The method only finds string in output of , but when the name of the set contains , it will return no matter the entry exists in ipset or not. What happened: returns false whenever entry exists if the name of set contains , e,g: , , What you expected to happen: returns whether the entry exists whatever the set name is How to reproduce it (as minimally and precisely as possible): replace the set name to any name containing , for example in of , then cd to and run , and it fails on . Anything else we need to know?: Environment: Kubernetes version (use ): v1.11.6, but the bug still exists in Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others: /sig network /kind bug
/assign
This page says that returns non-zero when entry does not exist in set, and zero when entry exists: and I tested the output of (ipset v6.29 on Ubuntu 16.04 LTS, kernel 4.4.0-116-generic),the result goes as follow: so maybe we can judge by return value of command and the separated output of stdout and stderr,

Discussion:
// TestEntry is used to check whether the specified entry is in the set or not. func (runner *runner) TestEntry(entry string, set string) (bool, error) { if out, err := runner.exec.Command(IPSetCmd, "test", set, entry).CombinedOutput(); err == nil { <del> reg, e := regexp.Compile("NOT") </del> <ins> reg, e := regexp.Compile("is NOT in set " + set) </ins> if e == nil && reg.MatchString(string(out)) { return false, nil } else if e == nil {

Protocol: ProtocolTCP, SetType:  HashIPPort, } <ins> setName := "NOT" </ins> fcmd := fakeexec.FakeCmd{ CombinedOutputScript: []fakeexec.FakeCombinedOutputAction{ // Success <del> func() ([]byte, error) { return []byte("10.120.7.100,tcp:8080 is in set FOOBAR."), nil }, </del> <ins> func() ([]byte, error) { return []byte("10.120.7.100,tcp:8080 is in set " + setName + "."), nil }, </ins> // Failure func() ([]byte, error) { <del> return []byte("192.168.1.3,tcp:8080 is NOT in set FOOBAR."), &fakeexec.FakeExitError{Status: 1} </del> <ins> return []byte("192.168.1.3,tcp:8080 is NOT in set " + setName + "."), &fakeexec.FakeExitError{Status: 1} </ins> }, }, }

} runner := New(&fexec) // Success <del> ok, err := runner.TestEntry(testEntry.String(), "FOOBAR") </del> <ins> ok, err := runner.TestEntry(testEntry.String(), setName) </ins> if err != nil { t.Errorf("expected success, got %v", err) } if fcmd.CombinedOutputCalls != 1 { t.Errorf("expected 2 CombinedOutput() calls, got %d", fcmd.CombinedOutputCalls) } <del> if !sets.NewString(fcmd.CombinedOutputLog[0]...).HasAll("ipset", "test", "FOOBAR", "10.120.7.100,tcp:8080") { </del> <ins> if !sets.NewString(fcmd.CombinedOutputLog[0]...).HasAll("ipset", "test", setName, "10.120.7.100,tcp:8080") { </ins> t.Errorf("wrong CombinedOutput() log, got %s", fcmd.CombinedOutputLog[0]) } if !ok {
Change:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : Currently, the kubectl plugins system - when running under Windows - will determine that a plugin is executable by looking at the plugin's extension, comparing it to '.exe'. I think we should allow plugins w/ a few more known extensions (.bat, .com, .cmd; for example). Why is this needed: This would give more of a similar experience to plugins under *nix, where shell scripts are often used.
/sig cli
Please see the PR below:

Discussion:
"io" "os" "os/exec" <del> "runtime" </del> "strings" "syscall"

// Lookup implements PluginHandler func (h *defaultPluginHandler) Lookup(filename string) (string, error) { <del> // if on Windows, append the "exe" extension // to the filename that we are looking up. if runtime.GOOS == "windows" { filename = filename + ".exe" } </del> return exec.LookPath(filename) }

seenPlugins: make(map[string]string, 0), } <del> path := "PATH" if runtime.GOOS == "windows" { path = "path" } o.PluginPaths = filepath.SplitList(os.Getenv(path)) </del> <ins> o.PluginPaths = filepath.SplitList(os.Getenv("PATH")) </ins> return nil }

} if runtime.GOOS == "windows" { <del> if strings.HasSuffix(info.Name(), ".exe") { </del> <ins> fileExt := strings.ToLower(filepath.Ext(fullPath)) switch fileExt { case ".bat", ".cmd", ".com", ".exe": </ins> return true, nil } return false, nil
Change:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : e2e test suites for: GET /api/v1/componentstatuses/{name} Why is this needed: The above API is not performed in current e2e test. By adding test for it, e2e test coverage is improved. /sig testing

Discussion:
}) }) <ins> framework.KubeDescribe("Kubectl get componentstatuses", func() { It("should get componentstatuses", func() { By("getting list of componentstatuses") output := framework.RunKubectlOrDie("get", "componentstatuses", "-o", "jsonpath={.items[*].metadata.name}") components := strings.Split(output, " ") By("getting details of componentstatuses") for _, component := range components { By("getting status of " + component) framework.RunKubectlOrDie("get", "componentstatuses", component) } }) }) </ins> framework.KubeDescribe("Kubectl apply", func() { It("should apply a new configuration to an existing RC", func() { controllerJson := commonutils.SubstituteImageName(string(readTestFileOrDie(redisControllerFilename)))
Change:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : New test case to cover scenario in Why is this needed: Prevent this issue happening again.
/assign /sig storage

Discussion:
Expect(err).ToNot(HaveOccurred()) }) }) <ins> Context("Pods sharing a single local PV [Serial]", func() { var ( pv *v1.PersistentVolume ) BeforeEach(func() { localVolume := &localTestVolume{ node:            config.node0, hostDir:         "/tmp", localVolumeType: DirectoryLocalVolumeType, } pvConfig := makeLocalPVConfig(config, localVolume) var err error pv, err = framework.CreatePV(config.client, framework.MakePersistentVolume(pvConfig)) framework.ExpectNoError(err) }) AfterEach(func() { if pv == nil { return } By(fmt.Sprintf("Clean PV %s", pv.Name)) err := config.client.CoreV1().PersistentVolumes().Delete(pv.Name, &metav1.DeleteOptions{}) framework.ExpectNoError(err) }) It("all pods should be running", func() { var ( pvc   *v1.PersistentVolumeClaim pods  = map[string]*v1.Pod{} count = 50 err   error ) pvc = framework.MakePersistentVolumeClaim(makeLocalPVCConfig(config, DirectoryLocalVolumeType), config.ns) By(fmt.Sprintf("Create a PVC %s", pvc.Name)) pvc, err = framework.CreatePVC(config.client, config.ns, pvc) framework.ExpectNoError(err) By(fmt.Sprintf("Create %d pods to use this PVC", count)) for i := 0; i < count; i++ { pod := framework.MakeSecPod(config.ns, []*v1.PersistentVolumeClaim{pvc}, false, "", false, false, selinuxLabel, nil) pod, err := config.client.CoreV1().Pods(config.ns).Create(pod) Expect(err).NotTo(HaveOccurred()) pods[pod.Name] = pod } By("Wait for all pods are running") err = wait.PollImmediate(time.Second, 5*time.Minute, func() (done bool, err error) { podsList, err := config.client.CoreV1().Pods(config.ns).List(metav1.ListOptions{}) if err != nil { return false, err } runningPods := 0 for _, pod := range podsList.Items { switch pod.Status.Phase { case v1.PodRunning: runningPods++ } } return runningPods == count, nil }) Expect(err).ToNot(HaveOccurred()) }) }) </ins> }) func deletePodAndPVCs(config *localTestConfig, pod *v1.Pod) error {
Change:
After we moved logging all requests in apiserver to V(3) level: We have the: --vmodule=httplog=3 to config of all scalability tests, because debugging scalability tests is pretty much impossible without having those logs. However, apparently this is adding a huge lock contention on that, because if vmodule is non-empty, we enter a non-trivial code-path in the glog for every single glog call: I did some experiments, and switching --v=3 for apiserver (instead of --v=2 + vmodule) doesn't introduce the significiant change - the difference in amount of produced logs is about 10% (a bit less). So given that we don't do that in production anyway, what we should do is to: set --v=3 for apiserver in our scalability tests (to have all the logs we need) get rid of those vmodule settings
Something went wrong here. The vmodule flag change worked as expected, but setting --v=3 in apiserver didn't. Here are the api-server args from the recent run of the gce scale perormance ! The vmodule is not set, but the log level is set to v2. As the result we currently don't have the http logs. I'm investigating why log verbosity is not overridden in api server.
Env variables seem to be set correctly in the build file: !
/reopen
You can't reopen an issue/PR unless you authored it or you are a collaborator. <detailsIn response to : /reopen 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
seems to be fixing the issue - !

Discussion:
ADDON_MANAGER_LEADER_ELECTION: $(yaml-quote ${ADDON_MANAGER_LEADER_ELECTION}) EOF fi <ins> if [ -n "${API_SERVER_TEST_LOG_LEVEL:-}" ]; then cat >>$file <<EOF API_SERVER_TEST_LOG_LEVEL: $(yaml-quote ${API_SERVER_TEST_LOG_LEVEL}) EOF fi </ins> else # Node-only env vars.
Change:
<!-- 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!--What happened: The gce cluster creation script fails, when HEAPSTERMACHINETYPE env variable is provided. The script calls What you expected to happen: Script shouldn't fail. How to reproduce it (as minimally and precisely as possible): Run hack script to setup the cluster. Anything else we need to know?: Tis bug was introduced in This problem is due to call to not existing function - get-linux-node-instance-metadata-from-file": Environment: Kubernetes version (use ): HEAD Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Linux Kernel (e.g. ): Install tools: Others:
There are no sig labels on this issue. Please add a sig label by either: 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. See the . The in method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals. <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
Will be fixed by

Discussion:
--tags "${NODE_TAG}"  ${network}  $(get-scope-flags)  <del> --metadata-from-file "$(get-linux-node-instance-metadata-from-file)" </del> <ins> --metadata-from-file "$(get-node-instance-metadata-from-file)" </ins> } # Assumes:
Change:
<!-- 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!--What happened: make test is failing due to build failure What you expected to happen: make test should be successful How to reproduce it (as minimally and precisely as possible): clone kubenetes git and run make test Anything else we need to know?: Environment: OS (e.g. from /etc/os-release):Kernel (e.g. ): GO Version: Other:
/sig testing
does help? are you out of space or have write permission problems in your /tmp directory?
this is happening in a clean environment and I hope got enough disk space! do you see golang/linker issues here?
All I see are missing files, not linker errors.
found the culprit, @ test is deleting the which is actually a - which is removing some of the files which are created by go compile process and failing because of this. Other places in kubernetes used and same logic needs to be used here as well.
good catch. yeah, each test should make its own tmp dir with . can you open a PR sweeping for that?
Just wanted to confirm I'm also experiencing the same build failure on HEAD ().
yes, will be out soon for review.
here is the PR to fix this issue -

Discussion:
"fmt" "io/ioutil" "os" <ins> "path/filepath" </ins> "reflect" "runtime" "strings"

func TestConfigChange(t *testing.T) { setUp := func() (*os.File, string, error) { <del> tempDir := os.TempDir() file, err := ioutil.TempFile(tempDir, "kube-proxy-config-") </del> <ins> tempDir, err := ioutil.TempDir("", "kubeproxy-config-change") if err != nil { return nil, "", fmt.Errorf("Unable to create temporary directory: %v", err) } fullPath := filepath.Join(tempDir, "kube-proxy-config") file, err := os.Create(fullPath) </ins> if err != nil { return nil, "", fmt.Errorf("unexpected error when creating temp file: %v", err) }
Change:
What happened: When running the apiserver returns an error: with being: What you expected to happen: The object being created if not found. How to reproduce it (as minimally and precisely as possible): get etcd up get apiserver up run kubectl apply (built from master as well) Anything else we need to know?: Everything built directly from master Environment: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
I think this is caused by We do need to fix that before alpha is released. The issue is that services use a custom storage implementation which doesn't support create-on-update and the first line of the update function checks that the object exists.
Okay, thanks for looking into it . Anything I can do here?

Discussion:
func (rs *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { oldObj, err := rs.services.Get(ctx, name, &metav1.GetOptions{}) if err != nil { <ins> // Support create on update, if forced to. if forceAllowCreate { obj, err := objInfo.UpdatedObject(ctx, nil) if err != nil { return nil, false, err } createdObj, err := rs.Create(ctx, obj, createValidation, &metav1.CreateOptions{DryRun: options.DryRun}) if err != nil { return nil, false, err } return createdObj, true, nil } </ins> return nil, false, err } oldService := oldObj.(*api.Service)

_, client, closeFn := setup(t) defer closeFn() <del> _, err := client.CoreV1().RESTClient().Patch(types.ApplyPatchType). Namespace("default"). Resource("pods"). Name("test-pod"). Body([]byte(`{ "apiVersion": "v1", "kind": "Pod", "metadata": { "name": "test-pod" }, "spec": { "containers": [{ "name":  "test-container", "image": "test-image" }] } }`)). Do(). Get() if err != nil { t.Fatalf("Failed to create object using Apply patch: %v", err) </del> <ins> testCases := []struct { resource string name     string body     string }{ { resource: "pods", name:     "test-pod", body: `{ "apiVersion": "v1", "kind": "Pod", "metadata": { "name": "test-pod" }, "spec": { "containers": [{ "name":  "test-container", "image": "test-image" }] } }`, }, { resource: "services", name:     "test-svc", body: `{ "apiVersion": "v1", "kind": "Service", "metadata": { "name": "test-svc" }, "spec": { "ports": [{ "port": 8080, "protocol": "UDP" }] } }`, }, </ins> } <del> _, err = client.CoreV1().RESTClient().Get().Namespace("default").Resource("pods").Name("test-pod").Do().Get() if err != nil { t.Fatalf("Failed to retrieve object: %v", err) </del> <ins> for _, tc := range testCases { _, err := client.CoreV1().RESTClient().Patch(types.ApplyPatchType). Namespace("default"). Resource(tc.resource). Name(tc.name). Body([]byte(tc.body)). Do(). Get() if err != nil { t.Fatalf("Failed to create object using Apply patch: %v", err) } _, err = client.CoreV1().RESTClient().Get().Namespace("default").Resource(tc.resource).Name(tc.name).Do().Get() if err != nil { t.Fatalf("Failed to retrieve object: %v", err) } </ins> } }