Skip to content

NO-ISSUE: images/tools/Dockerfile: Install iotop, if that fails fall back to iotop-c#2216

Merged
sdodson merged 1 commit intoopenshift:mainfrom
sdodson:fix-iotop
Mar 3, 2026
Merged

NO-ISSUE: images/tools/Dockerfile: Install iotop, if that fails fall back to iotop-c#2216
sdodson merged 1 commit intoopenshift:mainfrom
sdodson:fix-iotop

Conversation

@sdodson
Copy link
Member

@sdodson sdodson commented Mar 3, 2026

… iotop-c

Summary by CodeRabbit

  • Chores
    • Docker image build updated to ensure the iotop monitoring tool is reliably included during image creation.
    • Installation logic simplified for more predictable and maintainable image builds, reducing conditional checks and variability.

@coderabbitai
Copy link

coderabbitai bot commented Mar 3, 2026

Walkthrough

Replaces conditional iotop detection and variable assignment with a static inclusion of /usr/sbin/iotop in the Dockerfile package list and removes the yum list iotop check and IOTOP_PKG variable.

Changes

Cohort / File(s) Summary
Docker Build Configuration
images/tools/Dockerfile
Removed conditional yum list iotop check and IOTOP_PKG variable; added explicit /usr/sbin/iotop entry into INSTALL_PKGS, simplifying package selection logic and eliminating dynamic fallback handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title does not match the actual implementation in the changeset. The title promises a fallback mechanism (install iotop, if that fails fall back to iotop-c), but the changes only install the static path /usr/sbin/iotop without any fallback logic. Update the PR title to accurately reflect the changeset, such as 'images/tools/Dockerfile: Replace conditional iotop installation with static path' or implement the fallback logic described in the title.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed Pull request only modifies Dockerfile; no test code with dynamic test titles is introduced.
Test Structure And Quality ✅ Passed The PR modifies only images/tools/Dockerfile, a Docker build configuration file with no test code changes, making this test quality check not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from ardaguclu and tchap March 3, 2026 14:43
@dustymabe
Copy link
Member

The way we've dealt with problems like this in the past where binaries shift from one package to another is to just name the path to the binary in the installspec.

i.e. something like /usr/bin/iotop and then the resolver will find the package that provides it.

please test this suggestion, it's just a suggestion.

@sdodson sdodson changed the title images/tools/Dockerfile: Just install it and if it fails fall back to… images/tools/Dockerfile: Install iotop by path /usr/sbin/iotop Mar 3, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
images/tools/Dockerfile (1)

10-51: ⚠️ Potential issue | 🟠 Major

Avoid reusing install specs as rpm -V verify targets.

/usr/sbin/iotop is a valid installspec for yum, but rpm -V treats arguments as package names by default, not file paths. Passing /usr/sbin/iotop to rpm -V ... $INSTALL_PKGS will fail verification because /usr/sbin/iotop is not a valid package name. Split install specs from verify targets, and resolve the iotop owner package before rpm -V.

