Skip to content

chore(deps): remove unix utils from release image#14487

Merged
janisz merged 0 commit intomasterfrom
remove_kill
Mar 25, 2025
Merged

chore(deps): remove unix utils from release image#14487
janisz merged 0 commit intomasterfrom
remove_kill

Conversation

@janisz
Copy link
Copy Markdown
Contributor

@janisz janisz commented Mar 4, 2025

Description

linux-utils was added when we moved to ubi-minimal as it was required by e2e tests that uses kill in main container.
This need was removed when test was rewritten in go. So we can remove linux-utils.


  • CHANGELOG update is not needed
  • Documentation is not needed

Testing

  • inspected CI results

Automated testing

  • modified existing tests
  • contributed no automated tests

How I validated my change

CI

@janisz
Copy link
Copy Markdown
Contributor Author

janisz commented Mar 4, 2025

This change is part of the following stack:

Change managed by git-spice.

@rhacs-bot
Copy link
Copy Markdown
Contributor

rhacs-bot commented Mar 4, 2025

Images are ready for the commit at 4259821.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.8.x-255-g4259821aa3.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.17%. Comparing base (0762805) to head (4259821).
Report is 57 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #14487   +/-   ##
=======================================
  Coverage   49.17%   49.17%           
=======================================
  Files        2532     2532           
  Lines      185508   185508           
=======================================
+ Hits        91223    91229    +6     
+ Misses      87047    87042    -5     
+ Partials     7238     7237    -1     
Flag Coverage Δ
go-unit-tests 49.17% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@porridge porridge left a comment

Choose a reason for hiding this comment

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

I'm assuming the unit test failure is unrelated.

microdnf -y upgrade --nobest && \
rpm -i --nodeps /tmp/postgres-libs.rpm && \
rpm -i --nodeps /tmp/postgres.rpm && \
microdnf install --setopt=install_weak_deps=0 --nodocs -y lz4 bzip2 util-linux && \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Besides other things, util-linux provides /usr/bin/kill and /usr/bin/more. I use them when debugging things in containers. What's the vision of all these change? Are we going to reduce the containers to scratch? I think we need to talk.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@msugakov have you tried using ephemeral debug containers for such debugging? That's the suggested solution for reducing bloat yet allowing arbitrary debug tools..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I tried that few years back and I did not understand how to use it.
Trying now on some demo cluster. Willing to connect to node scanner container (called node-inventory) in the collector pod and list processes. Here's what I observe:

$ kubectl --namespace stackrox debug -it collector-lxdxb --image=registry.access.redhat.com/ubi9/ubi --target=node-inventory

$ cat /etc/system-release
Red Hat Enterprise Linux release 9.5 (Plow)
# this is from the debug container because node scanner is 8-based. I should see this instead:
# Red Hat Enterprise Linux release 8.10 (Ootpa)

$ ls /
afs  bin  boot	dev  etc  home	lib  lib64  media  mnt	opt  proc  root  run  sbin  srv  sys  tmp  usr	var
# nope, I should see the following:
# THIRD_PARTY_NOTICES  entrypoint.sh	     import-additional-cas  mnt			      root		 srv		var
# bin		     etc		     lib		    opt			      run		 sys
# boot		     genesis_manifests.json  lib64		    proc		      save-dir-contents  tmp
# cache		     home		     lost+found		    repo2cpe		      sbin		 trust-root-ca
# dev		     host		     media		    restore-all-dir-contents  scanner		 usr
# I don't know where's everything.

$ ps
bash: ps: command not found
$ dnf install procps-ng
$ ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root          68       0  0 19:18 pts/0    00:00:00 /bin/bash
root         112      68  0 19:24 pts/0    00:00:00 ps -ef
# No idea where to look for node scanner

Maybe I'm missing something stupidly obvious but not sure what.
Did you have more success with the debug containers? I'd be happy to move this conversation to Slack if you prefer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No, sorry, I never actually tried it. I totally just blindly believed the "best thing since " hype 😅

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe --target would help with the ps but no idea about the files...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I used --target in my command.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, right, perhaps OpenShift's container runtime does not support this 🤷🏻

@janisz janisz changed the base branch from remove_xml to master March 18, 2025 12:05
@janisz janisz requested review from a team, adisos, shireenf-ibm and zivnevo as code owners March 18, 2025 12:05
@janisz janisz requested review from msugakov and vladbologa and removed request for a team March 18, 2025 12:05
@janisz janisz removed request for a team, adisos, shireenf-ibm, vladbologa and zivnevo March 18, 2025 15:13
@janisz janisz added the auto-retest PRs with this label will be automatically retested if prow checks fails label Mar 18, 2025
@rhacs-bot
Copy link
Copy Markdown
Contributor

/retest

1 similar comment
@rhacs-bot
Copy link
Copy Markdown
Contributor

/retest

@msugakov msugakov added the ci-all-qa-tests Tells CI to run all API tests (not just BAT). label Mar 24, 2025
Copy link
Copy Markdown
Contributor

@msugakov msugakov left a comment

Choose a reason for hiding this comment

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

@janisz I think without the ci-all-qa-tests label not all Groovy tests run. I added the label. Please re-trigger Groovy and let's see whether the CI would still be happy.
Also, I'd ask you to check nightlies results after this PR (and the other #14489 too) gets merged to make sure there are no regressions caused by the changes. Deal?

@janisz janisz merged commit 8e68c6a into master Mar 25, 2025
129 of 161 checks passed
@janisz janisz deleted the remove_kill branch March 25, 2025 12:06
@janisz janisz restored the remove_kill branch March 25, 2025 12:07
@janisz
Copy link
Copy Markdown
Contributor Author

janisz commented Mar 25, 2025

@msugakov @porridge I screw on rebase (I want to rerun all tests) and I pushed master so for github it looks like it was merged so I need to open a new PR 😞

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

Labels

area/helm auto-retest PRs with this label will be automatically retested if prow checks fails ci-all-qa-tests Tells CI to run all API tests (not just BAT).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants