jiebi/CodeConvo huggingface dataset:
Change:
# This seems to matter to some tools export GO15VENDOREXPERIMENT=1 <ins> # GOMAXPROCS by default does not reflect the number of cpu(s) available # when running in a container, please see https://github.com/golang/go/issues/33803 if ! command -v ncpu >/dev/null 2>&1; then # shellcheck disable=SC2164 pushd "${KUBE_ROOT}/hack/tools" >/dev/null GO111MODULE=on go install ./ncpu # shellcheck disable=SC2164 popd >/dev/null fi GOMAXPROCS=${GOMAXPROCS:-$(ncpu)} kube::log::status "Setting GOMAXPROCS: ${GOMAXPROCS}" </ins> } # This will take binaries from $GOPATH/bin and copy them to the appropriate

Discussion:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : should detect the appropriate GOMAXPROCS based off of the cpu limit supplied to the pod. Why is this needed: If not, test failures can occur (e.g. ) where GOMAXPROCS defaults to the number of cpus on the machine, while the cpu limit is actually far less. Too many compile/test processes launch, and any timing tests can become flaky. The end result is that running the test jobs on a node with more CPUs can make it flaky when running the test on a node with fewer CPUs cleanly passes. It's possible to set GOMAXPROCS=cpu limits in test jobs to avoid this, but it would be nicer if would autodiscover and set GOMAXPROCS appropriately.
/sig testing /sig k8s-infra
/transfer kubernetes
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <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
/assign dims
xref:
This is already done, which is great, but for some more info I did some benchmarking of setting GOMAXPROCs vs not: Pretty substantially better in some cases
Change:
blockingPet *pcb } <ins> // errUnhealthyPet is returned when a we either know for sure a pet is unhealthy, // or don't know its state but assume it is unhealthy. It's used as a signal to the caller for further operations like updating status.replicas. // This is not a fatal error. type errUnhealthyPet string func (e errUnhealthyPet) Error() string { return string(e) } </ins> // Sync syncs the given pet. func (p *petSyncer) Sync(pet *pcb) error { if pet == nil {

Discussion:
Is this a request for help? Nope What keywords did you search in Kubernetes issues before filing this one? petset replicas current desired Is this a BUG REPORT or FEATURE REQUEST? BUG Kubernetes version Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+", GitCommit:"", GitTreeState:"not a git tree", BuildDate:"2016-09-01T10:49:36Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+", GitCommit:"", GitTreeState:"not a git tree", BuildDate:"2016-09-01T10:49:36Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"} Environment: Cloud provider or hardware configuration: 24 cores, 64 GB RAM OS Arch Linux Kernel (e.g. ): Linux hostname 4.4.13-1-lts SMP Wed Jun 8 16:44:31 CEST 2016 x86_64 GNU/Linux Install tools: local-cluster- Others: What happened: While creating PetSet based on this tutorial: first PetSet pod was stuck in pending state due to lack of PersistentVolumes in cluster. When getting the petset info via I expected to see "CURRENT" set to 1, while the kubectl output was as follows: While clearly shows that only one pod is created: In json and yaml output, status.replicas value was also 2. What you expected to happen: I expected that CURRENT value shown by kubectl would be due to only one pod being created. How to reproduce it (as minimally and precisely as possible): Create via on empty cluster and run and . Anything else do we need to know: Nope
CURRENT is the number of pods that have been created, not that they are READY. See for example the latest api change for replica sets where we exactly for this reason. All controllers (petsets, daemonsets, deployments, etc.) should have ReadyReplicas cc:
See also
I guess it doesn't work anyway, since only one pod was created for this PetSet, but the CURRENT says that 2 were created. I will change bug description then.

Hmm, the idea is to sync every pet periodically, but only create them one at a time. The logic that counts status.replicas is wrong. This counter shouldn't be incremented in the case where we didn't update/sync or create a pet: Today we do increment it all pet creation is blocked on the first pet becoming unhealthy. Should be an easy fix if anyone wants to jump in ( fyi) otherwise I'll get to it once 1.4 is out.
I can try to fix it if that's OK. Thanks for the pointer to the source code!
Please do, co-assigned
Change:
t.Errorf("unexpected error: %v", err) } if len(times) != 0 { <del> t.Errorf("expected 0 start times, got: , got: %v", times) </del> <ins> t.Errorf("expected 0 start times, got: %v", times) </ins> } } {

Discussion:
Is this a BUG REPORT or FEATURE REQUEST?: /kind feature What happened: Unit test error message match the conventional Go style: For example: if got, want := set.Status.Replicas, 3; got != want { t.Errorf("set.Status.Replicas = %v; want %v", got, want) }
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 testing
/assign
/reopen
Change:
flocker.DatasetName, flocker.DatasetUUID) } <ins> func printCSIVolumeSource(csi *corev1.CSIVolumeSource, w PrefixWriter) { var readOnly bool var fsType string if csi.ReadOnly != nil && *csi.ReadOnly { readOnly = true } if csi.FSType != nil { fsType = *csi.FSType } w.Write(LEVEL_2, "Type:tCSI (a Container Storage Interface (CSI) volume source)n"+ "    Driver:t%vn"+ "    FSType:t%vn"+ "    ReadOnly:t%vn", csi.Driver, fsType, readOnly) printCSIPersistentVolumeAttributesMultiline(w, "VolumeAttributes", csi.VolumeAttributes) } </ins> func printCSIPersistentVolumeSource(csi *corev1.CSIPersistentVolumeSource, w PrefixWriter) { w.Write(LEVEL_2, "Type:tCSI (a Container Storage Interface (CSI) volume source)n"+ "    Driver:t%vn"+

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 --What happened: kubectl describe pod xxx not show csi inline volume, it shows <unknow! What you expected to happen: show csi inline volume normally like this ! How to reproduce it (as minimally and precisely as possible): a pod with inline csi volume describe pod xxx not show csi inline volume Anything else we need to know?: Environment: Kubernetes version (use ): 1.14 beta2 Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Others:
/assign
/sig cli
Change:
containerPort: 8080 hostPort: 5000 volumeMounts: <del> - name: var-run </del> <ins> - name: varrun </ins> mountPath: /var/run readOnly: false <del> mountType: HOST - name: var-lib-docker </del> <ins> - name: varlibdocker </ins> mountPath: /var/lib/docker readOnly: true <del> mountType: HOST </del> - name: cgroups mountPath: /sys/fs/cgroup readOnly: true <del> mountType: HOST </del> volumes: <del> -name: var-run -name: var-lib-docker -name: var-cgroups </del> <ins> - name: varrun source: hostDir: path: /var/run - name: varlibdocker source: hostDir: path: /var/lib/docker - name: cgroups source: hostDir: path: /sys/fs/cgroup </ins>

Discussion:
With the current master HEAD, the apiserver never gets to a happy state. Here's what gets printed in many times. I think it's due to validation failure on the cadvisor manifest. Here's the relevent section of
Ryan, I haven't figured out the root cause of your issue yet, but I think I can help you rule out those validation failures on the cadvisor manifest. I saw the exact same validation errors on my , but I still can query /api/v1beta1/pods through apiserver. Both my apiserver and kubelet from yesterday afternoon, not include the latest merged PRs last night. Will try to see if I could reproduce your issue here.
I just pulled the code from HEAD, and ran into the same problem as Ryan. I need to attend a meeting now. Right after that, I will look into it if no one else are working it.
I seem to recall a cAdvisor path change in your PR? Related?
I will look
Just back from the meeting. I think the issue is caused by incompatibility between apiserver and kubelete. I noticed that there is a error msg in the initial your posed: E0722 14:55:52. ] Error synchronizing container list: &url.Error{Op:"Get", URL:"http://kubernetes-minion-", Err:(*net.OpError)(0xc2103ca2c0)} It is the same error I observed on my apiserver html page. Looks like apiserver failed to retrieve healthz/ from minions, then failed the query of /api/v1beta1/pods. To prove my hypothesis, I teared down my entire cluster and built a new one, and everything runs fine. I guess you just simply push the new kubelet binary over to some of minions in your cluster? Unfortunately I haven't figured out the exact where healthz/ failed yet.
We started validating manifests in the kubelet (using Tim's code) with my pull.
Looking into fixing the cAdvisor manifest. Assigning to myself.
Actually we started validating before with Tim's pull - I a unit test for validating manifests. We really need to get API validation in - I may try to get to that soon.
Change:
return nil, err } <del> oomAdjuster := oom.NewOOMAdjuster() </del> procFs := procfs.NewProcFs() // Initialize the runtime.

Discussion:
The type has a field called to indicate that a container must run as non-root user. The description for this field includes the sentence , which would mean that setting the field to or to (unset) have the same effect: However, the PodSecurityPolicy provider implementation handles the (unset) case differently, and thus does differentiate between unset or values: The API type documentation should be updated to clarify this behaviour and reflect the actual PodSecurityPolicy implementation. /sig node
Thanks for reporting this issue. I think that would be best able to assist with this. /sig auth /remove-sig node
The pod documentation is correct. If the field is not set or is false, the enforcement is not performed by the kubelet. However, podsecuritypolicy with a runasuser strategy of mustrunasnonroot will force a pod that has not specified a runAsNonRoot setting or a runAsUser uid to runAsNonRoot: true The documentation on the MustRunAsNonRoot strategy of podsecuritypolicy should clarify the mutation behavior of the PSP /remove-kind bug /kind documentation
Can I take this issue?
^ this is something that can be changed.
Here's a proposed change to the documentation in : Is this sufficient to solve this issue? If so, should I submit a PR there?
I'd change that to to be a little more complete.
/assign See PR for docs at
GitHub didn't allow me to assign the following users: josiahbjorgaard. 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 : /assign See PR for docs at 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
~This would have saved me some battling today! I couldn't work out why my pod wasn't selecting my run-as-root pod security policy and ignoring my restricted pod security policy - I didn't realise I had to explicitly set to get the correct PSP to match (I thought the restrictive PSP would reject the pod and then the run-as-root PSP would match, not that the restrictive PSP would mutate the PodSpec)~ It would have had I read the actual docs better sigh.
Change:
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" <del> "k8s.io/apiserver/pkg/features" utilfeature "k8s.io/apiserver/pkg/util/feature" featuregatetesting "k8s.io/component-base/featuregate/testing" </del> "k8s.io/kubernetes/pkg/apis/flowcontrol" "k8s.io/utils/ptr"

Discussion:
In 1.30, Priority and Fairness should allow a zero value, either via v1 or v1beta3 (with the roundtrip annotation) in create and update requests See:
/sig api-machinery /cc /assign
The label(s) cannot be applied, because the repository doesn't have them. <detailsIn response to : /triage accpted 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
/triage accepted
Change:
func (a byCreationTime) Swap(i, j int)      { a[i], a[j] = a[j], a[i] } // Returns a list of image names based on regex and number of previous images requested. <del> func getGCEImages(imageRegex, project string, previousImages int) ([]string, error) { ilc, err := computeService.Images.List(project).Do() if err != nil { return nil, fmt.Errorf("Failed to list images in project %q: %v", project, err) } </del> <ins> func getGCEImages(imageRegex, imageFamily string, project string, previousImages int) ([]string, error) { </ins> imageObjs := []imageObj{} imageRe := regexp.MustCompile(imageRegex) <del> for _, instance := range ilc.Items { if imageRe.MatchString(instance.Name) { creationTime, err := time.Parse(time.RFC3339, instance.CreationTimestamp) if err != nil { return nil, fmt.Errorf("Failed to parse instance creation timestamp %q: %v", instance.CreationTimestamp, err) } io := imageObj{ creationTime: creationTime, name:         instance.Name, </del> <ins> if err := computeService.Images.List(project).Pages(context.Background(), func(ilc *compute.ImageList) error { for _, instance := range ilc.Items { if imageRegex != "" && !imageRe.MatchString(instance.Name) { continue } if imageFamily != "" && instance.Family != imageFamily { continue } creationTime, err := time.Parse(time.RFC3339, instance.CreationTimestamp) if err != nil { return fmt.Errorf("failed to parse instance creation timestamp %q: %v", instance.CreationTimestamp, err) } io := imageObj{ creationTime: creationTime, name:         instance.Name, } klog.V(4).Infof("Found image %q based on regex %q and family %q in project %q", io.string(), imageRegex, imageFamily, project) imageObjs = append(imageObjs, io) </ins> } <del> klog.V(4).Infof("Found image %q based on regex %q in project %q", io.string(), imageRegex, project) imageObjs = append(imageObjs, io) } </del> <ins> return nil }, ); err != nil { return nil, fmt.Errorf("failed to list images in project %q: %v", project, err) </ins> } sort.Sort(byCreationTime(imageObjs)) images := []string{}

Discussion:
We should support image family in node e2e image config. It makes image validation much easier on GCE.
Cool idea :) Adding a link to for anyone like me who hadn't heard of them before :)
Change:
t.Errorf("unexpected fc disk found") } } <ins> func Test_ConstructVolumeSpec(t *testing.T) { fm := &mount.FakeMounter{ MountPoints: []mount.MountPoint{ {Device: "/dev/sdb", Path: "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~fc/fc-in-pod1"}, {Device: "/dev/sdb", Path: "/var/lib/kubelet/plugins/kubernetes.io/fc/50060e801049cfd1-lun-0"}, {Device: "/dev/sdc", Path: "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~fc/fc-in-pod2"}, {Device: "/dev/sdc", Path: "/var/lib/kubelet/plugins/kubernetes.io/fc/volumeDevices/3600508b400105e210000900000490000"}, }, } mountPaths := []string{ "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~fc/fc-in-pod1", "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~fc/fc-in-pod2", } for _, path := range mountPaths { refs, _ := mount.GetMountRefs(fm, path) var globalPDPath string for _, ref := range refs { if strings.Contains(ref, "kubernetes.io/fc") { globalPDPath = ref break } } if len(globalPDPath) == 0 { t.Errorf("couldn't fetch mountrefs") } arr := strings.Split(globalPDPath, "/") if len(arr) < 1 { t.Errorf("failed to retrieve volume plugin information from globalPDPath: %v", globalPDPath) } volumeInfo := arr[len(arr)-1] if strings.Contains(volumeInfo, "-lun-") { wwnLun := strings.Split(volumeInfo, "-lun-") if len(wwnLun) < 2 { t.Errorf("failed to retrieve TargetWWN and Lun. volumeInfo is invalid: %v", volumeInfo) } lun, _ := strconv.Atoi(wwnLun[1]) lun32 := int32(lun) if wwnLun[0] != "50060e801049cfd1" || lun32 != 0 { t.Errorf("failed to retrieve TargetWWN and Lun") } } else { if volumeInfo != "3600508b400105e210000900000490000" { t.Errorf("failed to retrieve WWIDs") } } } } func Test_ConstructVolumeSpecNoRefs(t *testing.T) { fm := &mount.FakeMounter{ MountPoints: []mount.MountPoint{ {Device: "/dev/sdd", Path: "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~fc/fc-in-pod1"}, }, } mountPaths := []string{ "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~fc/fc-in-pod1", } for _, path := range mountPaths { refs, _ := mount.GetMountRefs(fm, path) var globalPDPath string for _, ref := range refs { if strings.Contains(ref, "kubernetes.io/fc") { globalPDPath = ref break } } if len(globalPDPath) != 0 { t.Errorf("invalid globalPDPath") } } } </ins>

Discussion:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: Currently, FC plugin returns volume name and empty FCVolumeSource during ConstrutVolumeSpec during . However, in order to recreate newMounter from volumeSpec, volume information are lacking. As a result, filesystem volume's reconstruction always fails. What you expected to happen: Filesystem volume's reconstruction works properly, then a volume is unmounted and detached from kubelet node. How to reproduce it (as minimally and precisely as possible): (1) Create filesystem volume using FC plugin (2) Restart kubelet service which a pod with FC volume is running Anything else we need to know?: cc Environment: Kubernetes version (use ):Install tools: local-cluster-
/assign
/sig storage
Change:
{Name: "container1"}, {Name: "container2"}, }, <ins> InitContainers: []api.Container{ {Name: "initcontainer1"}, }, }, Status: api.PodStatus{}, }, opts:        &api.PodLogOptions{}, expectedErr: errors.NewBadRequest("a container name must be specified for pod test, choose one of: [container1 container2] or one of the init containers: [initcontainer1]"), }, { in: &api.Pod{ Spec: api.PodSpec{ Containers: []api.Container{ {Name: "container1"}, {Name: "container2"}, }, </ins> }, Status: api.PodStatus{}, },

Discussion:
Im extracting logs part from The current behavior is as follow: when pod has one container return logs for this one container when pod has more than one container returns error: Error from server: a container name must be specified for pod kube-dns-v14-z0ho6, choose one of: [kubedns dnsmasq healthz] As you can see in both cases init containers are ignored. The question are: in first case should we return error and list all containers including init containers? in second case should we also list init containers?
first case is designed on purpose that way for the usability, especially the users who switch from docker single container to Kubernetes pod. But what you suggested above for the second case are great, we should do it. Mind to send pr fixing it? Thanks!
sure, I will prepare pr. I'm wondering if we should somehow distinguish init containers and normal containers. we can add to init container name but this may be misleading. we can also add second list with init containers. Something like these: Or just show all in one list without any changes. What do you think?
I prefer not introducing a prefix "init:" here. I like the second option better. cc/ WDYT?
I like the second option as well. We generally avoid prefixes or special syntax except in rare cases.
since I know you are also looking at code in these places.
+1 for the second option.
Change:
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet).Items maxPodCount := 10 <del> jobDuration := 1 * time.Hour </del> <ins> jobDuration := 30 * time.Minute </ins> linesPerPodPerSecond := 100 <del> testDuration := 21 * time.Hour </del> <ins> // TODO(crassirostris): Increase to 21 hrs testDuration := 3 * time.Hour </ins> ingestionTimeout := testDuration + 30*time.Minute allowedRestarts := int(math.Ceil(float64(testDuration) / float64(time.Hour) * maxAllowedRestartsPerHour))

Discussion:
There's a problem b/c pods are created to run on all nodes, but run sequentially, effectively multiplying testing time
Change:
<ins> apiVersion: v1beta3 kind: ReplicationController metadata: labels: name: openshift name: openshift spec: replicas: 1 selector: name: openshift template: metadata: labels: name: openshift spec: containers: - args: - start - master - --config=/config/master-config.yaml image: "openshift/origin" name: origin ports: - containerPort: 8443 name: openshift volumeMounts: - mountPath: /config name: config readOnly: true volumes: - name: config secret: secretName: openshift-config </ins>  No newline at end of file

Discussion:
This PR was prematurely merged: Need to update the PR based on the actual steps that were needed to get what was demonstrated at the public Kubernetes meet-up last week.
Any chance you can get rid of the hostPort from the example?
- depending on the Kubernetes provider, yes. For Vagrant based provider, I think I still need the hostPort because I do not have routes. For the GCE provider, I should be able to get rid of it because I have routes. In both providers, there were a number of setup steps that did not make the merged PR. For those that are tracking this issue (which I know folks have pinged me on separately) needs to be configured to allow privelaged containers needs to be configured to allow pushing to an insecure registry (this is point in time) Ideally, I could use a ReplicationController in the example to load balance OpenShift, but until we can provide a pattern to run etcd as a pod, I am unable to do this and need to use the embedded etcd we end up running.
Note: I will resolve this issue in 2 phases. Vagrant (which was demonstrated) to document using GCE (which has some additional steps on firewall rules)
Turns out OpenShift Origin is too secure now ;-) This is blocked until OpenShift Origin allows you to mint certs on the client, and then supply the certs on startup as a secret to the pod. This feature is coming soon. /cc
I now have all the required pieces to get this to work. I hope to get a PR submitted to fix this issue by end of this week.
Change:
func setOwnerReference(src metav1.OwnerReference) map[string]interface{} { ret := make(map[string]interface{}) <del> controllerPtr := src.Controller if controllerPtr != nil { controller := *controllerPtr controllerPtr = &controller } blockOwnerDeletionPtr := src.BlockOwnerDeletion if blockOwnerDeletionPtr != nil { blockOwnerDeletion := *blockOwnerDeletionPtr blockOwnerDeletionPtr = &blockOwnerDeletion } </del> setNestedField(ret, src.Kind, "kind") setNestedField(ret, src.Name, "name") setNestedField(ret, src.APIVersion, "apiVersion") setNestedField(ret, string(src.UID), "uid") <del> setNestedField(ret, controllerPtr, "controller") setNestedField(ret, blockOwnerDeletionPtr, "blockOwnerDeletion") </del> <ins> // json.Unmarshal() extracts boolean json fields as bool, not as *bool and hence extractOwnerReference() // expects bool or a missing field, not *bool. So if pointer is nil, fields are omitted from the ret object. // If pointer is non-nil, they are set to the referenced value. if src.Controller != nil { setNestedField(ret, *src.Controller, "controller") } if src.BlockOwnerDeletion != nil { setNestedField(ret, *src.BlockOwnerDeletion, "blockOwnerDeletion") } </ins> return ret }

Discussion:
Kubernetes version Code from master. What happened: does not return and fields after they are set to non-nil values using . How to reproduce it (as minimally and precisely as possible): See PR
/sig api-machinery
This is a good find and I don't think I saw the notification come through :(