Proposed fix
-RUN INSTALL_PKGS="\
+RUN INSTALL_SPECS="\
   bash-completion \
   bc \
   bind-utils \
   blktrace \
   crash \
   e2fsprogs \
   ethtool \
   file \
   fio \
   git \
   glibc-utils \
   gzip \
   hwloc \
   /usr/sbin/iotop \
   iproute \
   iputils \
   jq \
   less \
   ltrace \
   net-tools \
   nmap-ncat \
   parted \
   pciutils \
   procps-ng \
   psmisc \
   perf \
   python3 \
   sos \
   s-nail \
   strace \
   stress-ng \
   subscription-manager \
   sysstat \
   tcpdump \
   tmux \
   util-linux \
   vim-enhanced \
   wget \
   xfsprogs \
   " && \
-  yum -y install $INSTALL_PKGS && rpm -V --nogroup --nosize --nofiledigest --nomtime --nomode $INSTALL_PKGS && yum clean all && rm -rf /var/cache/*
+  yum -y install $INSTALL_SPECS && \
+  IOTOP_PKG="$(rpm -qf /usr/sbin/iotop 2>/dev/null || rpm -qf /usr/bin/iotop)" && \
+  VERIFY_PKGS="$(echo "$INSTALL_SPECS" | sed 's#/usr/sbin/iotop##g') $IOTOP_PKG" && \
+  rpm -V --nogroup --nosize --nofiledigest --nomtime --nomode $VERIFY_PKGS && \
+  yum clean all && rm -rf /var/cache/*
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@images/tools/Dockerfile` around lines 10 - 51, The current Dockerfile builds
INSTALL_PKGS (used by yum) but then passes that same list to rpm -V, which
expects package names not file paths like /usr/sbin/iotop; fix by creating a
separate VERIFY_PKGS list containing only package names (e.g., replace file
paths with their owning package such as iotop) or programmatically resolve
owners for entries like /usr/sbin/iotop with rpm -qf before verification, then
call rpm -V on VERIFY_PKGS (leave yum -y install using INSTALL_PKGS unchanged).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@images/tools/Dockerfile`:
- Around line 10-51: The current Dockerfile builds INSTALL_PKGS (used by yum)
but then passes that same list to rpm -V, which expects package names not file
paths like /usr/sbin/iotop; fix by creating a separate VERIFY_PKGS list
containing only package names (e.g., replace file paths with their owning
package such as iotop) or programmatically resolve owners for entries like
/usr/sbin/iotop with rpm -qf before verification, then call rpm -V on
VERIFY_PKGS (leave yum -y install using INSTALL_PKGS unchanged).

ℹ️ Review info

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 57a74e4 and f8e8984.

📒 Files selected for processing (1)
  • images/tools/Dockerfile

@sdodson sdodson changed the title images/tools/Dockerfile: Install iotop by path /usr/sbin/iotop images/tools/Dockerfile: Install iotop, if that fails fall back to iotop-c Mar 3, 2026
Copy link
Member

@wking wking left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2026
@sdodson
Copy link
Member Author

sdodson commented Mar 3, 2026

/override ci/prow/e2e-agnostic-ovn-cmd ci/prow/e2e-aws-oc-ote ci/prow/e2e-aws-oc-ote-serial ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-serial-1of2 ci/prow/e2e-aws-ovn-serial-2of2 ci/prow/e2e-aws-ovn-upgrade

Build is already broken, as long as the images test passes this is an improvement.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 2026

@sdodson: Overrode contexts on behalf of sdodson: ci/prow/e2e-agnostic-ovn-cmd, ci/prow/e2e-aws-oc-ote, ci/prow/e2e-aws-oc-ote-serial, ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-serial-1of2, ci/prow/e2e-aws-ovn-serial-2of2, ci/prow/e2e-aws-ovn-upgrade

Details

In response to this:

/override ci/prow/e2e-agnostic-ovn-cmd ci/prow/e2e-aws-oc-ote ci/prow/e2e-aws-oc-ote-serial ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-serial-1of2 ci/prow/e2e-aws-ovn-serial-2of2 ci/prow/e2e-aws-ovn-upgrade

Build is already broken, as long as the images test passes this is an improvement.

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.

@sdodson
Copy link
Member Author

sdodson commented Mar 3, 2026

/override ci/prow/e2e-aws-ovn-serial-2of2

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 2026

@sdodson: Overrode contexts on behalf of sdodson: ci/prow/e2e-aws-ovn-serial-2of2

Details

In response to this:

/override ci/prow/e2e-aws-ovn-serial-2of2

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.

@sdodson
Copy link
Member Author

sdodson commented Mar 3, 2026

/override ci/prow/images
still failing on what #2215 intends to fix

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 2026

@sdodson: Overrode contexts on behalf of sdodson: ci/prow/images

Details

In response to this:

/override ci/prow/images
still failing on what #2215 intends to fix

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.

@sdodson sdodson added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 3, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: sdodson, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sdodson sdodson changed the title images/tools/Dockerfile: Install iotop, if that fails fall back to iotop-c NO-ISSUE: images/tools/Dockerfile: Install iotop, if that fails fall back to iotop-c Mar 3, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 3, 2026
@openshift-ci-robot
Copy link

@sdodson: This pull request explicitly references no jira issue.

Details

In response to this:

… iotop-c

Summary by CodeRabbit

  • Chores
  • Docker image build updated to ensure the iotop monitoring tool is reliably included during image creation.
  • Installation logic simplified for more predictable and maintainable image builds, reducing conditional checks and variability.

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 openshift-eng/jira-lifecycle-plugin repository.

@sdodson
Copy link
Member Author

sdodson commented Mar 3, 2026

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 3, 2026
@openshift-ci-robot
Copy link

@sdodson: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

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 openshift-eng/jira-lifecycle-plugin repository.

@sdodson
Copy link
Member Author

sdodson commented Mar 3, 2026

/override ci/prow/e2e-agnostic-ovn-cmd ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-upgrade

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 2026

@sdodson: Overrode contexts on behalf of sdodson: ci/prow/e2e-agnostic-ovn-cmd, ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-upgrade

Details

In response to this:

/override ci/prow/e2e-agnostic-ovn-cmd ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-upgrade

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.

@sdodson sdodson merged commit 1a56dec into openshift:main Mar 3, 2026
14 of 17 checks passed
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 2026

@sdodson: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants