jiebi/CodeConvo huggingface dataset:
Change:
In a recent discussion on , suggested to keep priority class names that start with "system-" for system use only and not allow user defined priority classes to start with this prefix. Given that we have reserved priority values 1 Billion for system use only, it makes sense to reserve a prefix as well to ensure that predefined priority classes won't conflict with user defined ones in the future. Is this a BUG REPORT or FEATURE REQUEST?: /kind feature /sig scheduling /assign ref

Discussion:
// that do not specify any priority class and there is no priority class // marked as default. DefaultPriorityWhenNoDefaultClassExists = 0 <ins> // SystemPriorityClassPrefix is the prefix reserved for system priority class names. Other priority // classes are not allowed to start with this prefix. SystemPriorityClassPrefix = "system-" </ins> ) // +genclient

package validation import ( <ins> "strings" </ins> "k8s.io/apimachinery/pkg/util/validation/field" apivalidation "k8s.io/kubernetes/pkg/apis/core/validation" "k8s.io/kubernetes/pkg/apis/scheduling" ) <del> // ValidatePriorityClassName can be used to check whether the given priority // class name is valid. var ValidatePriorityClassName = apivalidation.NameIsDNSSubdomain </del> <ins> // ValidatePriorityClassName checks whether the given priority class name is valid. func ValidatePriorityClassName(name string, prefix bool) []string { var allErrs []string if strings.HasPrefix(name, scheduling.SystemPriorityClassPrefix) { allErrs = append(allErrs, "priority class names with '"+scheduling.SystemPriorityClassPrefix+"' prefix are reserved for system use only") } allErrs = append(allErrs, apivalidation.NameIsDNSSubdomain(name, prefix)...) return allErrs } </ins> // ValidatePriorityClass tests whether required fields in the PriorityClass are // set correctly.

ObjectMeta: metav1.ObjectMeta{Name: "tier&1", Namespace: ""}, Value:      100, }, <ins> "invalid system name": { ObjectMeta: metav1.ObjectMeta{Name: scheduling.SystemPriorityClassPrefix + "test"}, Value:      100, }, </ins> } for k, v := range errorCases {

) // SystemPriorityClasses defines special priority classes which are used by system critical pods that should not be preempted by workload pods. <ins> // NOTE: In order to avoid conflict of names with user-defined priority classes, all the names must // start with scheduling.SystemPriorityClassPrefix which is by default "system-". </ins> var SystemPriorityClasses = map[string]int32{ "system-cluster-critical": SystemCriticalPriority, "system-node-critical":    SystemCriticalPriority + 1000,
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: The Kubernetes master created routes in the neutron router that assign an IPv6 nexthop for a IPv4 prefix. This is not possible and causes a reachability problem between the pods. Example route: What you expected to happen: When describing a node the master has the following information It should detect the address type and choose the correct InternalIP How to reproduce it (as minimally and precisely as possible): Deploy on a Openstack cloud with IPv6 enabled using the following playbook Anything else we need to know?: The wrong next hop is coming from calling the function and nowhere is a check if the address is IPv4 or IPv6 Environment: Kubernetes version (use ):Cloud provider or hardware configuration: Openstack OS (e.g. from /etc/os-release): Ubuntu Xenial Kernel (e.g. ):Install tools: Others: /sig openstack
- Thank you for this detailed analysis. Seems to me that the best way to address this would be to add an IP family argument to getAddressByName() to let it know what V4/V6 family to look for for a next-hop address. In the calls to getAddressByName(), this argument could be set based on the family of route.DestinationCIDR.
Issue is probably related.

Discussion:
"fmt" "io" "io/ioutil" <ins> "net" </ins> "net/http" "os" "regexp"

return nodeAddresses(srv) } <del> func getAddressByName(client *gophercloud.ServiceClient, name types.NodeName) (string, error) { </del> <ins> func getAddressByName(client *gophercloud.ServiceClient, name types.NodeName, needIPv6 bool) (string, error) { </ins> addrs, err := getAddressesByName(client, name) if err != nil { return "", err

} for _, addr := range addrs { <del> if addr.Type == v1.NodeInternalIP { </del> <ins> isIPv6 := net.ParseIP(addr.Address).To4() == nil if (addr.Type == v1.NodeInternalIP) && (isIPv6 == needIPv6) { </ins> return addr.Address, nil } } <del> return addrs[0].Address, nil </del> <ins> for _, addr := range addrs { isIPv6 := net.ParseIP(addr.Address).To4() == nil if (addr.Type == v1.NodeExternalIP) && (isIPv6 == needIPv6) { return addr.Address, nil } } // It should never return an address from a different IP Address family than the one needed return "", ErrNoAddressFound </ins> } // getAttachedInterfacesByID returns the node interfaces of the specified instance.

import ( "context" "errors" <ins> "net" </ins> "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers"

onFailure := newCaller() <del> addr, err := getAddressByName(r.compute, route.TargetNode) </del> <ins> ip, _, _ := net.ParseCIDR(route.DestinationCIDR) isCIDRv6 := ip.To4() == nil addr, err := getAddressByName(r.compute, route.TargetNode, isCIDRv6) </ins> if err != nil { return err }
Change:
Sometimes users do need to specify some kubelet flags, e.g. configure kubelet container runtime cgroup based on their environment. Currently, user can only specify kubelet args with a hidden env for kube- We should formalize the name exposed to user.
/cc

Discussion:
MASTER_EXTRA_METADATA=${KUBE_MASTER_EXTRA_METADATA:-${KUBE_EXTRA_METADATA:-}} # MASTER_EXTRA_METADATA is the extra instance metadata on node instance separated by commas. NODE_EXTRA_METADATA=${KUBE_NODE_EXTRA_METADATA:-${KUBE_EXTRA_METADATA:-}} <ins> # KUBELET_TEST_ARGS are extra arguments passed to kubelet. KUBELET_TEST_ARGS=${KUBE_KUBELET_EXTRA_ARGS:-} </ins> NETWORK=${KUBE_GCE_NETWORK:-default} # Enable network deletion by default (for kube-down), unless we're using 'default' network.
Change:
BUG REPORT: During the create workflow, Portworx native driver has the PVC namespace information. But this isn't getting passed to the Portworx Create API. As a result, the Portworx service side handler doesn't get the namespace information. It will also be helpful to send PVC annotations in the Create API call. /kind bug What happened: Portworx native driver didn't send PVC namespace to the Portworx Create API What you expected to happen: Portworx native driver should send the PVC namespace to the Portworx Create API
There are no sig labels on this issue. Please add a sig label. <detailsA sig label can be 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 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
I'll be fixing this issue in an upcoming PR.

Discussion:
) const ( <del> osdMgmtPort      = "9001" osdDriverVersion = "v1" pxdDriverName    = "pxd" pvcClaimLabel    = "pvc" pxServiceName    = "portworx-service" pxDriverName     = "pxd-sched" </del> <ins> osdMgmtPort       = "9001" osdDriverVersion  = "v1" pxdDriverName     = "pxd" pvcClaimLabel     = "pvc" pvcNamespaceLabel = "namespace" pxServiceName     = "portworx-service" pxDriverName      = "pxd-sched" </ins> ) type PortworxVolumeUtil struct {

// Add claim Name as a part of Portworx Volume Labels locator.VolumeLabels[pvcClaimLabel] = p.options.PVC.Name <ins> locator.VolumeLabels[pvcNamespaceLabel] = p.options.PVC.Namespace for k, v := range p.options.PVC.Annotations { if _, present := spec.VolumeLabels[k]; present { glog.Warningf("not saving annotation: %s=%s in spec labels due to an existing key", k, v) continue } spec.VolumeLabels[k] = v } </ins> volumeID, err := driver.Create(locator, source, spec) if err != nil { glog.Errorf("Error creating Portworx Volume : %v", err) <ins> return "", 0, nil, err </ins> } glog.Infof("Successfully created Portworx volume for PVC: %v", p.options.PVC.Name)
Change:
<!-- 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?: What happened: I created a static pod for etcd as following with vsphere as cloud provider: But the hostname is using upper name, and when kubelet start the etcd static pod, it will report error as follows: I think that the vsphere should not return upper case hostname, but only lower case hostname. 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 ): Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
/area cloudprovider
Here is a quick
/sig node

Discussion:
"//pkg/apis/core/validation:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/securitycontext:go_default_library", <ins> "//vendor/github.com/stretchr/testify/assert:go_default_library", </ins> "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",

"crypto/md5" "encoding/hex" "fmt" <ins> "strings" </ins> "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

// Generate a pod name that is unique among nodes by appending the nodeName. func generatePodName(name string, nodeName types.NodeName) string { <del> return fmt.Sprintf("%s-%s", name, nodeName) </del> <ins> return fmt.Sprintf("%s-%s", name, strings.ToLower(string(nodeName))) </ins> } func applyDefaults(pod *api.Pod, source string, isFile bool, nodeName types.NodeName) error {

"reflect" "testing" <ins> "github.com/stretchr/testify/assert" </ins> "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" <ins> "k8s.io/apimachinery/pkg/types" </ins> "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/testapi" <ins> "k8s.io/kubernetes/pkg/apis/core" </ins> api "k8s.io/kubernetes/pkg/apis/core" <ins> "k8s.io/kubernetes/pkg/apis/core/validation" </ins> "k8s.io/kubernetes/pkg/securitycontext" )

} } } <ins> func TestStaticPodNameGenerate(t *testing.T) { testCases := []struct { nodeName  types.NodeName podName   string expected  string overwrite string shouldErr bool }{ { "node1", "static-pod1", "static-pod1-node1", "", false, }, { "Node1", "static-pod1", "static-pod1-node1", "", false, }, { "NODE1", "static-pod1", "static-pod1-node1", "static-pod1-NODE1", true, }, } for _, c := range testCases { assert.Equal(t, c.expected, generatePodName(c.podName, c.nodeName), "wrong pod name generated") pod := &core.Pod{} pod.Name = c.podName if c.overwrite != "" { pod.Name = c.overwrite } errs := validation.ValidatePod(pod) if c.shouldErr { specNameErrored := false for _, err := range errs { if err.Field == "metadata.name" { specNameErrored = true } } assert.NotEmpty(t, specNameErrored, "expecting error") } else { for _, err := range errs { if err.Field == "metadata.name" { t.Fail() } } } } } </ins>
Change:
Is this a BUG REPORT or FEATURE REQUEST?: FEATURE /kind feature Implement InstanceShutdownByProviderID to AWS. InstanceShutdownByProviderID returns true if the instance is in safe state to detach volumes. Note: if instance is deleted we should not return error.
/sig aws
This is only when using the cloud-controller-manager, right?
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity. Reopen the issue with . Mark the issue as fresh with . Send feedback to sig-testing, kubernetes/test-infra and/or . /close

Discussion:
return extractNodeAddresses(instance) } <del> // InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running. </del> <ins> // InstanceExistsByProviderID returns true if the instance with the given provider id still exists. </ins> // If false is returned with no error, the instance will be immediately deleted by the cloud controller manager. func (c *Cloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error) { instanceID, err := kubernetesInstanceID(providerID).mapToAWSInstanceID()

return false, fmt.Errorf("multiple instances found for instance: %s", instanceID) } <del> state := instances[0].State.Name if *state != "running" { glog.Warningf("the instance %s is not running", instanceID) return false, nil } </del> return true, nil } // InstanceShutdownByProviderID returns true if the instance is in safe state to detach volumes func (c *Cloud) InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error) { <del> return false, cloudprovider.NotImplemented </del> <ins> instanceID, err := kubernetesInstanceID(providerID).mapToAWSInstanceID() if err != nil { return false, err } request := &ec2.DescribeInstancesInput{ InstanceIds: []*string{instanceID.awsString()}, } instances, err := c.ec2.DescribeInstances(request) if err != nil { return false, err } if len(instances) == 0 { glog.Warningf("the instance %s does not exist anymore", providerID) return true, nil } if len(instances) > 1 { return false, fmt.Errorf("multiple instances found for instance: %s", instanceID) } instance := instances[0] if instance.State != nil { state := aws.StringValue(instance.State.Name) // valid state for detaching volumes if state == ec2.InstanceStateNameStopped || state == ec2.InstanceStateNameTerminated { return true, nil } } return false, nil </ins> } // InstanceID returns the cloud provider ID of the node with the specified nodeName.
Change:
This flaked 3/4 times in the last week. /priority failing-test /priority important-soon /sig api-machinery /kind flake
/assign
Pinging here for latest status on this. This test is now one of our top flakes failing pull-kubernetes-e2e-gce job 40 times.
Here's the latest test run results for this test to get more logs. https://k8s-
The error message is really similar to the one in I'm looking into if the fix for that will also be sufficient to fix this.
We may want to reopen this until the fix is shown to actually work /reopen
Thanks for taking care of this. I will monitor this test and ping you back here to close when appropriate.
No failure 2 days since the fix. the fix seemed to have worked. So please go ahead and close the issue. Thanks much.
/close

Discussion:
Name: "should-be-removable-validating-webhook.k8s.io", Rules: []v1beta1.RuleWithOperations{{ Operations: []v1beta1.OperationType{v1beta1.Create}, <ins> // This will not match any real resources so this webhook should never be called. </ins> Rule: v1beta1.Rule{ <del> APIGroups:   []string{"*"}, APIVersions: []string{"*"}, Resources:   []string{"*"}, </del> <ins> APIGroups:   []string{""}, APIVersions: []string{"v1"}, Resources:   []string{"invalid"}, </ins> }, }}, ClientConfig: v1beta1.WebhookClientConfig{

Name: "should-be-removable-mutating-webhook.k8s.io", Rules: []v1beta1.RuleWithOperations{{ Operations: []v1beta1.OperationType{v1beta1.Create}, <ins> // This will not match any real resources so this webhook should never be called. </ins> Rule: v1beta1.Rule{ <del> APIGroups:   []string{"*"}, APIVersions: []string{"*"}, Resources:   []string{"*"}, </del> <ins> APIGroups:   []string{""}, APIVersions: []string{"v1"}, Resources:   []string{"invalid"}, </ins> }, }}, ClientConfig: v1beta1.WebhookClientConfig{
Change:
We the into the field of audit events. This was done to capture the response status even when the response is omitted, but results in (potentially large) duplicate data being sent. In some examples, the status message is repeated in the status details, resulting in a long message being duplicated 4 times. I suggest that rather than copying the whole ResponseStatus, we selectively copy the bounded fields, specifically: status reason code Note that this is a breaking change, and if there is agreement should be done before graduating audit to stable. /kind bug /sig auth /priority important-soon
/cc
Could you go ahead and add "approved-for-milestone" label to this, as well as status? That will help it stay in the milestone if this is a 1.10 blocker. Thanks!
Moving it to 1.11, together with graduating audit logging API to stable
/sig auth /kind bug /milestone v1.11 /priority important-soon /status approved-for-milestone
[MILESTONENOTIFIER] Milestone Issue: Up-to-date for process <details open<summaryIssue Labels</summary- : Issue will be escalated to these SIGs if needed. : Escalate to the issue owners and SIG owner; move out of milestone after several unsuccessful escalation attempts. : Fixes a bug discovered during the current release. </details<details<summaryHelp</summary<ul<li<a href=""Additional instructions</a</li<li<a href=""Commands for setting labels</a</li</ul</details
No one is working on this? Mind if I assign it?
status check? This has maybe gone dormant. Is it still targeting 1.11?
Yes.

Discussion:
return } if status, ok := obj.(*metav1.Status); ok { <del> ae.ResponseStatus = status </del> <ins> // selectively copy the bounded fields. ae.ResponseStatus = &metav1.Status{ Status: status.Status, Reason: status.Reason, Code:   status.Code, } </ins> } if ae.Level.Less(auditinternal.LevelRequestResponse) {
Change:
<!-- 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?: What happened: Windows containers creation failed because of rslave mounts. What you expected to happen: Windows containers don't support mount propagation, we should disable it for windows. 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. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
/sig windows
What's your pod config for mount?
if you agree with this as a blocker for 1.10, could you go ahead and add "approved-for-milestone" label to this, as well as status? That will help it stay in the milestone.
/status approved-for-milestone
Any pods on Windows would meet same issue. It defaults to rslave now on master branch.

Discussion:
// translateMountPropagation transforms v1.MountPropagationMode to // runtimeapi.MountPropagation. func translateMountPropagation(mountMode *v1.MountPropagationMode) (runtimeapi.MountPropagation, error) { <ins> if runtime.GOOS == "windows" { // Windows containers doesn't support mount propagation, use private for it. // Refer https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation. return runtimeapi.MountPropagation_PROPAGATION_PRIVATE, nil } </ins> if !utilfeature.DefaultFeatureGate.Enabled(features.MountPropagation) { // mount propagation is disabled, use private as in the old versions return runtimeapi.MountPropagation_PROPAGATION_PRIVATE, nil
Change:
<!-- 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?: /kind bug /sig cli What happened: Currently xxxOptions does not get bound as default value for some flags, which may bring in potential risks/bugs for some commands. Such as , Here the default value for flag will always be an empty string, regardless of the actual value of . Already discussed this potential bug with in Slack. This issue is used to track those cleanup items. [x] flag value bindings for kubectl attach/convert/delete/drain/edit/exec commands ( ) [x] flag value bindings for kubectl apply commands ( ) [x] flag value bindings for kubectl label/patch/taint/top commands ( ) [x] flag value bindings for kubectl create/get/set commands () [x] kubectl: flag value bindings for common utils ( )
/assign
/cc
This is a really good bit of cleanup and I'm glad to see the pulls.
/priority important-longterm
/reopen
[MILESTONENOTIFIER] Milestone Issue Needs Approval Action required: This issue must have the label applied by a SIG maintainer. If the label is not applied within 7 days, the issue will be moved out of the v1.11 milestone. <details<summaryIssue Labels</summary- : Issue will be escalated to these SIGs if needed. : Escalate to the issue owners; move out of the milestone after 1 attempt. : Fixes a bug discovered during the current release. </details<details<summaryHelp</summary<ul<li<a href=""Additional instructions</a</li<li<a href=""Commands for setting labels</a</li</ul</details
/close All the fixes have been merged.
Thanks

Discussion:
func NewCmdDescribe(f cmdutil.Factory, out, cmdErr io.Writer) *cobra.Command { options := &resource.FilenameOptions{} <del> describerSettings := &printers.DescriberSettings{} </del> <ins> describerSettings := &printers.DescriberSettings{ ShowEvents: true, } </ins> // TODO: this should come from the factory, and may need to be loaded from the server, and so is probably //   going to have to be removed

cmdutil.AddFilenameOptionFlags(cmd, options, usage) cmd.Flags().StringP("selector", "l", "", "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)") cmd.Flags().Bool("all-namespaces", false, "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.") <del> cmd.Flags().BoolVar(&describerSettings.ShowEvents, "show-events", true, "If true, display events related to the described object.") </del> <ins> cmd.Flags().BoolVar(&describerSettings.ShowEvents, "show-events", describerSettings.ShowEvents, "If true, display events related to the described object.") </ins> cmdutil.AddInclude3rdPartyFlags(cmd) cmdutil.AddIncludeUninitializedFlag(cmd) return cmd
Change:
https://k8s- /priority failing-test /kind bug /status approved-for-milestone /sig network cc
Fix was opened as
thanks!
Test is still flaky even after the fix. I will take a further look. cc
/assign
looks like now it start to fail on a lot of L7 LB tests
That seems to be a different failure:
The new failure was introduced by When a nil error is passed into , test will panic: Sent for fixing. cc

Discussion:
// differentiate probable errors in connection behavior between normal "this is // disconnected" should use the method. func IsProbableEOF(err error) bool { <ins> if err == nil { return false } </ins> if uerr, ok := err.(*url.Error); ok { err = uerr.Err }