jiebi/CodeConvo huggingface dataset:
Change:
The admission webhook review requests seem not to include a GVK in the raw object. It's included elsewhere in the review request, so it's generally not an issue, except that the unstructured codec requires GVKs to be present (it's not a technical requirement AFAICT, just a check done in the codec logic). This means that trying to use or on an Unstructured fails. A workaround in the mean time is to use , but it would be nice if this just worked properly (fixes to the review request logic and the unstructured codec logic. <details</summary</details<details</summary</detailsserving CA and certs (at and ) webhook with CA bundle `kubectl create -f that the output object doesn't have GVK in the field Environment: Kubernetes version (use ): master-ish () /sig api-machinery
when encoded to the wire, apiVersion and kind must always be included. do you have a gist handy of what the webhook receives for a built-in type (like a pod) and a for a custom resource?
Looks like custom objects (held in unstructured objects) would include GVK, but in-tree types would not. It might be as simple as explicitly setting the GVK in ConvertToGVK: and we need to update the webhook test to ensure objects in requests always have an apiVersion/kind
fixed in
/milestone v1.14 We're entering and this looks relevant to the 1.14 release. Please if I am incorrect

Discussion:
if err != nil { return nil, err } <ins> // Explicitly set the GVK out.GetObjectKind().SetGroupVersionKind(gvk) </ins> return out, nil }

}, gvk: examplev1.SchemeGroupVersion.WithKind("Pod"), expectedObj: &examplev1.Pod{ <ins> TypeMeta: metav1.TypeMeta{ APIVersion: "example.apiserver.k8s.io/v1", Kind:       "Pod", }, </ins> ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Labels: map[string]string{

}, gvk: example2v1.SchemeGroupVersion.WithKind("ReplicaSet"), expectedObj: &example2v1.ReplicaSet{ <ins> TypeMeta: metav1.TypeMeta{ APIVersion: "example2.apiserver.k8s.io/v1", Kind:       "ReplicaSet", }, </ins> ObjectMeta: metav1.ObjectMeta{ Name: "rs1", Labels: map[string]string{
Change:
What happened: When Node's iops is full, the Node status becomes to be NotReady. The NotReady message is "Container runtime is not ready". After our troubleshoot, we found func in cni package costs more then 30s, then the runtime status health check is failed : What you expected to happen: Node should still be in Ready status when iops is full. Because the CNI config files does not change. How to reproduce it (as minimally and precisely as possible): Run an application to fill disk IO bandwidth, then the Node becomes to be NotReady. Anything else we need to know?: Nothing yet. Environment: Runtime is dockershim. Other environment is no need to pay attention.
/assign /sig-node
/sig node /sig network

Discussion:
"//pkg/kubelet/container:go_default_library", "//pkg/kubelet/dockershim/network:go_default_library", "//pkg/util/bandwidth:go_default_library", <ins> "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", </ins> "//vendor/github.com/containernetworking/cni/libcni:go_default_library", "//vendor/github.com/containernetworking/cni/pkg/types:go_default_library", "//vendor/k8s.io/klog:go_default_library",

"sort" "strings" "sync" <ins> "time" </ins> "github.com/containernetworking/cni/libcni" cnitypes "github.com/containernetworking/cni/pkg/types" <ins> "k8s.io/apimachinery/pkg/util/wait" </ins> "k8s.io/klog" kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"

const ( CNIPluginName = "cni" <ins> // defaultSyncConfigPeriod is the default period to sync CNI config // TODO: consider making this value configurable or to be a more appropriate value. defaultSyncConfigPeriod = time.Second * 5 </ins> ) type cniNetworkPlugin struct {

plugin.host = host plugin.syncNetworkConfig() <ins> // start a goroutine to sync network config from confDir periodically to detect network config updates in every 5 seconds go wait.Forever(plugin.syncNetworkConfig, defaultSyncConfigPeriod) </ins> return nil }

} func (plugin *cniNetworkPlugin) Status() error { <del> // sync network config from confDir periodically to detect network config updates plugin.syncNetworkConfig() </del> // Can't set up pods if we don't have any CNI network configs yet return plugin.checkInitialized() }
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! If the matter is security related, please disclose it privately via --What happened: What you expected to happen: How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): master Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Others: /sig azure /assign

Discussion:
nodeName := types.NodeName(a.plugin.host.GetHostName()) diskName := volumeSource.DiskName <del> var lun int32 if runtime.GOOS == "windows" { </del> <ins> lun := int32(-1) if runtime.GOOS != "windows" { // on Linux, usually devicePath is like "/dev/disk/azure/scsi1/lun2", get LUN directly lun, err = getDiskLUN(devicePath) if err != nil { klog.V(2).Infof("azureDisk - WaitForAttach: getDiskLUN(%s) failed with error: %v", devicePath, err) } } if lun < 0 { </ins> klog.V(2).Infof("azureDisk - WaitForAttach: begin to GetDiskLun by diskName(%s), DataDiskURI(%s), nodeName(%s), devicePath(%s)", diskName, volumeSource.DataDiskURI, nodeName, devicePath) lun, err = diskController.GetDiskLun(diskName, volumeSource.DataDiskURI, nodeName)

return "", err } klog.V(2).Infof("azureDisk - WaitForAttach: GetDiskLun succeeded, got lun(%v)", lun) <del> } else { lun, err = getDiskLUN(devicePath) if err != nil { return "", err } </del> } exec := a.plugin.host.GetExec(a.plugin.GetPluginName())
Change:
this PR removed the script which can be used to run the integration tests. the following command is claimed to be a replacement: but instead it runs unrelated tests too. expecting the above command to only show the following output (run only kubeadm tests): /assign
GitHub didn't allow me to assign the following users: runyontr. 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 : this PR removed the script which can be used to run the integration tests. but instead it runs unrelated tests too. /assign </details
/sig cluster-lifecycle
/milestone v1.14 We're entering and this looks relevant to the 1.14 release. Please if I am incorrect
Hey! Gentle reminder that code freeze is this Friday. Since this is part of the 1.14 milestone, is it going to be resolved soon?
hopefully in the next couple of days. PR is here:

Discussion:
__EOF__ } <ins> # Run it if: # 1) $WHAT is empty # 2) $WHAT is not empty and kubeadm is part of $WHAT WHAT=${WHAT:-} if [[ ${WHAT} == "" || ${WHAT} =~ .*kubeadm.* ]] ; then kube::log::status "Running kubeadm tests" run_kubeadm_tests # if we ONLY want to run kubeadm, then exit here. if [[ ${WHAT} == "kubeadm" ]]; then kube::log::status "TESTS PASSED" exit 0 fi fi </ins> kube::log::status "Running kubectl tests for kube-apiserver" setup

# comment this out to save yourself from needlessly building here. make -C "${KUBE_ROOT}" WHAT=cmd/kubeadm <ins> #TODO(runyontr): Remove the the KUBE_TIMEOUT override when # kubernetes/kubeadm/issues/1430 is fixed </ins> make -C "${KUBE_ROOT}" test  WHAT=k8s.io/kubernetes/cmd/kubeadm/test/cmd  <del> KUBE_TEST_ARGS="--kubeadm-path '${KUBEADM_PATH}'" </del> <ins> KUBE_TEST_ARGS="--kubeadm-path '${KUBEADM_PATH}'"  KUBE_TIMEOUT="--timeout 600s" </ins> set +o nounset set +o errexit }  No newline at end of file

if [[ -n "${WHAT-}" ]]; then for pkg in ${WHAT} do <del> record_command run_${pkg}_tests </del> <ins> # running of kubeadm is captured in hack/make-targets/test-cmd.sh if [[ "${pkg}" != "kubeadm" ]]; then record_command run_${pkg}_tests fi </ins> done cleanup_tests return
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! If the matter is security related, please disclose it privately via --What happened: When service is set with ILB annotation and empty string subnet, e.g. The service would be pending forever with following error: What you expected to happen: ILB should be provisioned successfully. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Others: /sig azure /kind bug /assign
/milestone v1.14 We're entering and this looks relevant to the 1.14 release. Please if I am incorrect
Thanks

Discussion:
func subnet(service *v1.Service) *string { if requiresInternalLoadBalancer(service) { <del> if l, found := service.Annotations[ServiceAnnotationLoadBalancerInternalSubnet]; found { </del> <ins> if l, found := service.Annotations[ServiceAnnotationLoadBalancerInternalSubnet]; found && strings.TrimSpace(l) != "" { </ins> return &l } }

"github.com/Azure/go-autorest/autorest/to" "github.com/stretchr/testify/assert" "k8s.io/api/core/v1" <ins> metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" </ins> ) func TestFindProbe(t *testing.T) {

}) } } <ins> func TestSubnet(t *testing.T) { for i, c := range []struct { desc     string service  *v1.Service expected *string }{ { desc:     "No annotation should return nil", service:  &v1.Service{}, expected: nil, }, { desc: "annotation with subnet but no ILB should return nil", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ ServiceAnnotationLoadBalancerInternalSubnet: "subnet", }, }, }, expected: nil, }, { desc: "annotation with subnet but ILB=false should return nil", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ ServiceAnnotationLoadBalancerInternalSubnet: "subnet", ServiceAnnotationLoadBalancerInternal:       "false", }, }, }, expected: nil, }, { desc: "annotation with empty subnet should return nil", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ ServiceAnnotationLoadBalancerInternalSubnet: "", ServiceAnnotationLoadBalancerInternal:       "true", }, }, }, expected: nil, }, { desc: "annotation with subnet and ILB should return subnet", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ ServiceAnnotationLoadBalancerInternalSubnet: "subnet", ServiceAnnotationLoadBalancerInternal:       "true", }, }, }, expected: to.StringPtr("subnet"), }, } { real := subnet(c.service) assert.Equal(t, c.expected, real, fmt.Sprintf("TestCase[%d]: %s", i, c.desc)) } } </ins>
Change:
What happened: Containers cannot access Quobyte volumes provided via a Quobyte mount run by the Quobyte plugins mount command due to permission denied issues. Even if user mappings are provided these are ignored by the Quobyte client due to a missing mount flag. What you expected to happen: Access should work with the provided user mapping. How to reproduce it (as minimally and precisely as possible): Quobyte volumes without providing an externally managed plugin mount, thus allowing the Quobyte plugin to run the mount command. Quobyte based StorageClass, PVC and pod desc. the pod Anything else we need to know?: 'm preparing a pull request with a fix is to run an externally managed mount for the plugin, e.g. via a systemd unit or a k8s daemonset. Ensure that mount activates the allow-usermapping-in-volumename option. In this case the plugin uses the existing mount. Environment: not relevant. Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Others: /kind bug /sig storage
/assign
/milestone v1.14 We're entering and this looks relevant to the 1.14 release. Please if I am incorrect
Hello , I'm a bug triage shadow and I'd like to remind that code freeze is coming in 2 days (Friday, 8th March). :snowflake: Is it still planned for this issue to be fixed for 1.14?
I'm happy to merge this asap, ideas on how to bring this forward?

Discussion:
os.MkdirAll(dir, 0750) var options []string <ins> options = append(options, "allow-usermapping-in-volumename") </ins> if mounter.readOnly { options = append(options, "ro") }
Change:
What happened: In order to communicate with the target, the iscsi plugin creates a new iface. If for some reason an iface with the same name already exists in the node, this command will re-create it and no error will be reported. However, if the iface already exists and is being used by a session, this command will fail and report the error code 15 (). That's because it can't re-create the iface while it's in use by a session. What you expected to happen: The plugin could go ahead and use the existing iface instead of failing. How to reproduce it (as minimally and precisely as possible): pod1 pod2 Here, will re-use the session/iface from the step above. pod1 At this point, k8s will try to delete the session/iface used by pv1. However, it'll fail because the session is currently in use by pv2. pod1 Here the pod's status will be stuck at : Templates used: Anything else we need to know?: problem happens when a custom initiator is used, and it was reported to me that it's necessary in some set-ups in order to "restrict access to LUNs of the storage". to reproduce manually (assuming there's a session using the iface): /sig storage /CC
/assign
is this related to cc
If iface is reused, wouldn't it try to delete it once last volume (from kubelet perspective) is detached?
No

Discussion:
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//vendor/k8s.io/klog:go_default_library", <ins> "//vendor/k8s.io/utils/exec:go_default_library", </ins> "//vendor/k8s.io/utils/keymutex:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ],

"k8s.io/kubernetes/pkg/util/mount" "k8s.io/kubernetes/pkg/volume" volumeutil "k8s.io/kubernetes/pkg/volume/util" <ins> utilexec "k8s.io/utils/exec" </ins> ) const (

// How many seconds to wait for a multipath device if at least two paths are available. multipathDeviceTimeout = 10 <ins> // 'iscsiadm' error code stating that a session is logged in // See https://github.com/open-iscsi/open-iscsi/blob/7d121d12ad6ba7783308c25ffd338a9fa0cc402b/include/iscsi_err.h#L37-L38 iscsiadmErrorSessExists = 15 </ins> ) var (

// create new iface out, err = b.exec.Run("iscsiadm", "-m", "iface", "-I", newIface, "-o", "new") if err != nil { <del> lastErr = fmt.Errorf("iscsi: failed to create new iface: %s (%v)", string(out), err) return lastErr </del> <ins> exit, ok := err.(utilexec.ExitError) if ok && exit.ExitStatus() == iscsiadmErrorSessExists { klog.Infof("iscsi: there is a session already logged in with iface %s", newIface) } else { lastErr = fmt.Errorf("iscsi: failed to create new iface: %s (%v)", string(out), err) return lastErr } </ins> } // update new iface records for key, val := range params {
Change:
What would you like to be : e2e test suites for: PUT /api/v1/namespaces/{namespace}/resourcequotas/{name} DELETE /api/v1/namespaces/{namespace}/resourcequotas/{name} Why is this needed: The above APIs are not performed in current e2e test. By adding test for it, e2e test coverage is improved. /sig testing

Discussion:
err = waitForResourceQuota(f.ClientSet, f.Namespace.Name, resourceQuotaNotBestEffort.Name, usedResources) Expect(err).NotTo(HaveOccurred()) }) <ins> It("Should be able to update and delete ResourceQuota.", func() { client := f.ClientSet ns := f.Namespace.Name By("Creating a ResourceQuota") quotaName := "test-quota" resourceQuota := &v1.ResourceQuota{ Spec: v1.ResourceQuotaSpec{ Hard: v1.ResourceList{}, }, } resourceQuota.ObjectMeta.Name = quotaName resourceQuota.Spec.Hard[v1.ResourceCPU] = resource.MustParse("1") resourceQuota.Spec.Hard[v1.ResourceMemory] = resource.MustParse("500Mi") _, err := createResourceQuota(client, ns, resourceQuota) Expect(err).NotTo(HaveOccurred()) By("Getting a ResourceQuota") resourceQuotaResult, err := client.CoreV1().ResourceQuotas(ns).Get(quotaName, metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred()) Expect(resourceQuotaResult.Spec.Hard[v1.ResourceCPU]).To(Equal(resource.MustParse("1"))) Expect(resourceQuotaResult.Spec.Hard[v1.ResourceMemory]).To(Equal(resource.MustParse("500Mi"))) By("Updating a ResourceQuota") resourceQuota.Spec.Hard[v1.ResourceCPU] = resource.MustParse("2") resourceQuota.Spec.Hard[v1.ResourceMemory] = resource.MustParse("1Gi") resourceQuotaResult, err = client.CoreV1().ResourceQuotas(ns).Update(resourceQuota) Expect(err).NotTo(HaveOccurred()) Expect(resourceQuotaResult.Spec.Hard[v1.ResourceCPU]).To(Equal(resource.MustParse("2"))) Expect(resourceQuotaResult.Spec.Hard[v1.ResourceMemory]).To(Equal(resource.MustParse("1Gi"))) By("Verifying a ResourceQuota was modified") resourceQuotaResult, err = client.CoreV1().ResourceQuotas(ns).Get(quotaName, metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred()) Expect(resourceQuotaResult.Spec.Hard[v1.ResourceCPU]).To(Equal(resource.MustParse("2"))) Expect(resourceQuotaResult.Spec.Hard[v1.ResourceMemory]).To(Equal(resource.MustParse("1Gi"))) By("Deleting a ResourceQuota") err = deleteResourceQuota(client, ns, quotaName) Expect(err).NotTo(HaveOccurred()) By("Verifying the deleted ResourceQuota") _, err = client.CoreV1().ResourceQuotas(ns).Get(quotaName, metav1.GetOptions{}) Expect(errors.IsNotFound(err)).To(Equal(true)) }) </ins> }) var _ = SIGDescribe("ResourceQuota [Feature:ScopeSelectors]", func() {
Change:
What happened: When I create a pod with specified dnsConfig, the validation says my spec is invalid. And the error is like below: What you expected to happen: The spec should be accepted as it is totally fine to have trailing period. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): v1.12.3
Despite it's possible to have domains with trailing periods in the field of the , I agree with about this topic: FQDN and domains are different things. Maybe enforcing this in kubernetes is not a bad idea since the resolver seems to ignore the trailing dots.
let’s say you have name server A, and the serach domain at client has , when you try to resolve name abc, the client will send to name server A. Now what happened if nameserver A can not resolve , it is going to try to append its own searches, for example, name server has its searches as , then it tries to resolve (Depends on the ndots options, this may be allowed). Instead, if you have the trailing period in searches, the second try won’t happen.
what I'm trying to point out is that my understanding is that the and doesn't matter if you add a trailing dot or not to the domain used in the field, thus server A in your example is always going to receive a query to an FQDN and not going to do a recursive search. If you do a test in your system you can capture the traffic and check that the query is always the same with or without a traling dot. Anyway, adding domains with dots is allowed so you are right, only wanted to go deeper into this topic and shared my thoughts :)

Discussion:
allErrs = append(allErrs, field.Invalid(fldPath.Child("searches"), dnsConfig.Searches, "must not have more than 256 characters (including spaces) in the search list")) } for i, search := range dnsConfig.Searches { <ins> // it is fine to have a trailing dot if strings.HasSuffix(search, ".") { search = search[0 : len(search)-1] } </ins> allErrs = append(allErrs, ValidateDNS1123Subdomain(search, fldPath.Child("searches").Index(i))...) } // Validate options.

expectedError: false, }, { <ins> desc: "valid: 1 search path with trailing period", dnsConfig: &core.PodDNSConfig{ Searches: []string{"custom."}, }, expectedError: false, }, { </ins> desc: "valid: 3 nameservers and 6 search paths", dnsConfig: &core.PodDNSConfig{ Nameservers: []string{"127.0.0.1", "10.0.0.10", "8.8.8.8"}, <del> Searches:    []string{"custom", "mydomain.com", "local", "cluster.local", "svc.cluster.local", "default.svc.cluster.local"}, </del> <ins> Searches:    []string{"custom", "mydomain.com", "local", "cluster.local", "svc.cluster.local", "default.svc.cluster.local."}, </ins> }, expectedError: false, },
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! If the matter is security related, please disclose it privately via --What happened: Currently we cannot pull image from Azure Container Registry repo which provides anonymous pull access since when do image pull, it will always use service pincipal for .azurecr. What you expected to happen: How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): master Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Others: /sig azure /assign

Discussion:
cfg[url] = *cred } } <ins> // add ACR anonymous repo support: use empty username and password for anonymous access cfg["*.azurecr.*"] = credentialprovider.DockerConfigEntry{ Username: "", Password: "", Email:    dummyRegistryEmail, } </ins> return cfg }

creds := provider.Provide() <del> if len(creds) != len(result) { t.Errorf("Unexpected list: %v, expected length %d", creds, len(result)) </del> <ins> if len(creds) != len(result)+1 { t.Errorf("Unexpected list: %v, expected length %d", creds, len(result)+1) </ins> } for _, cred := range creds { <del> if cred.Username != "foo" { </del> <ins> if cred.Username != "" && cred.Username != "foo" { </ins> t.Errorf("expected 'foo' for username, saw: %v", cred.Username) } <del> if cred.Password != "bar" { </del> <ins> if cred.Password != "" && cred.Password != "bar" { </ins> t.Errorf("expected 'bar' for password, saw: %v", cred.Username) } }