k3s/test/e2e_node
Kubernetes Submit Queue 949199e6ae
Merge pull request #67426 from yanxuean/check-both-err
Automatic merge from submit-queue (batch tested with PRs 67100, 67426). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

should check all error in ResourceCollector.Start()

Signed-off-by: yanxuean <yan.xuean@zte.com.cn>


**What this PR does / why we need it**:
1. We should check both errors.
test/e2e_node/resource_collector.go
```
func (r *ResourceCollector) Start() {
	// Get the cgroup container names for kubelet and runtime
	kubeletContainer, err := getContainerNameForProcess(kubeletProcessName, "")
	runtimeContainer, err := getContainerNameForProcess(framework.TestContext.ContainerRuntimeProcessName, framework.TestContext.ContainerRuntimePidFile)
	if err == nil {
		systemContainers = map[string]string{
			stats.SystemContainerKubelet: kubeletContainer,
			stats.SystemContainerRuntime: runtimeContainer,
		}
	}
```

2. redundant compare
The Timestamp.Equal is unlikely to occur, because we have met Timestamp.Before.
```
if oldStats, ok := oldStatsMap[name]; ok && oldStats.Timestamp.Before(newStats.Timestamp) {
			if oldStats.Timestamp.Equal(newStats.Timestamp) {
				continue
			}
			r.buffers[name] = append(r.buffers[name], computeContainerResourceUsage(name, oldStats, newStats))
		}
```
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
/sig-node
2018-08-16 11:57:32 -07:00
..
builder Move path management from e2e_node to common test/utils directory 2018-04-27 11:12:10 -04:00
conformance Update all script to use /usr/bin/env bash in shebang 2018-04-19 13:20:13 +02:00
environment Remove --cadvisor-port - has been deprecated since v1.10 2018-07-02 08:54:14 -04:00
jenkins Update all script to use /usr/bin/env bash in shebang 2018-04-19 13:20:13 +02:00
perftype
remote Fix kubeadm checks import error 2018-07-13 14:27:46 +08:00
runner Fix kubeadm checks import error 2018-07-13 14:27:46 +08:00
services Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
BUILD Merge pull request #67100 from mkurylec/promotion-lifecycle-hook-to-conformance 2018-08-16 11:57:28 -07:00
OWNERS
README.md
apparmor_test.go Rename Until to UntilWithoutRetry and move to using context so it's 2018-08-10 09:55:41 +02:00
benchmark_util.go
container.go remove a todo which is out of date 2018-02-07 09:31:15 +08:00
container_log_rotation_test.go Add node e2e test for log rotation. 2018-02-23 01:42:35 +00:00
container_manager_test.go Update the nginx image from hub.docker.com 2018-08-04 05:19:53 +05:30
cpu_manager_test.go test/e2e_node: Add Node-exclusive feature tags to existing tests 2018-05-21 17:52:36 -07:00
critical_pod_test.go test/e2e_node: Add NodeFeature tags to non-conformance tests 2018-05-21 17:52:36 -07:00
density_test.go Re-tag benchmark tests 2018-05-21 17:52:36 -07:00
device_plugin.go Use probe based plugin discovery mechanism in device manager 2018-07-17 04:02:31 -04:00
doc.go
docker_test.go Update the nginx image from hub.docker.com 2018-08-04 05:19:53 +05:30
docker_util.go Skip log path tests when they are expected to fail. 2018-01-19 10:51:13 -08:00
dockershim_checkpoint_test.go test/e2e_node: Add Node-exclusive feature tags to existing tests 2018-05-21 17:52:36 -07:00
dynamic_kubelet_config_test.go Fix test tag on dynamic config tests 2018-06-04 11:03:30 -07:00
e2e_node_suite_test.go Fix kubeadm checks import error 2018-07-13 14:27:46 +08:00
eviction_test.go fix e2e tests which set PodPriority are failing 2018-07-23 09:31:26 +08:00
framework.go
garbage_collector_test.go test/e2e_node: Add NodeFeature tags to non-conformance tests 2018-05-21 17:52:36 -07:00
gke_environment_test.go Merge pull request #67084 from spiffxp/rm-conformance-from-e2e_node 2018-08-07 21:06:04 -07:00
gpu_device_plugin.go fix e2e tests which set PodPriority are failing 2018-07-23 09:31:26 +08:00
gubernator.sh Update all script to use /usr/bin/env bash in shebang 2018-04-19 13:20:13 +02:00
hugepages_test.go Remove ARCH specific image consideration from e2e tests 2018-08-09 13:40:19 -04:00
image_id_test.go test/e2e_node: Add NodeFeature tags to non-conformance tests 2018-05-21 17:52:36 -07:00
image_list.go Update the nginx image from hub.docker.com 2018-08-04 05:19:53 +05:30
kubelet_test.go Remove [Conformance] from tests in e2e_node 2018-08-07 10:43:59 -07:00
log_path_test.go test/e2e_node: mark more tests with [NodeConformance] 2018-05-21 17:52:36 -07:00
mirror_pod_test.go Remove [Conformance] from tests in e2e_node 2018-08-07 10:43:59 -07:00
node_container_manager_test.go test/e2e_node: Add NodeFeature tags to non-conformance tests 2018-05-21 17:52:36 -07:00
node_problem_detector_linux.go test/e2e_node: Add NodeFeature tags to non-conformance tests 2018-05-21 17:52:36 -07:00
pods_container_manager_test.go e2e node: mark pod cgroup test as [NodeConformance] 2018-05-29 12:56:37 -07:00
resource_collector.go redundant equal compare 2018-08-15 17:09:45 +08:00
resource_usage_test.go Use pause manifest image 2018-04-06 11:00:50 +05:30
restart_test.go test/e2e_node: Add NodeFeature tags to non-conformance tests 2018-05-21 17:52:36 -07:00
runtime_conformance_test.go Remove [Conformance] from tests in e2e_node 2018-08-07 10:43:59 -07:00
security_context_test.go e2e test harness - use busybox from dockerhub 2018-08-07 11:22:16 -04:00
summary_test.go test/e2e_node: mark more tests with [NodeConformance] 2018-05-21 17:52:36 -07:00
util.go fix dynamic kubelet config tests 2018-05-29 09:34:40 -07:00
volume_manager_test.go test/e2e_node: mark more tests with [NodeConformance] 2018-05-21 17:52:36 -07:00

README.md