mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
Fresh dep ensure
This commit is contained in:
4
vendor/k8s.io/kubernetes/test/e2e_node/remote/BUILD
generated
vendored
4
vendor/k8s.io/kubernetes/test/e2e_node/remote/BUILD
generated
vendored
@ -18,10 +18,10 @@ go_library(
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/test/e2e_node/remote",
|
||||
deps = [
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library",
|
||||
"//test/e2e_node/builder:go_default_library",
|
||||
"//test/utils:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library",
|
||||
"//vendor/k8s.io/klog:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
4
vendor/k8s.io/kubernetes/test/e2e_node/remote/cadvisor_e2e.go
generated
vendored
4
vendor/k8s.io/kubernetes/test/e2e_node/remote/cadvisor_e2e.go
generated
vendored
@ -22,7 +22,7 @@ import (
|
||||
"os/exec"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/kubernetes/test/utils"
|
||||
)
|
||||
|
||||
@ -67,7 +67,7 @@ func (n *CAdvisorE2ERemote) RunTest(host, workspace, results, imageDesc, junitFi
|
||||
// Kill any running node processes
|
||||
cleanupNodeProcesses(host)
|
||||
|
||||
glog.V(2).Infof("Starting tests on %q", host)
|
||||
klog.V(2).Infof("Starting tests on %q", host)
|
||||
return SSH(host, "sh", "-c", getSSHCommand(" && ",
|
||||
fmt.Sprintf("cd %s/cadvisor", workspace),
|
||||
fmt.Sprintf("timeout -k 30s %fs ./build/integration.sh ../results/cadvisor.log",
|
||||
|
18
vendor/k8s.io/kubernetes/test/e2e_node/remote/node_conformance.go
generated
vendored
18
vendor/k8s.io/kubernetes/test/e2e_node/remote/node_conformance.go
generated
vendored
@ -25,7 +25,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
|
||||
"k8s.io/kubernetes/test/e2e_node/builder"
|
||||
"k8s.io/kubernetes/test/utils"
|
||||
@ -206,13 +206,13 @@ func launchKubelet(host, workspace, results, testArgs string) error {
|
||||
),
|
||||
}
|
||||
}
|
||||
glog.V(2).Infof("Launch kubelet with command: %v", cmd)
|
||||
klog.V(2).Infof("Launch kubelet with command: %v", cmd)
|
||||
output, err := SSH(host, cmd...)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to launch kubelet with command %v: error - %v output - %q",
|
||||
cmd, err, output)
|
||||
}
|
||||
glog.Info("Successfully launch kubelet")
|
||||
klog.Info("Successfully launch kubelet")
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -221,12 +221,12 @@ const kubeletStopGracePeriod = 10 * time.Second
|
||||
|
||||
// stopKubelet stops kubelet launcher and kubelet gracefully.
|
||||
func stopKubelet(host, workspace string) error {
|
||||
glog.Info("Gracefully stop kubelet launcher")
|
||||
klog.Info("Gracefully stop kubelet launcher")
|
||||
if output, err := SSH(host, "pkill", conformanceTestBinary); err != nil {
|
||||
return fmt.Errorf("failed to gracefully stop kubelet launcher: error - %v output - %q",
|
||||
err, output)
|
||||
}
|
||||
glog.Info("Wait for kubelet launcher to stop")
|
||||
klog.Info("Wait for kubelet launcher to stop")
|
||||
stopped := false
|
||||
for start := time.Now(); time.Since(start) < kubeletStopGracePeriod; time.Sleep(time.Second) {
|
||||
// Check whether the process is still running.
|
||||
@ -242,13 +242,13 @@ func stopKubelet(host, workspace string) error {
|
||||
}
|
||||
}
|
||||
if !stopped {
|
||||
glog.Info("Forcibly stop kubelet")
|
||||
klog.Info("Forcibly stop kubelet")
|
||||
if output, err := SSH(host, "pkill", "-SIGKILL", conformanceTestBinary); err != nil {
|
||||
return fmt.Errorf("failed to forcibly stop kubelet: error - %v output - %q",
|
||||
err, output)
|
||||
}
|
||||
}
|
||||
glog.Info("Successfully stop kubelet")
|
||||
klog.Info("Successfully stop kubelet")
|
||||
// Clean up the pod manifest path
|
||||
podManifestPath := getPodPath(workspace)
|
||||
if output, err := SSH(host, "rm", "-f", filepath.Join(workspace, podManifestPath)); err != nil {
|
||||
@ -286,12 +286,12 @@ func (c *ConformanceRemote) RunTest(host, workspace, results, imageDesc, junitFi
|
||||
defer func() {
|
||||
if err := stopKubelet(host, workspace); err != nil {
|
||||
// Only log an error if failed to stop kubelet because it is not critical.
|
||||
glog.Errorf("failed to stop kubelet: %v", err)
|
||||
klog.Errorf("failed to stop kubelet: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
// Run the tests
|
||||
glog.V(2).Infof("Starting tests on %q", host)
|
||||
klog.V(2).Infof("Starting tests on %q", host)
|
||||
podManifestPath := getPodPath(workspace)
|
||||
cmd := fmt.Sprintf("'timeout -k 30s %fs docker run --rm --privileged=true --net=host -v /:/rootfs -v %s:%s -v %s:/var/result -e TEST_ARGS=--report-prefix=%s %s'",
|
||||
timeout.Seconds(), podManifestPath, podManifestPath, results, junitFilePrefix, getConformanceTestImageName(systemSpecName))
|
||||
|
8
vendor/k8s.io/kubernetes/test/e2e_node/remote/node_e2e.go
generated
vendored
8
vendor/k8s.io/kubernetes/test/e2e_node/remote/node_e2e.go
generated
vendored
@ -24,14 +24,14 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
|
||||
"k8s.io/kubernetes/test/e2e_node/builder"
|
||||
"k8s.io/kubernetes/test/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
systemSpecPath = "test/e2e_node/system/specs"
|
||||
systemSpecPath = "k8s.io/kubernetes/cmd/kubeadm/app/util/system/specs"
|
||||
)
|
||||
|
||||
// NodeE2ERemote contains the specific functions in the node e2e test suite.
|
||||
@ -108,7 +108,7 @@ func tarAddFile(tar, source, dest string) error {
|
||||
// prependCOSMounterFlag prepends the flag for setting the GCI mounter path to
|
||||
// args and returns the result.
|
||||
func prependCOSMounterFlag(args, host, workspace string) (string, error) {
|
||||
glog.V(2).Infof("GCI/COS node and GCI/COS mounter both detected, modifying --experimental-mounter-path accordingly")
|
||||
klog.V(2).Infof("GCI/COS node and GCI/COS mounter both detected, modifying --experimental-mounter-path accordingly")
|
||||
mounterPath := filepath.Join(workspace, "mounter")
|
||||
args = fmt.Sprintf("--kubelet-flags=--experimental-mounter-path=%s ", mounterPath) + args
|
||||
return args, nil
|
||||
@ -164,7 +164,7 @@ func (n *NodeE2ERemote) RunTest(host, workspace, results, imageDesc, junitFilePr
|
||||
}
|
||||
|
||||
// Run the tests
|
||||
glog.V(2).Infof("Starting tests on %q", host)
|
||||
klog.V(2).Infof("Starting tests on %q", host)
|
||||
cmd := getSSHCommand(" && ",
|
||||
fmt.Sprintf("cd %s", workspace),
|
||||
fmt.Sprintf("timeout -k 30s %fs ./ginkgo %s ./e2e_node.test -- --system-spec-name=%s --system-spec-file=%s --logtostderr --v 4 --node-name=%s --report-dir=%s --report-prefix=%s --image-description=\"%s\" %s",
|
||||
|
22
vendor/k8s.io/kubernetes/test/e2e_node/remote/remote.go
generated
vendored
22
vendor/k8s.io/kubernetes/test/e2e_node/remote/remote.go
generated
vendored
@ -27,8 +27,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
var testTimeoutSeconds = flag.Duration("test-timeout", 45*time.Minute, "How long (in golang duration format) to wait for ginkgo tests to complete.")
|
||||
@ -37,7 +37,7 @@ var resultsDir = flag.String("results-dir", "/tmp/", "Directory to scp test resu
|
||||
const archiveName = "e2e_node_test.tar.gz"
|
||||
|
||||
func CreateTestArchive(suite TestSuite, systemSpecName string) (string, error) {
|
||||
glog.V(2).Infof("Building archive...")
|
||||
klog.V(2).Infof("Building archive...")
|
||||
tardir, err := ioutil.TempDir("", "node-e2e-archive")
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to create temporary directory %v.", err)
|
||||
@ -67,7 +67,7 @@ func CreateTestArchive(suite TestSuite, systemSpecName string) (string, error) {
|
||||
// TODO(random-liu): junitFilePrefix is not prefix actually, the file name is junit-junitFilePrefix.xml. Change the variable name.
|
||||
func RunRemote(suite TestSuite, archive string, host string, cleanup bool, imageDesc, junitFilePrefix string, testArgs string, ginkgoArgs string, systemSpecName string) (string, bool, error) {
|
||||
// Create the temp staging directory
|
||||
glog.V(2).Infof("Staging test binaries on %q", host)
|
||||
klog.V(2).Infof("Staging test binaries on %q", host)
|
||||
workspace := newWorkspaceDir()
|
||||
// Do not sudo here, so that we can use scp to copy test archive to the directdory.
|
||||
if output, err := SSHNoSudo(host, "mkdir", workspace); err != nil {
|
||||
@ -78,7 +78,7 @@ func RunRemote(suite TestSuite, archive string, host string, cleanup bool, image
|
||||
defer func() {
|
||||
output, err := SSH(host, "rm", "-rf", workspace)
|
||||
if err != nil {
|
||||
glog.Errorf("failed to cleanup workspace %q on host %q: %v. Output:\n%s", workspace, host, err, output)
|
||||
klog.Errorf("failed to cleanup workspace %q on host %q: %v. Output:\n%s", workspace, host, err, output)
|
||||
}
|
||||
}()
|
||||
}
|
||||
@ -94,7 +94,7 @@ func RunRemote(suite TestSuite, archive string, host string, cleanup bool, image
|
||||
fmt.Sprintf("cd %s", workspace),
|
||||
fmt.Sprintf("tar -xzvf ./%s", archiveName),
|
||||
)
|
||||
glog.V(2).Infof("Extracting tar on %q", host)
|
||||
klog.V(2).Infof("Extracting tar on %q", host)
|
||||
// Do not use sudo here, because `sudo tar -x` will recover the file ownership inside the tar ball, but
|
||||
// we want the extracted files to be owned by the current user.
|
||||
if output, err := SSHNoSudo(host, "sh", "-c", cmd); err != nil {
|
||||
@ -109,7 +109,7 @@ func RunRemote(suite TestSuite, archive string, host string, cleanup bool, image
|
||||
return "", false, fmt.Errorf("failed to create test result directory %q on host %q: %v output: %q", resultDir, host, err, output)
|
||||
}
|
||||
|
||||
glog.V(2).Infof("Running test on %q", host)
|
||||
klog.V(2).Infof("Running test on %q", host)
|
||||
output, err := suite.RunTest(host, workspace, resultDir, imageDesc, junitFilePrefix, testArgs, ginkgoArgs, systemSpecName, *testTimeoutSeconds)
|
||||
|
||||
aggErrs := []error{}
|
||||
@ -119,7 +119,7 @@ func RunRemote(suite TestSuite, archive string, host string, cleanup bool, image
|
||||
collectSystemLog(host)
|
||||
}
|
||||
|
||||
glog.V(2).Infof("Copying test artifacts from %q", host)
|
||||
klog.V(2).Infof("Copying test artifacts from %q", host)
|
||||
scpErr := getTestArtifacts(host, workspace)
|
||||
if scpErr != nil {
|
||||
aggErrs = append(aggErrs, scpErr)
|
||||
@ -194,17 +194,17 @@ func collectSystemLog(host string) {
|
||||
logPath = fmt.Sprintf("/tmp/%s-%s", getTimestamp(), logName)
|
||||
destPath = fmt.Sprintf("%s/%s-%s", *resultsDir, host, logName)
|
||||
)
|
||||
glog.V(2).Infof("Test failed unexpectedly. Attempting to retrieving system logs (only works for nodes with journald)")
|
||||
klog.V(2).Infof("Test failed unexpectedly. Attempting to retrieving system logs (only works for nodes with journald)")
|
||||
// Try getting the system logs from journald and store it to a file.
|
||||
// Don't reuse the original test directory on the remote host because
|
||||
// it could've be been removed if the node was rebooted.
|
||||
if output, err := SSH(host, "sh", "-c", fmt.Sprintf("'journalctl --system --all > %s'", logPath)); err == nil {
|
||||
glog.V(2).Infof("Got the system logs from journald; copying it back...")
|
||||
klog.V(2).Infof("Got the system logs from journald; copying it back...")
|
||||
if output, err := runSSHCommand("scp", fmt.Sprintf("%s:%s", GetHostnameOrIp(host), logPath), destPath); err != nil {
|
||||
glog.V(2).Infof("Failed to copy the log: err: %v, output: %q", err, output)
|
||||
klog.V(2).Infof("Failed to copy the log: err: %v, output: %q", err, output)
|
||||
}
|
||||
} else {
|
||||
glog.V(2).Infof("Failed to run journactl (normal if it doesn't exist on the node): %v, output: %q", err, output)
|
||||
klog.V(2).Infof("Failed to run journactl (normal if it doesn't exist on the node): %v, output: %q", err, output)
|
||||
}
|
||||
}
|
||||
|
||||
|
4
vendor/k8s.io/kubernetes/test/e2e_node/remote/ssh.go
generated
vendored
4
vendor/k8s.io/kubernetes/test/e2e_node/remote/ssh.go
generated
vendored
@ -24,7 +24,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
var sshOptions = flag.String("ssh-options", "", "Commandline options passed to ssh.")
|
||||
@ -38,7 +38,7 @@ var sshDefaultKeyMap map[string]string
|
||||
func init() {
|
||||
usr, err := user.Current()
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
klog.Fatal(err)
|
||||
}
|
||||
sshOptionsMap = map[string]string{
|
||||
"gce": "-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o CheckHostIP=no -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o LogLevel=ERROR",
|
||||
|
10
vendor/k8s.io/kubernetes/test/e2e_node/remote/utils.go
generated
vendored
10
vendor/k8s.io/kubernetes/test/e2e_node/remote/utils.go
generated
vendored
@ -21,7 +21,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// utils.go contains functions used across test suites.
|
||||
@ -52,7 +52,7 @@ const cniConfig = `{
|
||||
// Install the cni plugin and add basic bridge configuration to the
|
||||
// configuration directory.
|
||||
func setupCNI(host, workspace string) error {
|
||||
glog.V(2).Infof("Install CNI on %q", host)
|
||||
klog.V(2).Infof("Install CNI on %q", host)
|
||||
cniPath := filepath.Join(workspace, cniDirectory)
|
||||
cmd := getSSHCommand(" ; ",
|
||||
fmt.Sprintf("mkdir -p %s", cniPath),
|
||||
@ -65,7 +65,7 @@ func setupCNI(host, workspace string) error {
|
||||
// The added CNI network config is not needed for kubenet. It is only
|
||||
// used when testing the CNI network plugin, but is added in both cases
|
||||
// for consistency and simplicity.
|
||||
glog.V(2).Infof("Adding CNI configuration on %q", host)
|
||||
klog.V(2).Infof("Adding CNI configuration on %q", host)
|
||||
cniConfigPath := filepath.Join(workspace, cniConfDirectory)
|
||||
cmd = getSSHCommand(" ; ",
|
||||
fmt.Sprintf("mkdir -p %s", cniConfigPath),
|
||||
@ -79,7 +79,7 @@ func setupCNI(host, workspace string) error {
|
||||
|
||||
// configureFirewall configures iptable firewall rules.
|
||||
func configureFirewall(host string) error {
|
||||
glog.V(2).Infof("Configure iptables firewall rules on %q", host)
|
||||
klog.V(2).Infof("Configure iptables firewall rules on %q", host)
|
||||
// TODO: consider calling bootstrap script to configure host based on OS
|
||||
output, err := SSH(host, "iptables", "-L", "INPUT")
|
||||
if err != nil {
|
||||
@ -114,7 +114,7 @@ func configureFirewall(host string) error {
|
||||
|
||||
// cleanupNodeProcesses kills all running node processes may conflict with the test.
|
||||
func cleanupNodeProcesses(host string) {
|
||||
glog.V(2).Infof("Killing any existing node processes on %q", host)
|
||||
klog.V(2).Infof("Killing any existing node processes on %q", host)
|
||||
cmd := getSSHCommand(" ; ",
|
||||
"pkill kubelet",
|
||||
"pkill kube-apiserver",
|
||||
|
Reference in New Issue
Block a user