jiebi/CodeConvo huggingface dataset:
Change:
pvc.Spec.StorageClassName = &classWait pvc.Name = "claim02" }), <del> node: node2, </del> <ins> node: node3, </ins> }, "success-bad-and-good-node-affinity": { expectedMatch: "affinity-pv3",

Discussion:
<!-- 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?: /assign What happened: Volume got bound to PV on node "kubernetes-minion-group-82c8" When the pod went back through scheduling, the predicate returned success for other nodes even though we should have updated the PV cache to point to the PVC: I think in , instead of continuing if the node affinity doesn't match, it should fail if the PV is prebound.
This causes two issues: On the second pass, the scheduler may choose a different node. Then in Assume/Bind volumes, we'll also prebind a second set of PVs. If the scheduler chose a different node on the second pass, and the PVCs became fully bound in between the predicates and assume volumes, then assume volumes will return success and the pod will get scheduled to the wrong node.
Change:
Expect(pv.Spec.AccessModes).To(Equal(expectedAccessModes)) Expect(pv.Spec.ClaimRef.Name).To(Equal(claim.ObjectMeta.Name)) Expect(pv.Spec.ClaimRef.Namespace).To(Equal(claim.ObjectMeta.Namespace)) <ins> Expect(pv.Spec.MountOptions).To(Equal(class.MountOptions)) </ins> // Run the checker if t.pvCheck != nil {

Discussion:
for 1.8. /assign
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 storage
Looking at the PR description, it seems that adds tests for ReclaimPolicy only. What about MountOptions?
those are coming also, I'll re-rename issue/point to another one
Since the feature is in 1.8, we need tests in 1.8. Adding this to 1.8 milestone.
[MILESTONENOTIFIER] Milestone Labels Complete Issue label settings: sig/storage: Issue will be escalated to these SIGs if needed. priority/important-soon: Escalate to the issue owners and SIG owner; move out of milestone after several unsuccessful escalation attempts. kind/cleanup: Adding tests, refactoring, fixing old bugs. <detailsAdditional instructions available <a href=""here</aThe commands available for adding these labels are documented <a href=""here</a</details
This issue is a 1.8 blocker. The PRs for to fix it, and , are approved/LGTM'd and awaiting merge. This issue can be closed as soon as those merge.
Change:
lastErr = fmt.Errorf("iscsi: failed to attach disk: Error: %s (%v)", string(out), err) continue } <del> exist = waitForPathToExist(devicePath, 10, iscsiTransport) </del> <ins> exist = waitForPathToExist(&devicePath, 10, iscsiTransport) </ins> if !exist { glog.Errorf("Could not attach disk: Timeout after 10s") // update last error

Discussion:
Kubernetes version (use ): Client Version: version.Info{Major:"1", Minor:"7+", GitVersion:"v1.7.0-beta.1", GitCommit:"", GitTreeState:"not a git tree", BuildDate:"2017-06-08T13:08:32Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.3", GitCommit:"", GitTreeState:"clean", BuildDate:"2017-05-10T15:38:08Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"} Environment: Cloud provider or hardware configuration: Bare-Metal, HP SE316M, 2x X5675, 144GB, iSCSI/RDMA/iSer OS: CentOS 7 Kernel: Linux at-host-18 4.9.31 SMP Wed Jun 7 22:40:40 UTC 2017 x8664 x8664 x8664 GNU/Linux Install tools: Others: What happened: I want to mount a iSCSI volume via iSER (RDMA over Infiniband) in this case the iSCSI iface is "iser" and not tcp, therefore the glob path for device mount is selected (), which then is passed to the fsck and mount commands without globbing the path (e.g. calling filepath.Glob) Therefore the iSCSI volume is not mounted and the pod cannot be started. Logs: What you expected to happen: To successfully mount the volume. How to reproduce it (as minimally and precisely as possible): Setup an iSCSI via RDMA (iSER) environment without multipath and try to mount a volume for a pod. Anything else we need to know: I believe it's just needed to add the globbing at line 259 like so: devicePaths = append(devicePaths, filepath.Glob(devicePath)) As I'm not a go programmer and have no experience with it, probably somebody could create a commit which I would gladly test!
There are no sig labels on this issue. Please by:<br(1) mentioning a sig: <br(2) specifying the label manually: <br<brNote: method (1) will trigger a notification to the team.

You can find the team list and label list
/sig storage
I'll take a look.
/sig storage
on a local build that fixed the issue: (e.g. it compiles)
I don't want to add filepath.Glob to that general path because that line is also executed "tcp" case. I'm considering the fix below. Pretty similar.
does that work from a go specific point? is that devicePath passed by reference? (from general c/c++/php/node/c# knowledge I would say that this would have no effect on the devicePath variable .. )
Can we suppose that filepath.Glob(devicePath) always only return one device path if transport is "tcp"?
does that work from a go specific point? is that devicePath passed by reference? (from general c/c++/php/node/c# knowledge I would say that this would have no effect on the devicePath variable .. ) Thank you for above comment. I updated the logic. Could you confirm the fix on the PR?
Pretty sure that tcp transport will always only have one path - and it will exist (there's no glob in the check path)
Change:
"k8s.io/kubernetes/pkg/api/v1" ) <ins> const ( MaxUint          = ^uint(0) MaxInt           = int(MaxUint >> 1) MaxTotalPriority = MaxInt MaxPriority      = 10 MaxWeight        = MaxInt / MaxPriority ) </ins> type Policy struct { metav1.TypeMeta // Holds the information to configure the fit predicate functions

Discussion:
Weight is an int (see ). Priority can take the range 1-10. Total priority for a node is sum of weight  priority for each priority function, and the sum is accumulated into an int (see ). So obviously the total priority can overflow if someone sets the weight(s) too high. The weights of all priority functions are compiled in (or specified in config file), so we can check to make sure maximum total priority can't overflow an int (take sum over all priority functions of 10  weight of that priority function, and make sure that's smaller than int(MaxUint 1) which according to StackOverflow is the way to find out what is max int (math package has max Int32, Int64, etc. but not max Int). Note that scheduler extender is OK because although the policy runs in a separate process, the weight is specified in scheduler config file (ExtenderConfig struct) and the priority is bounded 1-10 as usual.
We really should also make "score" be an abstract datatype rather than a raw int that is manipulated directly, so we can do things like make sure it is in the range 1-10 (or 0-10 if that's what we want); today the range is inconistent (we say 1-10, but sometimes use 0; probably we should change it to 0-9..).
I volunteer myself to do this.
I think we can check weight overflow in after we get all PriorityConfig. what do you think about this?
As for "score" I think we can use
Fixed by - closing.
Tim that PR was closed, not merged. I don't think this is fixed yet.
whoops, good catch, just removing milestone then. There was a shift that happened yesterday where a bunch of items suddenly came into the 1.6 query.
do we still want this fixed? I can re-pick this.
AFAIK it's still broken. cc/
Ok, I will open a PR tomorrow.
Change:
)) # How to regenerate open-api code.  This emits a single file for all results. <del> $(OPENAPI_OUTFILE): $(OPENAPI_GEN) ./hack/run-in-gopath.sh $(OPENAPI_GEN)                                           --v $(KUBE_VERBOSE)                                                          --logtostderr                                                                -i $$(echo $(addprefix $(PRJ_SRC_PATH)/, $(OPENAPI_DIRS)) | sed 's/ /,/g')   -p $(PRJ_SRC_PATH)/$(OPENAPI_OUTPUT_PKG)                                     -O $(OPENAPI_BASENAME) </del> <ins> $(OPENAPI_OUTFILE): $(OPENAPI_GEN) $(OPENAPI_GEN) $(RUN_GEN_OPENAPI) </ins> # This calculates the dependencies for the generator tool, so we only rebuild # it when needed.  It is PHONY so that it always runs, but it only updates the

Discussion:
Right now on head () if you run it will end up having a modified file. This happened because some type has been changed and this file should have been generated before commit, and verification should have failed but they didn't.
This is not only a problem with openapi-gen. deepcopy-gen also has the same problem. I've a field to a type (autoscaling/v1) and verify-all passed for the commit (without adding generated code to it). those files will be generated on verify-codegen and it will not fail and the commit can be merged without generated code.
Yeah. So when the Makefile stuff originally went in those files were not checked in. Then we un-did that part, but I didn't re-add them to verify...
Change:
} }) } <ins> } func TestShowHiddenMetric(t *testing.T) { registry := NewKubeRegistry(apimachineryversion.Info{ Major:      "1", Minor:      "15", GitVersion: "v1.15.0-alpha-1.12345", }) expectedMetricCount := 0 registry.MustRegister(alphaHiddenCounter) ms, err := registry.Gather() if len(ms) != expectedMetricCount { t.Errorf("Got %v metrics, Want: %v metrics", len(ms), expectedMetricCount) } showHidden.Store(true) defer showHidden.Store(false) registry.MustRegister(NewCounter( &CounterOpts{ Namespace:         "some_namespace", Name:              "test_alpha_show_hidden_counter", Subsystem:         "subsystem", StabilityLevel:    ALPHA, Help:              "counter help", DeprecatedVersion: &v114, }, )) expectedMetricCount = 1 ms, err = registry.Gather() if len(ms) != expectedMetricCount { t.Errorf("Got %v metrics, Want: %v metrics", len(ms), expectedMetricCount) } if err != nil { t.Fatalf("Gather failed %v", err) } </ins> }

Discussion:
The metrics framework requires the ability to optionally display hidden (deprecated) metrics. A boolean needs to be piped through the registry (possibly at initialization or possibly set later) which then needs to be passed to the Create function so that we can determine whether we need to actually create the metric. /sig instrumentation
Change:
Expect(err).NotTo(HaveOccurred()) Expect(len(pods.Items)).Should(Equal(1)) }) <ins> It("will be set to nil if a patch removes the last pending initializer", func() { ns := f.Namespace.Name c := f.ClientSet podName := "to-be-patch-initialized-pod" framework.Logf("Creating pod %s", podName) // TODO: lower the timeout so that the server responds faster. _, err := c.CoreV1().Pods(ns).Create(newUninitializedPod(podName)) if err != nil && !errors.IsTimeout(err) { framework.Failf("expect err to be timeout error, got %v", err) } uninitializedPod, err := c.CoreV1().Pods(ns).Get(podName, metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred()) Expect(uninitializedPod.Initializers).NotTo(BeNil()) Expect(len(uninitializedPod.Initializers.Pending)).Should(Equal(1)) patch := fmt.Sprintf(`{"metadata":{"initializers":{"pending":[{"$patch":"delete","name":"%s"}]}}}`, uninitializedPod.Initializers.Pending[0].Name) patchedPod, err := c.CoreV1().Pods(ns).Patch(uninitializedPod.Name, types.StrategicMergePatchType, []byte(patch)) Expect(err).NotTo(HaveOccurred()) Expect(patchedPod.Initializers).To(BeNil()) }) </ins> }) func newUninitializedPod(podName string) *v1.Pod {

Discussion:
There are two issues: doesn't have merge key The validation code regards it as an error if both Initializers.Result and Initializers.Pending are nil. So if multiple initializer controllers sending patches removing themselves from Initializers.Pending at the same time, the last patch that gets applied will get a validation error.
/sig api-machinery
Change:
} } } <ins> func BenchmarkPodMatchesScopeFunc(b *testing.B) { pod, _ := toExternalPodOrError(makePod("p1", "high-priority", api.ResourceList{api.ResourceCPU: resource.MustParse("1")}, api.PodRunning)) tests := []struct { name     string selector corev1.ScopedResourceSelectorRequirement }{ { name: "PriorityClass selector w/o operator", selector: corev1.ScopedResourceSelectorRequirement{ ScopeName: corev1.ResourceQuotaScopePriorityClass, }, }, { name: "PriorityClass selector w/ 'Exists' operator", selector: corev1.ScopedResourceSelectorRequirement{ ScopeName: corev1.ResourceQuotaScopePriorityClass, Operator:  corev1.ScopeSelectorOpExists, }, }, { name: "BestEfforts selector w/o operator", selector: corev1.ScopedResourceSelectorRequirement{ ScopeName: corev1.ResourceQuotaScopeBestEffort, }, }, { name: "BestEfforts selector w/ 'Exists' operator", selector: corev1.ScopedResourceSelectorRequirement{ ScopeName: corev1.ResourceQuotaScopeBestEffort, Operator:  corev1.ScopeSelectorOpExists, }, }, } for _, tt := range tests { b.Run(tt.name, func(b *testing.B) { for n := 0; n < b.N; n++ { _, _ = podMatchesScopeFunc(tt.selector, pod) } }) } } func mockListerForResourceFunc(listerForResource map[schema.GroupVersionResource]cache.GenericLister) quota.ListerForResourceFunc { return func(gvr schema.GroupVersionResource) (cache.GenericLister, error) { lister, found := listerForResource[gvr] if !found { return nil, fmt.Errorf("no lister found for resource %v", gvr) } return lister, nil } } func newGenericLister(groupResource schema.GroupResource, items []runtime.Object) cache.GenericLister { store := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) for _, item := range items { store.Add(item) } return cache.NewGenericLister(store, groupResource) } func makePod(name, pcName string, resList api.ResourceList, phase api.PodPhase) *api.Pod { return &api.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: api.PodSpec{ PriorityClassName: pcName, Containers: []api.Container{ { Resources: api.ResourceRequirements{ Requests: resList, Limits:   resList, }, }, }, }, Status: api.PodStatus{ Phase: phase, }, } } </ins>

Discussion:
If a Pod is subjected to a with "PriortyClass" as its scope, the quota's calculation is incorrect. See repo steps for more details. with "PriortyClass" as its scope can be calculated at all times. Create a PriorityClass named "p1"Create a quota with as its scope. Note: w/o specifying , this issue won't happenCreate a Job and wait for its completion.Check quota's usage calculation Here is incorrect - it should be . Worse calculation may happen if I create a regular pod and then delete the Job:The eventual result is totally incorrect. No response master, and possibly all versions. kind <details</details<details</details<details</details<details</details
/sig api-machinery /kind bug
/triage accepted
I would like to take this up!
is already in flight for this
Change:
pieces := strings.Split(part, ":") if len(pieces) < 1 || len(pieces) > 2 { glog.Infof("Bad port spec: %s", part) <del> continue </del> <ins> return nil, fmt.Errorf("Bad port spec: %s", part) </ins> } host := 0 container := 0

Discussion:
Kubernetes will create replication controller and pods in case of port spec error, e.g. will create 'myNginx'. A following correct spec will fail:
/cc
Change:
cd $(TEMP_DIR) && echo "ENV ETCD_UNSUPPORTED_ARCH=$(ARCH)" >> Dockerfile endif <del> # Replace BASEIMAGE with the real base image cd $(TEMP_DIR) && sed -i.bak 's|BASEIMAGE|$(BASEIMAGE)|g' Dockerfile cd $(TEMP_DIR) && sed -i.bak 's|RUNNERIMAGE|$(RUNNERIMAGE)|g' Dockerfile </del> # And build the image <del> docker build --pull -t $(REGISTRY)/etcd-$(ARCH):$(IMAGE_TAG) $(TEMP_DIR) </del> <ins> docker build  --pull  -t $(REGISTRY)/etcd-$(ARCH):$(IMAGE_TAG)  --build-arg BASEIMAGE=$(BASEIMAGE)  --build-arg RUNNERIMAGE=$(RUNNERIMAGE)  $(TEMP_DIR) </ins> push: build docker tag $(REGISTRY)/etcd-$(ARCH):$(IMAGE_TAG) $(MANIFEST_IMAGE)-$(ARCH):$(IMAGE_TAG)

Discussion:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --Building the etcd integration-test-image fails with the following err: Failure Log: Expected the image build to pass. k/k cluster/images/etcd build-integration-test-image Change that probably broke it: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
/sig etcd
The label(s) cannot be applied, because the repository doesn't have them <detailsIn response to : /sig etcd 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
/sig release
/sig api-machinery
/cc /cc
/cc
/assign /triage accepted
is working on this in .
Change:
type EnvVar struct { // Required: This must be a C_IDENTIFIER. Name string `json:"name" description:"name of the environment variable; must be a C_IDENTIFIER"` <del> // Optional: defaults to "". </del> <ins> // Optional: No more than one of the following may be set. // Optional: Defaults to "" </ins> Value string `json:"value,omitempty" description:"value of the environment variable; defaults to empty string"` <del> // Optional: specify a source the value of this var should come from. </del> <ins> // Optional: Specifies a source the value of this var should come from. </ins> ValueFrom *EnvVarSource `json:"valueFrom,omitempty" description:"source for the environment variable's value; cannot be used if value is not empty"` } // EnvVarSource represents a source for the value of an EnvVar. <del> // Only one of its members may be specified. </del> type EnvVarSource struct { <del> // Selects a field of the pod; only name and namespace are supported. FieldPath *ObjectFieldSelector `json:"fieldPath,omitempty" description:"selects a field of the pod; only name and namespace are supported"` </del> <ins> // Required: Selects a field of the pod; only name and namespace are supported. FieldPath *ObjectFieldSelector `json:"fieldPath" description:"selects a field of the pod; only name and namespace are supported"` </ins> } // ObjectFieldSelector selects an APIVersioned field of an object. type ObjectFieldSelector struct { <del> // The API version the FieldPath is written in terms of. APIVersion string `json:"apiVersion,omitempty" description="The API version that FieldPath is written in terms of"` // The path of the field to select in the specified API version FieldPath string `json:"fieldPath,omitempty" description="The path of the field to select in the specified API version"` </del> <ins> // Optional: Version of the schema the FieldPath is written in terms of, defaults to "v1" APIVersion string `json:"apiVersion,omitempty" description:"version of the schema that fieldPath is written in terms of; defaults to v1"` // Required: Path of the field to select in the specified API version FieldPath string `json:"fieldPath" description:"path of the field to select in the specified API version"` </ins> } // HTTPGetAction describes an action based on HTTP Get requests.

Discussion:
PR had a few errors in its API objects, where the "description" field errors in its JSON declarations were missing. But, the "verify-" presubmit check didn't flag them. This should be investigated and fixed.
Could you please take a look at this?
Change:
for i := 0; i < 3; i++ { framework.Logf("PD Read/Writer Iteration #%v", i) By("submitting host0Pod to kubernetes") <ins> host0Pod = testPDPod([]string{diskName}, host0Name, false /* readOnly */, numContainers) </ins> _, err = podClient.Create(host0Pod) framework.ExpectNoError(err, fmt.Sprintf("Failed to create host0Pod: %v", err))

Discussion:
PR moved some PD tests to flaky to resolve issue (and duplicate ). These tests started failing due to PR . is working on a patch to de-flake the tests. This issue is to track the fix and should be closed when: PD tests have been deflaked (verify by running the "" e2e tests back to back for a couple of hours to verify the issue is fixed). flaky label has been removed from the "" tests that were marked flaky in CC
how to watch the submit queue and find if the flake is gone?
I don't know. is there any way can verify whether test is no longer flaky?
I'm not sure what the publicly accessible link for test history is. I took a look for you: Pod Disks should schedule a pod w/ a RW PD shared between multiple containers, write to PD, delete pod, verify contents, and repeat in rapid succession Failed 3 times in the last 30 runs. Stability: 90 % Pod Disks should schedule a pod w/two RW PDs both mounted to one container, write to PD, verify contents, delete pod, recreate pod, verify contents, and repeat in rapid succession Failed 1 times in the last 30 runs. Stability: 96 % I have a PR pending that enables the new attach/detach controller and I was able to run the tests back to back overnight without any failures. So once that gets merged, we can take a look at moving these tests back.
Something in PD attach/detach affects also 'Dynamic provisioning' e2e test, a PD is still attached to a node ~15 minutes after appropriate pod was deleted and thus deleter can't delete it. From controller log:
please take a look at https://k8s-
thanks so at least one of the flake has a different error than "container not found" In one, the error is
^^ the above seems like a possible bug in exec
^
The error to me indicates that the original container is no longer around as exec can't find the ipc namespace fd. Are we sure the container that we are trying to join is still around?
my memory is rusty but did you have an idea to randomize the container id in this pd test?
see the info here:
Close we will track this with
Change:
type Client struct { service   *bigquery.Service <del> token     *oauth.Token </del> <ins> token     *oauth2.Token </ins> datasetId string tableId   string } // Helper method to create an authenticated connection. <del> func connect() (*oauth.Token, *bigquery.Service, error) { </del> <ins> func connect() (*oauth2.Token, *bigquery.Service, error) { </ins> if *clientId == "" { return nil, nil, fmt.Errorf("no client id specified") }

Discussion:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --Following link on sig-network page () is broken Link should be working Kubernetes version (use ):1.21 Cloud provider or hardware configuration:None OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
/sig-network
/sig network
/triage accepted