mirror of https://github.com/k3s-io/k3s
Merge pull request #50649 from yguo0905/image-desc
Automatic merge from submit-queue (batch tested with PRs 49842, 50649) Allow passing image description from e2e node test config Ref: https://github.com/kubernetes/kubernetes/issues/42926 This is the follow up of https://github.com/kubernetes/kubernetes/pull/50479. In https://github.com/kubernetes/kubernetes/pull/50479, we added the tests for cos-m60 with docker 1.12.6. Those tests use the same image name as the existing ones (cos-m60 with docker 1.13.1). So we are not distinguish them on node-perf-dash, which categories the tests by image names. This PR fixes the issue by passing image description to the test. Examples: https://storage.googleapis.com/ygg-gke-dev-bucket/e2e-node-test/ci-kubernetes-node-kubelet-benchmark/22/artifacts/performance-cpu-cos-docker112-resource2-resource_35.json https://storage.googleapis.com/ygg-gke-dev-bucket/e2e-node-test/ci-kubernetes-node-kubelet-benchmark/22/artifacts/performance-cpu-cos-resource2-resource_35.json **Release note**: ``` None ``` /assign @Random-Liupull/6/head
commit
cc27673aa9
|
@ -113,6 +113,7 @@ images:
|
|||
- 'resource tracking for 105 pods per node \[Benchmark\]'
|
||||
cos-docker112-resource1:
|
||||
image: cos-stable-60-9592-76-0
|
||||
image_description: cos-stable-60-9592-76-0 with docker 1.12.6
|
||||
project: cos-cloud
|
||||
machine: n1-standard-1
|
||||
metadata: "user-data<test/e2e_node/jenkins/cos-init-docker.yaml,gci-update-strategy=update_disabled,gci-docker-version=1.12.6"
|
||||
|
@ -120,6 +121,7 @@ images:
|
|||
- 'resource tracking for 0 pods per node \[Benchmark\]'
|
||||
cos-docker112-resource2:
|
||||
image: cos-stable-60-9592-76-0
|
||||
image_description: cos-stable-60-9592-76-0 with docker 1.12.6
|
||||
project: cos-cloud
|
||||
machine: n1-standard-1
|
||||
metadata: "user-data<test/e2e_node/jenkins/cos-init-docker.yaml,gci-update-strategy=update_disabled,gci-docker-version=1.12.6"
|
||||
|
@ -127,6 +129,7 @@ images:
|
|||
- 'resource tracking for 35 pods per node \[Benchmark\]'
|
||||
cos-docker112-resource3:
|
||||
image: cos-stable-60-9592-76-0
|
||||
image_description: cos-stable-60-9592-76-0 with docker 1.12.6
|
||||
project: cos-cloud
|
||||
machine: n1-standard-1
|
||||
metadata: "user-data<test/e2e_node/jenkins/cos-init-docker.yaml,gci-update-strategy=update_disabled,gci-docker-version=1.12.6"
|
||||
|
|
|
@ -211,7 +211,7 @@ func (n *NodeE2ERemote) RunTest(host, workspace, results, imageDesc, junitFilePr
|
|||
glog.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",
|
||||
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",
|
||||
timeout.Seconds(), ginkgoArgs, systemSpecName, systemSpecFile, host, results, junitFilePrefix, imageDesc, testArgs),
|
||||
)
|
||||
return SSH(host, "sh", "-c", cmd)
|
||||
|
|
|
@ -113,6 +113,7 @@ type Resources struct {
|
|||
|
||||
type GCEImage struct {
|
||||
Image string `json:"image, omitempty"`
|
||||
ImageDesc string `json:"image_description, omitempty"`
|
||||
Project string `json:"project"`
|
||||
Metadata string `json:"metadata"`
|
||||
ImageRegex string `json:"image_regex, omitempty"`
|
||||
|
@ -132,6 +133,9 @@ type internalImageConfig struct {
|
|||
|
||||
type internalGCEImage struct {
|
||||
image string
|
||||
// imageDesc is the description of the image. If empty, the value in the
|
||||
// 'image' will be used.
|
||||
imageDesc string
|
||||
project string
|
||||
resources Resources
|
||||
metadata *compute.Metadata
|
||||
|
@ -206,12 +210,16 @@ func main() {
|
|||
for _, image := range images {
|
||||
gceImage := internalGCEImage{
|
||||
image: image,
|
||||
imageDesc: imageConfig.ImageDesc,
|
||||
project: imageConfig.Project,
|
||||
metadata: getImageMetadata(imageConfig.Metadata),
|
||||
machine: imageConfig.Machine,
|
||||
tests: imageConfig.Tests,
|
||||
resources: imageConfig.Resources,
|
||||
}
|
||||
if gceImage.imageDesc == "" {
|
||||
gceImage.imageDesc = gceImage.image
|
||||
}
|
||||
if isRegex && len(images) > 1 {
|
||||
// Use image name when shortName is not unique.
|
||||
name = image
|
||||
|
@ -485,7 +493,7 @@ func testImage(imageConfig *internalGCEImage, junitFilePrefix string) *TestResul
|
|||
// If we are going to delete the instance, don't bother with cleaning up the files
|
||||
deleteFiles := !*deleteInstances && *cleanup
|
||||
|
||||
result := testHost(host, deleteFiles, imageConfig.image, junitFilePrefix, ginkgoFlagsStr)
|
||||
result := testHost(host, deleteFiles, imageConfig.imageDesc, junitFilePrefix, ginkgoFlagsStr)
|
||||
// This is a temporary solution to collect serial node serial log. Only port 1 contains useful information.
|
||||
// TODO(random-liu): Extract out and unify log collection logic with cluste e2e.
|
||||
serialPortOutput, err := computeService.Instances.GetSerialPortOutput(*project, *zone, host).Port(1).Do()
|
||||
|
|
Loading…
Reference in New Issue