Skip to content

Conversation

R3hankhan123
Copy link

@R3hankhan123 R3hankhan123 commented Jul 15, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR implements the previously missing disk metrics:

  • container_fs_inodes_free
  • container_fs_inodes_total
  • container_fs_limit_bytes
  • container_fs_usage_bytes

Which issue(s) this PR fixes:

contributes towards #9125

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

No

Added disk metrics (`container_fs_inodes_free`, `container_fs_inodes_total`, `container_fs_limit_bytes`, `container_fs_usage_bytes`)

@R3hankhan123 R3hankhan123 requested a review from mrunalp as a code owner July 15, 2025 15:11
@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jul 15, 2025
@openshift-ci openshift-ci bot requested review from hasan4791 and littlejawa July 15, 2025 15:12
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 15, 2025
Copy link
Contributor

openshift-ci bot commented Jul 15, 2025

Hi @R3hankhan123. Thanks for your PR.

I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@R3hankhan123 R3hankhan123 marked this pull request as draft July 15, 2025 16:21
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 15, 2025
@R3hankhan123 R3hankhan123 marked this pull request as ready for review July 15, 2025 16:24
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 15, 2025
@openshift-ci openshift-ci bot requested review from bitoku and klihub July 15, 2025 16:25
@bitoku
Copy link
Contributor

bitoku commented Jul 15, 2025

Thanks @R3hankhan123 . Can you add e2e tests in test/cri-metrics.bats?

@R3hankhan123
Copy link
Author

Thanks @R3hankhan123 . Can you add e2e tests in test/cri-metrics.bats?

Done @bitoku

Copy link

codecov bot commented Jul 16, 2025

Codecov Report

❌ Patch coverage is 69.16667% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.52%. Comparing base (6ab8d26) to head (4907339).
⚠️ Report is 58 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9344      +/-   ##
==========================================
- Coverage   67.11%   66.52%   -0.59%     
==========================================
  Files         202      203       +1     
  Lines       27900    27994      +94     
==========================================
- Hits        18725    18623     -102     
- Misses       7603     7789     +186     
- Partials     1572     1582      +10     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bitoku
Copy link
Contributor

bitoku commented Jul 16, 2025

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 16, 2025
@R3hankhan123
Copy link
Author

@bitoku can you help me debug the prow tests, i see that container is being exited but can't find the reason why exactly its exiting

@bitoku
Copy link
Contributor

bitoku commented Jul 16, 2025

@R3hankhan123
Copy link
Author

R3hankhan123 commented Jul 16, 2025

@bitoku , looks like port 9090 is being used when trying to run disk metrics but its already in use, should i kill the process that is using the port (ie memory metrics crio) wdyt

@bitoku
Copy link
Contributor

bitoku commented Jul 16, 2025

@R3hankhan123 You can use free_port.

cri-o/test/conmon.bats

Lines 17 to 20 in 7c127d3

port=$(free_port)
CONTAINER_ENABLE_METRICS=true \
CONTAINER_METRICS_PORT=$port \
start_crio

@R3hankhan123 R3hankhan123 requested a review from bitoku August 12, 2025 17:54
Copy link
Contributor

@bitoku bitoku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity. Do you happen to generate the code with AI?

@R3hankhan123
Copy link
Author

R3hankhan123 commented Aug 13, 2025

Just out of curiosity. Do you happen to generate the code with AI?

Only for the test cases(not good at writing bat files and shell scripts 🥲😅, also its a new thing for me)

Copy link
Contributor

openshift-ci bot commented Aug 13, 2025

@R3hankhan123: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ci-e2e-evented-pleg 3c601f7 link false /test ci-e2e-evented-pleg

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@R3hankhan123
Copy link
Author

Hi @bitoku can you retrigger [integration / critest / conmon-rs / runc / amd64 (pull_request)], please and thank you

@R3hankhan123
Copy link
Author

R3hankhan123 commented Aug 18, 2025

Hi @bitoku any more suggestions you have that I need to address, please and thank you

Copy link
Contributor

@bitoku bitoku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Comment on lines +41 to +45
containerFsInodesFree = &types.MetricDescriptor{
Name: "container_fs_inodes_free",
Help: "Number of free inodes.",
LabelKeys: baseLabelKeys,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could add extra labels, but I found general discrepancies in labels between crio and cadvisor. we can ignore it for now.
https://github.com/google/cadvisor/blob/5adb1c3bb38b4c5d50b31f39faf3214a44ae479b/metrics/prometheus.go#L537

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 18, 2025
@bitoku
Copy link
Contributor

bitoku commented Aug 18, 2025

@cri-o/cri-o-maintainers PTAL

@R3hankhan123
Copy link
Author

Thanks @bitoku for the review, once the PR is approved I will start implementing the DISK IO metrics also☺️

@R3hankhan123
Copy link
Author

Hi @cri-o/cri-o-maintainers PTAL when you get a chance 🙏. Thanks!

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 27, 2025
Signed-off-by: Rehan Khan <Rehan.Khan7@ibm.com>
Signed-off-by: Rehan Khan <Rehan.Khan7@ibm.com>
Signed-off-by: Rehan Khan <Rehan.Khan7@ibm.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 28, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 28, 2025
@R3hankhan123
Copy link
Author

@bitoku rebasing removed the lgtm tag😅

@bitoku
Copy link
Contributor

bitoku commented Aug 29, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 29, 2025
Copy link

A friendly reminder that this PR had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 29, 2025
@bitoku
Copy link
Contributor

bitoku commented Sep 30, 2025

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants