jiebi/CodeConvo huggingface dataset:
Code change:
kubectl 0.17.0: curl http://localhost:8080/api/v1beta3/minions { "kind": "Status", "apiVersion": "v1beta3", "metadata": {}, "status": "Failure", "message": "the server could not find the requested resource", "reason": "NotFound", "details": {}, "code": 404 } master3 core # /opt/bin/kubectl get mi master3 core # kubectl 0.16.0: uses: http://localhost:8080/api/v1beta1/minions master3 core # ./kubectl get mi NAME LABELS STATUS 192.168.10.70 <noneReady 192.168.10.71 <noneReady in the same time curl http://localhost:8080/api/v1beta3/nodes works well.
Shall we just remove "minion" from kubectl now and throw an error?
remove "minions"?
Yes, that should be part of . cc
Presumably works?
Assigning who's working on
Ref
Could you please take a look at this?

Related discussion:
text: package kubectl import ( <ins> "fmt" </ins> "strings" "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
Code change:
kubectl 0.17.0: curl http://localhost:8080/api/v1beta3/minions { "kind": "Status", "apiVersion": "v1beta3", "metadata": {}, "status": "Failure", "message": "the server could not find the requested resource", "reason": "NotFound", "details": {}, "code": 404 } master3 core # /opt/bin/kubectl get mi master3 core # kubectl 0.16.0: uses: http://localhost:8080/api/v1beta1/minions master3 core # ./kubectl get mi NAME LABELS STATUS 192.168.10.70 <noneReady 192.168.10.71 <noneReady in the same time curl http://localhost:8080/api/v1beta3/nodes works well.
Shall we just remove "minion" from kubectl now and throw an error?
remove "minions"?
Yes, that should be part of . cc
Presumably works?
Assigning who's working on
Ref
Could you please take a look at this?

Related discussion:
text: // mapper. func (e ShortcutExpander) VersionAndKindForResource(resource string) (defaultVersion, kind string, err error) { resource = expandResourceShortcut(resource) <del> return e.RESTMapper.VersionAndKindForResource(resource) </del> <ins> defaultVersion, kind, err = e.RESTMapper.VersionAndKindForResource(resource) // TODO: remove this once v1beta1 and v1beta2 are deprecated if err == nil && kind == "Minion" { err = fmt.Errorf("Alias minion(s) is deprecated. Use node(s) instead") } return defaultVersion, kind, err </ins> } // expandResourceShortcut will return the expanded version of resource
Code change:
kubectl 0.17.0: curl http://localhost:8080/api/v1beta3/minions { "kind": "Status", "apiVersion": "v1beta3", "metadata": {}, "status": "Failure", "message": "the server could not find the requested resource", "reason": "NotFound", "details": {}, "code": 404 } master3 core # /opt/bin/kubectl get mi master3 core # kubectl 0.16.0: uses: http://localhost:8080/api/v1beta1/minions master3 core # ./kubectl get mi NAME LABELS STATUS 192.168.10.70 <noneReady 192.168.10.71 <noneReady in the same time curl http://localhost:8080/api/v1beta3/nodes works well.
Shall we just remove "minion" from kubectl now and throw an error?
remove "minions"?
Yes, that should be part of . cc
Presumably works?
Assigning who's working on
Ref
Could you please take a look at this?

Related discussion:
text: "cs":     "componentstatuses", "ev":     "events", "limits": "limitRanges", <del> "mi":     "minions", </del> <ins> "no":     "nodes", </ins> "po":     "pods", "pv":     "persistentVolumes", "pvc":    "persistentVolumeClaims",
Code change:
If a pod is not scheduled because it cannot find a fit, you run into really ugly event output like the following: This makes the output of horrific to work with. A better event would just read: The pod is known from the involved object already so no need to encode it all.

Related discussion:
text: // implementation of the error interface func (f *FitError) Error() string { <del> output := fmt.Sprintf("failed to find fit for pod: %v", f.Pod) </del> <ins> output := fmt.Sprintf("failed to find fit for pod, ") </ins> for node, predicateList := range f.FailedPredicates { output = output + fmt.Sprintf("Node %s: %s", node, strings.Join(predicateList.List(), ",")) }
Code change:
The following lines are incorrect. Set your cluster as the default cluster to use: - Also the whole section is not so appropriate when it comes to issue. After all, certificate authentication works well without such token thing. Why trouble adding parm?

Related discussion:
text: - `kubectl config set-cluster $CLUSTER_NAME --server=http://$MASTER_IP --insecure-skip-tls-verify=true` - Otherwise, do this to set the apiserver ip, client certs, and user credentials. - `kubectl config set-cluster $CLUSTER_NAME --certificate-authority=$CA_CERT --embed-certs=true --server=https://$MASTER_IP` <del> - `kubectl config set-credentials $CLUSTER_NAME --client-certificate=$CLI_CERT --client-key=$CLI_KEY --embed-certs=true --token=$TOKEN` </del> <ins> - `kubectl config set-credentials $USER --client-certificate=$CLI_CERT --client-key=$CLI_KEY --embed-certs=true --token=$TOKEN` </ins> - Set your cluster as the default cluster to use: <del> - `kubectl config set-context $CLUSTER_NAME --cluster=$CLUSTER_NAME --user=admin` - `kubectl config use-context $CONTEXT  --cluster=$CONTEXT` </del> <ins> - `kubectl config set-context $CONTEXT_NAME --cluster=$CLUSTER_NAME --user=$USER` - `kubectl config use-context $CONTEXT_NAME` </ins> Next, make a kubeconfig file for the kubelets and kube-proxy.  There are a couple of options for how many distinct files to make:
Code change:
When I'm accessing persistentVolumes and persistentVolumeClaims, I'm getting nil instead of empty list of items, as happening in other entities when there are no items. { "kind": "PersistentVolumeList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/persistentvolumes", "resourceVersion": "" } }
Yes, this seems like a bug. I see an empty list when I access pods: And items is nil when I access persistent volumes:
Items shouldn't be tagged with omitempty:
cc
PersistentVolumeList and PersistentVolumeClaimList appear to be the only resource types with this problem.
Please see for fix.

Related discussion:
text: "os" "time" <del> kube_client "github.com/GoogleCloudPlatform/kubernetes/pkg/client" </del> <ins> "github.com/GoogleCloudPlatform/kubernetes/pkg/client" </ins> "github.com/GoogleCloudPlatform/kubernetes/pkg/registry" "github.com/GoogleCloudPlatform/kubernetes/pkg/util" "github.com/coreos/go-etcd/etcd"
Code change:
When I'm accessing persistentVolumes and persistentVolumeClaims, I'm getting nil instead of empty list of items, as happening in other entities when there are no items. { "kind": "PersistentVolumeList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/persistentvolumes", "resourceVersion": "" } }
Yes, this seems like a bug. I see an empty list when I access pods: And items is nil when I access persistent volumes:
Items shouldn't be tagged with omitempty:
cc
PersistentVolumeList and PersistentVolumeClaimList appear to be the only resource types with this problem.
Please see for fix.

Related discussion:
text: etcd.SetLogger(log.New(os.Stderr, "etcd ", log.LstdFlags)) controllerManager := registry.MakeReplicationManager(etcd.NewClient([]string{*etcd_servers}), <del> kube_client.Client{ </del> <ins> client.Client{ </ins> Host: "http://" + *master, })
Code change:
When I'm accessing persistentVolumes and persistentVolumeClaims, I'm getting nil instead of empty list of items, as happening in other entities when there are no items. { "kind": "PersistentVolumeList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/persistentvolumes", "resourceVersion": "" } }
Yes, this seems like a bug. I see an empty list when I access pods: And items is nil when I access persistent volumes:
Items shouldn't be tagged with omitempty:
cc
PersistentVolumeList and PersistentVolumeClaimList appear to be the only resource types with this problem.
Please see for fix.

Related discussion:
text: var ( file               = flag.String("config", "", "Path to the config file") <del> etcd_servers       = flag.String("etcd_servers", "", "Url of etcd servers in the cluster") </del> <ins> etcdServers        = flag.String("etcd_servers", "", "Url of etcd servers in the cluster") </ins> syncFrequency      = flag.Duration("sync_frequency", 10*time.Second, "Max period between synchronizing running containers and config") fileCheckFrequency = flag.Duration("file_check_frequency", 20*time.Second, "Duration between checking file for new data") httpCheckFrequency = flag.Duration("http_check_frequency", 20*time.Second, "Duration between checking http for new data") <del> manifest_url       = flag.String("manifest_url", "", "URL for accessing the container manifest") </del> <ins> manifestUrl        = flag.String("manifest_url", "", "URL for accessing the container manifest") </ins> address            = flag.String("address", "127.0.0.1", "The address for the info server to serve on") port               = flag.Uint("port", 10250, "The port for the info server to serve on") <ins> hostnameOverride   = flag.String("hostname_override", "", "If non-empty, will use this string as identification instead of the actual hostname.") </ins> ) const dockerBinary = "/usr/bin/docker"
Code change:
When I'm accessing persistentVolumes and persistentVolumeClaims, I'm getting nil instead of empty list of items, as happening in other entities when there are no items. { "kind": "PersistentVolumeList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/persistentvolumes", "resourceVersion": "" } }
Yes, this seems like a bug. I see an empty list when I access pods: And items is nil when I access persistent volumes:
Items shouldn't be tagged with omitempty:
cc
PersistentVolumeList and PersistentVolumeClaimList appear to be the only resource types with this problem.
Please see for fix.

Related discussion:
text: log.Fatal("Couldn't connnect to docker.") } <del> hostname, err := exec.Command("hostname", "-f").Output() if err != nil { log.Fatalf("Couldn't determine hostname: %v", err) </del> <ins> hostname := []byte(*hostnameOverride) if string(hostname) == "" { hostname, err = exec.Command("hostname", "-f").Output() if err != nil { log.Fatalf("Couldn't determine hostname: %v", err) } </ins> } my_kubelet := kubelet.Kubelet{
Code change:
When I'm accessing persistentVolumes and persistentVolumeClaims, I'm getting nil instead of empty list of items, as happening in other entities when there are no items. { "kind": "PersistentVolumeList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/persistentvolumes", "resourceVersion": "" } }
Yes, this seems like a bug. I see an empty list when I access pods: And items is nil when I access persistent volumes:
Items shouldn't be tagged with omitempty:
cc
PersistentVolumeList and PersistentVolumeClaimList appear to be the only resource types with this problem.
Please see for fix.

Related discussion:
text: SyncFrequency:      *syncFrequency, HTTPCheckFrequency: *httpCheckFrequency, } <del> my_kubelet.RunKubelet(*file, *manifest_url, *etcd_servers, *address, *port) </del> <ins> my_kubelet.RunKubelet(*file, *manifestUrl, *etcdServers, *address, *port) </ins> }
Code change:
When I'm accessing persistentVolumes and persistentVolumeClaims, I'm getting nil instead of empty list of items, as happening in other entities when there are no items. { "kind": "PersistentVolumeList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/persistentvolumes", "resourceVersion": "" } }
Yes, this seems like a bug. I see an empty list when I access pods: And items is nil when I access persistent volumes:
Items shouldn't be tagged with omitempty:
cc
PersistentVolumeList and PersistentVolumeClaimList appear to be the only resource types with this problem.
Please see for fix.

Related discussion:
text: <ins> #!/bin/bash # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #     http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # This command builds and runs a local kubernetes cluster. It's just like # local-up.sh, but this one launches the three separate binaries. # You may need to run this as root to allow kubelet to open docker's socket. if [ "$(which etcd)" == "" ]; then echo "etcd must be in your PATH" exit 1 fi # Stop right away if the build fails set -e $(dirname $0)/build-go.sh echo "Starting etcd" ETCD_DIR=$(mktemp -d -t kube-integration.XXXXXX) trap "rm -rf ${ETCD_DIR}" EXIT etcd -name test -data-dir ${ETCD_DIR} &> /tmp/etcd.log & ETCD_PID=$! sleep 5 # Shut down anyway if there's an error. set +e API_PORT=8080 KUBELET_PORT=10250 $(dirname $0)/../output/go/apiserver  --address="127.0.0.1"  --port="${API_PORT}"  --etcd_servers="http://127.0.0.1:4001"  --machines="127.0.0.1" &> /tmp/apiserver.log & APISERVER_PID=$! $(dirname $0)/../output/go/controller-manager  --etcd_servers="http://127.0.0.1:4001"  --master="127.0.0.1:${API_PORT}" &> /tmp/controller-manager.log & CTLRMGR_PID=$! $(dirname $0)/../output/go/kubelet  --etcd_servers="http://127.0.0.1:4001"  --hostname_override="127.0.0.1"  --address="127.0.0.1"  --port="$KUBELET_PORT" &> /tmp/kubelet.log & KUBELET_PID=$! echo "Local Kubernetes cluster is running. Press enter to shut it down." read unused kill ${APISERVER_PID} kill ${CTLRMGR_PID} kill ${KUBELET_PID} kill ${ETCD_PID} </ins>
Code change:
I0921 20:36:33. ] Could not connect to D-Bus system bus: %sdial unix /var/run/dbus/systembussocket: connect: no such file or directory

Related discussion:
text: func (runner *runner) connectToFirewallD() { bus, err := runner.dbus.SystemBus() if err != nil { <del> glog.V(1).Info("Could not connect to D-Bus system bus: %s", err) </del> <ins> glog.V(1).Infof("Could not connect to D-Bus system bus: %s", err) </ins> return }
Code change:
We should be testing the reliability of a long-running cluster. These tests kill/restart components or nodes in the cluster, defeating the purpose of a soak cluster.
Example tests: NodessResize Services.restarting DaemonRestart NodessResize Reboot Etcd failure
Agreed. Some of them already seem to be skipped: GCESOAKCONTINUOUSSKIPTESTS=( "Density.30spods" "Elasticsearch" "Etcd.SIGKILL" "externalsloadsbalancer" "identicallysnamedsservices" "networkspartition" "Services.Typesgoessfrom" ) Q
FYI
It'd be hard to prevent regression as more tests are . It might be better if we explicitly define a set of DISRUPTIVETESTS, and include them wherever needed, e.g., GCEPARALLELSKIPTESTS and GCESOAKCONTINUOUSSKIPTESTS. That way, people who are adding tests will be aware of the category. WDYT?
Agreed, that seems like a good idea. Want to send in a PR? Or at least open an issue?

Related discussion:
text: "experimentalsresourcesusagestracking" # Expect --max-pods=100 ) <ins> # Tests which kills or restarts components and/or nodes. DISRUPTIVE_TESTS=( "DaemonRestart" "Etcdsfailure" "NodessResize" "Reboot" "Services.*restarting" ) </ins> # The following tests are known to be flaky, and are thus run only in their own # -flaky- build variants. GCE_FLAKY_TESTS=(
Code change:
We should be testing the reliability of a long-running cluster. These tests kill/restart components or nodes in the cluster, defeating the purpose of a soak cluster.
Example tests: NodessResize Services.restarting DaemonRestart NodessResize Reboot Etcd failure
Agreed. Some of them already seem to be skipped: GCESOAKCONTINUOUSSKIPTESTS=( "Density.30spods" "Elasticsearch" "Etcd.SIGKILL" "externalsloadsbalancer" "identicallysnamedsservices" "networkspartition" "Services.Typesgoessfrom" ) Q
FYI
It'd be hard to prevent regression as more tests are . It might be better if we explicitly define a set of DISRUPTIVETESTS, and include them wherever needed, e.g., GCEPARALLELSKIPTESTS and GCESOAKCONTINUOUSSKIPTESTS. That way, people who are adding tests will be aware of the category. WDYT?
Agreed, that seems like a good idea. Want to send in a PR? Or at least open an issue?

Related discussion:
text: # Tests which are not able to be run in parallel. GCE_PARALLEL_SKIP_TESTS=( <del> "Etcd" "NetworkingNew" </del> "NodessNetwork" <del> "NodessResize" </del> "MaxPods" "Resourcesusagesofssystemscontainers" "SchedulerPredicates" <del> "Services.*restarting" </del> "resourcesusagestracking" <ins> "${DISRUPTIVE_TESTS[@]}" </ins> ) # Tests which are known to be flaky when run in parallel.
Code change:
We should be testing the reliability of a long-running cluster. These tests kill/restart components or nodes in the cluster, defeating the purpose of a soak cluster.
Example tests: NodessResize Services.restarting DaemonRestart NodessResize Reboot Etcd failure
Agreed. Some of them already seem to be skipped: GCESOAKCONTINUOUSSKIPTESTS=( "Density.30spods" "Elasticsearch" "Etcd.SIGKILL" "externalsloadsbalancer" "identicallysnamedsservices" "networkspartition" "Services.Typesgoessfrom" ) Q
FYI
It'd be hard to prevent regression as more tests are . It might be better if we explicitly define a set of DISRUPTIVETESTS, and include them wherever needed, e.g., GCEPARALLELSKIPTESTS and GCESOAKCONTINUOUSSKIPTESTS. That way, people who are adding tests will be aware of the category. WDYT?
Agreed, that seems like a good idea. Want to send in a PR? Or at least open an issue?

Related discussion:
text: GCE_SOAK_CONTINUOUS_SKIP_TESTS=( "Density.*30spods" "Elasticsearch" <del> "Etcd.*SIGKILL" </del> "externalsloadsbalancer" "identicallysnamedsservices" "networkspartition" "Services.*Typesgoessfrom" <ins> "${DISRUPTIVE_TESTS[@]}"       # avoid component restarts. </ins> ) GCE_RELEASE_SKIP_TESTS=(
Code change:
The desciption of --all-namespaces is listing the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace." But when I used the following command: error: namespace may not be empty when retrieving a resource by name no namespace set on resource pods "counter" The error messages are unclear, and the second message isn't labeled as an error even.
And why couldn't use --all-namespaces flag?
You're asking for a specific pod name (counter) in all namespaces, which is a nonsensical query. The pod name is not a grep-like filter, it's a specific name. Yeah, the errors could be better. Describe could work, but potentially generates a LOT of information and API calls.
But I found the following API is supported now. Get The result is: has the more information. Do we need to support the following kubectl command(using the above API) or just return clear error messages? get pods counter --all-namespaces
I'd be ok with this being implemented via the field selector.
The issue is still here :). What's our expected result? I'd like to contribute this.
, after check the code, the URL was built by ; do you mean we should update it; or avoid to use , instead, build url () directly.
After checking the code, it's better to add fieldSelector to , is created for fieldSelector. Will submit a PR based on .
getting an object with a particular name across all namespaces seems like something we shouldn't encourage... it breaks the assumption of namespace independence.
, so we'll only update message for this issue? for example:
Disagree. Need easy way to troubleshouting the problem "why pods is stuck in Pending status". It's tiring for every pod to find who created it and in which namespace. In the logs there is only the name of the pod.
Now, with field selectors we can do To further my understanding, I'd ask:- doesn't itself break independence? One can search by label across all namespaces, it feels funny for by name to be special.

Related discussion:
text: # Clean up kubectl delete namespace my-namespace <del> ############## </del> <ins> ###################### </ins> # Pods in Namespaces # <del> ############## </del> <ins> ###################### </ins> ### Create a new namespace # Pre-condition: the other namespace does not exist
Code change:
The desciption of --all-namespaces is listing the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace." But when I used the following command: error: namespace may not be empty when retrieving a resource by name no namespace set on resource pods "counter" The error messages are unclear, and the second message isn't labeled as an error even.
And why couldn't use --all-namespaces flag?
You're asking for a specific pod name (counter) in all namespaces, which is a nonsensical query. The pod name is not a grep-like filter, it's a specific name. Yeah, the errors could be better. Describe could work, but potentially generates a LOT of information and API calls.
But I found the following API is supported now. Get The result is: has the more information. Do we need to support the following kubectl command(using the above API) or just return clear error messages? get pods counter --all-namespaces
I'd be ok with this being implemented via the field selector.
The issue is still here :). What's our expected result? I'd like to contribute this.
, after check the code, the URL was built by ; do you mean we should update it; or avoid to use , instead, build url () directly.
After checking the code, it's better to add fieldSelector to , is created for fieldSelector. Will submit a PR based on .
getting an object with a particular name across all namespaces seems like something we shouldn't encourage... it breaks the assumption of namespace independence.
, so we'll only update message for this issue? for example:
Disagree. Need easy way to troubleshouting the problem "why pods is stuck in Pending status". It's tiring for every pod to find who created it and in which namespace. In the logs there is only the name of the pod.
Now, with field selectors we can do To further my understanding, I'd ask:- doesn't itself break independence? One can search by label across all namespaces, it feels funny for by name to be special.

Related discussion:
text: kube::test::get_object_assert 'pods --namespace=other' "{{range.items}}{{$id_field}}:{{end}}" 'valid-pod:' # Post-condition: verify shorthand `-n other` has the same results as `--namespace=other` kube::test::get_object_assert 'pods -n other' "{{range.items}}{{$id_field}}:{{end}}" 'valid-pod:' <ins> # Post-condition: a resource cannot be retrieved by name across all namespaces output_message=$(! kubectl get "${kube_flags[@]}" pod valid-pod --all-namespaces 2>&1) kube::test::if_has_string "${output_message}" "a resource cannot be retrieved by name across all namespaces" </ins> ### Delete POD valid-pod in specific namespace # Pre-condition: valid-pod POD exists