jiebi/CodeConvo huggingface dataset:
{% set test_args=pillar['kubeproxy_test_args'] %} {% endif -%} <del> DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{kubeconfig}} {{pillar['log_level']}}" </del> # test_args has to be kept at the end, so they'll overwrite any prior configuration <del> DAEMON_ARGS="$DAEMON_ARGS + {{test_args}}" </del> <ins> DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{kubeconfig}} {{pillar['log_level']}} {{test_args}}" </ins>
{% set test_args=pillar['kubelet_test_args'] %} {% endif -%} <del> DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} {{manifest_url}} --allow_privileged={{pillar['allow_privileged']}} {{pillar['log_level']}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}} {{pod_cidr}}" </del> # test_args has to be kept at the end, so they'll overwrite any prior configuration <del> DAEMON_ARGS="$DAEMON_ARGS + {{test_args}}" </del> <ins> DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} {{manifest_url}} --allow_privileged={{pillar['allow_privileged']}} {{pillar['log_level']}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{test_args}}" </ins>
"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"
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"
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{
<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>
flag.StringVar(&testContext.OutputPrintType, "output-print-type", "hr", "Comma separated list: 'hr' for human readable summaries 'json' for JSON ones.") } <del> func TestE2E(t *testing.T) { util.ReallyCrash = true util.InitLogs() defer util.FlushLogs() if testContext.ReportDir != "" { if err := os.MkdirAll(testContext.ReportDir, 0755); err != nil { glog.Errorf("Failed creating report directory: %v", err) } defer CoreDump(testContext.ReportDir) } if testContext.Provider == "" { </del> <ins> // setupProviderConfig validates and sets up cloudConfig based on testContext.Provider. func setupProviderConfig() error { switch testContext.Provider { case "": </ins> glog.Info("The --provider flag is not set.  Treating as a conformance test.  Some tests may not be run.") <del> } if testContext.Provider == "gce" || testContext.Provider == "gke" { </del> <ins> case "gce", "gke": </ins> var err error Logf("Fetching cloud provider for %qrn", testContext.Provider) var tokenSource oauth2.TokenSource
// test pods from running, and tests that ensure all pods are running and // ready will fail). if err := waitForPodsRunningReady(api.NamespaceSystem, testContext.MinStartupPods, podStartupTimeout); err != nil { <del> t.Errorf("Error waiting for all pods to be running and ready: %v", err) return </del> <ins> Failf("Error waiting for all pods to be running and ready: %v", err) </ins> } <ins> return nil }, func(data []byte) { // Run on all Ginkgo nodes }) // Similar to SynchornizedBeforeSuite, we want to run some operations only once (such as collecting cluster logs). // Here, the order of functions is reversed; first, the function which runs everywhere, // and then the function that only runs on the first Ginkgo node. var _ = ginkgo.SynchronizedAfterSuite(func() { // Run on all Ginkgo nodes }, func() { // Run only Ginkgo on node 1 if testContext.ReportDir != "" { CoreDump(testContext.ReportDir) } }) // TestE2E checks configuration parameters (specified through flags) and then runs // E2E tests using the Ginkgo runner. // If a "report directory" is specified, one or more JUnit test reports will be // generated in this directory, and cluster logs will also be saved. // This function is called on each Ginkgo node in parallel mode. func TestE2E(t *testing.T) { util.ReallyCrash = true util.InitLogs() defer util.FlushLogs() // We must call setupProviderConfig first since SynchronizedBeforeSuite needs // cloudConfig to be set up already. if err := setupProviderConfig(); err != nil { glog.Fatalf(err.Error()) } gomega.RegisterFailHandler(ginkgo.Fail) // Disable skipped tests unless they are explicitly requested. if config.GinkgoConfig.FocusString == "" && config.GinkgoConfig.SkipString == "" { // TODO(ihmccreery) Remove [Skipped] once all [Skipped] labels have been reclassified. config.GinkgoConfig.SkipString = `[Flaky]|[Skipped]|[Feature:.+]` } </ins> // Run tests through the Ginkgo runner with output to console + JUnit for Jenkins var r []ginkgo.Reporter if testContext.ReportDir != "" { <del> r = append(r, reporters.NewJUnitReporter(path.Join(testContext.ReportDir, fmt.Sprintf("junit_%02d.xml", config.GinkgoConfig.ParallelNode)))) </del> <ins> // TODO: we should probably only be trying to create this directory once // rather than once-per-Ginkgo-node. if err := os.MkdirAll(testContext.ReportDir, 0755); err != nil { glog.Errorf("Failed creating report directory: %v", err) } else { r = append(r, reporters.NewJUnitReporter(path.Join(testContext.ReportDir, fmt.Sprintf("junit_%02d.xml", config.GinkgoConfig.ParallelNode)))) } </ins> } <del> glog.Infof("Starting e2e run; %q", runId) </del> <ins> glog.Infof("Starting e2e run %q on Ginkgo node %d", runId, config.GinkgoConfig.ParallelNode) </ins> ginkgo.RunSpecsWithDefaultAndCustomReporters(t, "Kubernetes e2e suite", r) }
// GetOriginalConfiguration retrieves the original configuration of the object // from the annotation, or nil if no annotation was found. <del> func GetOriginalConfiguration(info *resource.Info) ([]byte, error) { annots, err := info.Mapping.MetadataAccessor.Annotations(info.Object) </del> <ins> func GetOriginalConfiguration(mapping *meta.RESTMapping, obj runtime.Object) ([]byte, error) { annots, err := mapping.MetadataAccessor.Annotations(obj) </ins> if err != nil { return nil, err }
// UpdateApplyAnnotation calls CreateApplyAnnotation if the last applied // configuration annotation is already present. Otherwise, it does nothing. func UpdateApplyAnnotation(info *resource.Info, codec runtime.Encoder) error { <del> if original, err := GetOriginalConfiguration(info); err != nil || len(original) <= 0 { </del> <ins> if original, err := GetOriginalConfiguration(info.Mapping, info.Object); err != nil || len(original) <= 0 { </ins> return err } return CreateApplyAnnotation(info, codec)
import ( "fmt" "io" <ins> "time" "github.com/jonboulle/clockwork" </ins> "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" <ins> "k8s.io/kubernetes/pkg/api/meta" </ins> "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource"
} const ( <ins> // maxPatchRetry is the maximum number of conflicts retry for during a patch operation before returning failure maxPatchRetry = 5 // backOffPeriod is the period to back off when apply patch resutls in error. backOffPeriod = 1 * time.Second // how many times we can retry before back off triesBeforeBackOff = 1 ) const ( </ins> apply_long = `Apply a configuration to a resource by filename or stdin. The resource will be created if it doesn't exist yet. To use 'apply', always create the resource initially with either 'apply' or 'create --save-config'.
return nil } <del> // Serialize the current configuration of the object from the server. current, err := runtime.Encode(encoder, info.Object) if err != nil { return cmdutil.AddSourceToErr(fmt.Sprintf("serializing current configuration from:n%vnfor:", info), info.Source, err) } // Retrieve the original configuration of the object from the annotation. original, err := kubectl.GetOriginalConfiguration(info) if err != nil { return cmdutil.AddSourceToErr(fmt.Sprintf("retrieving original configuration from:n%vnfor:", info), info.Source, err) } // Create the versioned struct from the original from the server for // strategic patch. // TODO: Move all structs in apply to use raw data. Can be done once // builder has a RawResult method which delivers raw data instead of // internal objects. versionedObject, _, err := decoder.Decode(current, nil, nil) if err != nil { return cmdutil.AddSourceToErr(fmt.Sprintf("converting encoded server-side object back to versioned struct:n%vnfor:", info), info.Source, err) } // Compute a three way strategic merge patch to send to server. patch, err := strategicpatch.CreateThreeWayMergePatch(original, modified, current, versionedObject, true) if err != nil { format := "creating patch with:noriginal:n%snmodified:n%sncurrent:n%snfrom:n%vnfor:" return cmdutil.AddSourceToErr(fmt.Sprintf(format, original, modified, current, info), info.Source, err) } </del> helper := resource.NewHelper(info.Client, info.Mapping) <del> _, err = helper.Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) </del> <ins> patcher := NewPatcher(encoder, decoder, info.Mapping, helper) patchBytes, err := patcher.patch(info.Object, modified, info.Source, info.Namespace, info.Name) </ins> if err != nil { <del> return cmdutil.AddSourceToErr(fmt.Sprintf("applying patch:n%snto:n%vnfor:", patch, info), info.Source, err) </del> <ins> return cmdutil.AddSourceToErr(fmt.Sprintf("applying patch:n%snto:n%vnfor:", patchBytes, info), info.Source, err) </ins> } if cmdutil.ShouldRecord(cmd, info) { <del> patch, err = cmdutil.ChangeResourcePatch(info, f.Command()) </del> <ins> patch, err := cmdutil.ChangeResourcePatch(info, f.Command()) </ins> if err != nil { return err }
return nil } <ins> type patcher struct { encoder runtime.Encoder decoder runtime.Decoder mapping *meta.RESTMapping helper  *resource.Helper backOff clockwork.Clock } func NewPatcher(encoder runtime.Encoder, decoder runtime.Decoder, mapping *meta.RESTMapping, helper *resource.Helper) *patcher { return &patcher{ encoder: encoder, decoder: decoder, mapping: mapping, helper:  helper, backOff: clockwork.NewRealClock(), } } func (p *patcher) patchSimple(obj runtime.Object, modified []byte, source, namespace, name string) ([]byte, error) { // Serialize the current configuration of the object from the server. current, err := runtime.Encode(p.encoder, obj) if err != nil { return nil, cmdutil.AddSourceToErr(fmt.Sprintf("serializing current configuration from:n%vnfor:", obj), source, err) } // Retrieve the original configuration of the object from the annotation. original, err := kubectl.GetOriginalConfiguration(p.mapping, obj) if err != nil { return nil, cmdutil.AddSourceToErr(fmt.Sprintf("retrieving original configuration from:n%vnfor:", obj), source, err) } // Create the versioned struct from the original from the server for // strategic patch. // TODO: Move all structs in apply to use raw data. Can be done once // builder has a RawResult method which delivers raw data instead of // internal objects. versionedObject, _, err := p.decoder.Decode(current, nil, nil) if err != nil { return nil, cmdutil.AddSourceToErr(fmt.Sprintf("converting encoded server-side object back to versioned struct:n%vnfor:", obj), source, err) } // Compute a three way strategic merge patch to send to server. patch, err := strategicpatch.CreateThreeWayMergePatch(original, modified, current, versionedObject, true) if err != nil { format := "creating patch with:noriginal:n%snmodified:n%sncurrent:n%snfor:" return nil, cmdutil.AddSourceToErr(fmt.Sprintf(format, original, modified, current), source, err) } _, err = p.helper.Patch(namespace, name, api.StrategicMergePatchType, patch) return patch, err } func (p *patcher) patch(current runtime.Object, modified []byte, source, namespace, name string) ([]byte, error) { var getErr error patchBytes, err := p.patchSimple(current, modified, source, namespace, name) for i := 1; i <= maxPatchRetry && errors.IsConflict(err); i++ { if i > triesBeforeBackOff { p.backOff.Sleep(backOffPeriod) } current, getErr = p.helper.Get(namespace, name, false) if getErr != nil { return nil, getErr } patchBytes, err = p.patchSimple(current, modified, source, namespace, name) } return patchBytes, err } </ins>
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/annotations" <ins> kubeerr "k8s.io/kubernetes/pkg/api/errors" </ins> "k8s.io/kubernetes/pkg/api/meta" <ins> "k8s.io/kubernetes/pkg/api/unversioned" </ins> "k8s.io/kubernetes/pkg/client/unversioned/fake" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/runtime"
} } <ins> func TestApplyRetry(t *testing.T) { initTestErrorHandler(t) nameRC, currentRC := readAndAnnotateReplicationController(t, filenameRC) pathRC := "/namespaces/test/replicationcontrollers/" + nameRC firstPatch := true retry := false getCount := 0 f, tf, codec := NewAPIFactory() tf.Printer = &testPrinter{} tf.Client = &fake.RESTClient{ Codec: codec, Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { switch p, m := req.URL.Path, req.Method; { case p == pathRC && m == "GET": getCount++ bodyRC := ioutil.NopCloser(bytes.NewReader(currentRC)) return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: bodyRC}, nil case p == pathRC && m == "PATCH": if firstPatch { firstPatch = false statusErr := kubeerr.NewConflict(unversioned.GroupResource{Group: "", Resource: "rc"}, "test-rc", fmt.Errorf("the object has been modified. Please apply at first.")) bodyBytes, _ := json.Marshal(statusErr) bodyErr := ioutil.NopCloser(bytes.NewReader(bodyBytes)) return &http.Response{StatusCode: http.StatusConflict, Header: defaultHeader(), Body: bodyErr}, nil } retry = true validatePatchApplication(t, req) bodyRC := ioutil.NopCloser(bytes.NewReader(currentRC)) return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: bodyRC}, nil default: t.Fatalf("unexpected request: %#vn%#v", req.URL, req) return nil, nil } }), } tf.Namespace = "test" buf := bytes.NewBuffer([]byte{}) cmd := NewCmdApply(f, buf) cmd.Flags().Set("filename", filenameRC) cmd.Flags().Set("output", "name") cmd.Run(cmd, []string{}) if !retry || getCount != 2 { t.Fatalf("apply didn't retry when get conflict error") } // uses the name from the file, not the response expectRC := "replicationcontroller/" + nameRC + "n" if buf.String() != expectRC { t.Fatalf("unexpected output: %snexpected: %s", buf.String(), expectRC) } } </ins> func TestApplyNonExistObject(t *testing.T) { nameRC, currentRC := readAndAnnotateReplicationController(t, filenameRC) pathRC := "/namespaces/test/replicationcontrollers"
"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=(
# 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.
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=(
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
selectorNamespace = "" } else { if len(b.namespace) == 0 { <del> return &Result{singular: isSingular, err: fmt.Errorf("namespace may not be empty when retrieving a resource by name")} </del> <ins> errMsg := "namespace may not be empty when retrieving a resource by name" if b.allNamespace { errMsg = "a resource cannot be retrieved by name across all namespaces" } return &Result{singular: isSingular, err: fmt.Errorf(errMsg)} </ins> } }
#run the script once to download the dependent java libraries into the image RUN mkdir /output <del> RUN build/gen-swagger-docs.sh v1 https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/api/swagger-spec/v1.json https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/pkg/api/v1/register.go </del> <ins> RUN mkdir /swagger-source RUN wget https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/swagger-spec/v1.json -O /swagger-source/v1.json RUN build/gen-swagger-docs.sh v1 https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/pkg/api/v1/register.go RUN rm /output/* RUN rm /swagger-source/* </ins> ENTRYPOINT ["build/gen-swagger-docs.sh"]
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. V1_PATH="$PWD/${KUBE_ROOT}/docs/api-reference/v1/" V1BETA1_PATH="$PWD/${KUBE_ROOT}/docs/api-reference/extensions/v1beta1" <ins> SWAGGER_PATH="$PWD/${KUBE_ROOT}/api/swagger-spec/" </ins> mkdir -p $V1_PATH mkdir -p $V1BETA1_PATH <del> docker run -v $V1_PATH:/output gcr.io/google_containers/gen-swagger-docs:v2  </del> <ins> docker run -v $V1_PATH:/output -v ${SWAGGER_PATH}:/swagger-source gcr.io/google_containers/gen-swagger-docs:v3  </ins> v1  <del> https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/swagger-spec/v1.json  </del> https://raw.githubusercontent.com/kubernetes/kubernetes/master/pkg/api/v1/register.go <del> docker run -v $V1BETA1_PATH:/output gcr.io/google_containers/gen-swagger-docs:v2  </del> <ins> docker run -v $V1BETA1_PATH:/output -v ${SWAGGER_PATH}:/swagger-source gcr.io/google_containers/gen-swagger-docs:v3  </ins> v1beta1  <del> https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/swagger-spec/v1beta1.json  </del> https://raw.githubusercontent.com/kubernetes/kubernetes/master/pkg/apis/extensions/v1beta1/register.go
# comments below, and for poorly implemented tests, please quote the # issue number tracking speed improvements. GCE_SLOW_TESTS=( <del> # TODO: add deployment test here once it will become stable "AutoscalingsSuite.*viasreplicationController" </del> # Before enabling this loadbalancer test in any other test list you must # make sure the associated project has enough quota. At the time of this # writing a GCE project is allowed 3 backend services by default. This
}) // CPU tests via replication controllers <del> It(fmt.Sprintf(titleUp, "[Autoscaling Suite]", kindRC), func() { </del> <ins> It(fmt.Sprintf(titleUp, "[Skipped][Autoscaling Suite]", kindRC), func() { </ins> scaleUp("rc", kindRC, rc, f) }) <del> It(fmt.Sprintf(titleDown, "[Autoscaling Suite]", kindRC), func() { </del> <ins> It(fmt.Sprintf(titleDown, "[Skipped][Autoscaling Suite]", kindRC), func() { </ins> scaleDown("rc", kindRC, rc, f) }) })
ip := pickNodeIP(c) testReachable(ip, nodePort) <ins> By("verifying the node port is locked") </ins> hostExec := LaunchHostExecPod(f.Client, f.Namespace.Name, "hostexec") <del> cmd := fmt.Sprintf(`ss -ant46 'sport = :%d' | tail -n +2 | grep LISTEN`, nodePort) </del> <ins> // Loop a bit because we see transient flakes. cmd := fmt.Sprintf(`for i in $(seq 1 10); do if ss -ant46 'sport = :%d' | grep ^LISTEN; then exit 0; fi; sleep 0.1; done; exit 1`, nodePort) </ins> stdout, err := RunHostCmd(hostExec.Namespace, hostExec.Name, cmd) if err != nil { Failf("expected node port (%d) to be in use, stdout: %v", nodePort, stdout)
# This tarball is only used by Ubuntu Trusty. KUBE_MANIFESTS_TAR= <del> if [[ "${OS_DISTRIBUTION}" == "trusty" ]]; then KUBE_MANIFESTS_TAR="${KUBE_ROOT}/server/kuernetes-manifests.tar.gz" </del> <ins> if [[ "${KUBE_OS_DISTRIBUTION}" == "trusty" ]]; then KUBE_MANIFESTS_TAR="${KUBE_ROOT}/server/kubernetes-manifests.tar.gz" </ins> if [[ ! -f "${KUBE_MANIFESTS_TAR}" ]]; then KUBE_MANIFESTS_TAR="${KUBE_ROOT}/_output/release-tars/kubernetes-manifests.tar.gz" fi