-
Notifications
You must be signed in to change notification settings - Fork 477
critest: test metric descriptors #1931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
37a4117 to
5188a10
Compare
|
cc @akhilerm |
pkg/validate/pod.go
Outdated
| "container_fs_inodes_free", | ||
| "container_fs_inodes_total", | ||
| "container_fs_io_current", | ||
| "container_fs_io_time_seconds_total", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fs metrics are currently not implemented in cri-o. ref: cri-o/cri-o#9344
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah there's a number of these cri-o doesn't support yet. My plan is to get consensus on the list then fill in the gaps
pkg/validate/pod.go
Outdated
|
|
||
| By("create container in pod") | ||
| ic := f.CRIClient.CRIImageClient | ||
| containerID := framework.CreatePauseContainer(rc, ic, podID, podConfig, "container-for-metrics-") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use CreateDefaultContainer rather than the pause container?
| "container_fs_write_seconds_total", | ||
| "container_fs_writes_merged_total", | ||
| "container_fs_writes_total", | ||
| "container_last_seen", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few of these metrics are currently not in the implementation in containerd also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have a list handy of the ones you aren't yet supporting? is it because you don't plan on it or haven't gotten to it yet
I think for this KEP to go beta each should really support the full set (I say knowing CRI-O is missing some)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From containerd, the below metrics are not reported from metric descriptors
"container_cpu_load_average_10s",
"container_cpu_load_d_average_10s",
"container_file_descriptors",
"container_last_seen",
"container_oom_events_total",
"container_pressure_cpu_stalled_seconds_total",
"container_pressure_cpu_waiting_seconds_total",
"container_pressure_io_stalled_seconds_total",
"container_pressure_io_waiting_seconds_total",
"container_pressure_memory_stalled_seconds_total",
"container_pressure_memory_waiting_seconds_total",
"container_sockets",
"container_spec_cpu_period",
"container_spec_cpu_shares",
"container_spec_memory_limit_bytes",
"container_spec_memory_reservation_limit_bytes",
"container_spec_memory_swap_limit_bytes",
"container_start_time_seconds",
"container_tasks_state",
"container_threads",
"container_ulimits_soft",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are now added as part of #12426.
Checking why the CI fails on containerd main.
94b0d3b to
bd53331
Compare
f66ce62 to
e5357fd
Compare
Signed-off-by: Peter Hunt <[email protected]>
some context: kubernetes/kubernetes#134981 Signed-off-by: Peter Hunt <[email protected]>
… present Signed-off-by: Peter Hunt <[email protected]>
Signed-off-by: Peter Hunt <[email protected]>
e5357fd to
01b03eb
Compare
|
once cri-o/cri-o#9571 merges, this should pass for CRI-O. I still could use @akhilerm 's help figuring out why containerd tests are still failing |
01b03eb to
12832bd
Compare
CRI-O failures are expected and unrelated opencontainers/runc#4968 |
|
i've paired this down to just test present metric descriptors. CRI-O was hitting issues with diskIO metrics being tricky to reliably trigger (io.stat file doesn't get created when the container hasn't triggered block IO) and containerd is returning empty metrics for some reason. I think adding the pod metrics tests can be a follow up |
12832bd to
01b03eb
Compare
| } | ||
| } | ||
|
|
||
| Expect(missingMetrics).To(BeEmpty(), "Expected %s metrics to be present and they were not", strings.Join(missingMetrics, " ")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Expect(missingMetrics).To(BeEmpty(), "Expected %s metrics to be present and they were not", strings.Join(missingMetrics, " ")) | |
| Expect(missingMetrics).To(BeEmpty(), "Expected metrics missing: %s", strings.Join(missingMetrics, ", ")) |
| } | ||
|
|
||
| // testPodSandboxMetrics verifies that metrics are present for the specified pod. | ||
| func testPodSandboxMetrics(allMetrics []*runtimeapi.PodSandboxMetrics, podID string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are still taking in this function. Only the metrics descriptors test are needed right?
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?