Skip to content

ROX-14475: Upgrade to UBI9 - postgres rpm download#15337

Closed
davdhacs wants to merge 25 commits intomasterfrom
ROX-14476-ubi9-postgresupdate
Closed

ROX-14475: Upgrade to UBI9 - postgres rpm download#15337
davdhacs wants to merge 25 commits intomasterfrom
ROX-14476-ubi9-postgresupdate

Conversation

@davdhacs
Copy link
Contributor

@davdhacs davdhacs commented May 16, 2025

to test #15335

@davdhacs davdhacs requested review from a team as code owners May 16, 2025 21:10
@davdhacs davdhacs added the hold label May 16, 2025
@davdhacs davdhacs requested review from porridge and removed request for a team May 16, 2025 21:10
@davdhacs
Copy link
Contributor Author

/test gke-qa-e2e-tests

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @davdhacs - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@davdhacs davdhacs changed the title ROX-14475: Upgrade to UBI9 ROX-14475: Upgrade to UBI9 - postgres rpm download May 16, 2025
@rhacs-bot
Copy link
Contributor

rhacs-bot commented May 16, 2025

Images are ready for the commit at e2ebc0c.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.8.x-869-ge2ebc0c2a7.

@codecov
Copy link

codecov bot commented May 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.26%. Comparing base (14e8fe1) to head (e2ebc0c).
Report is 329 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #15337   +/-   ##
=======================================
  Coverage   49.25%   49.26%           
=======================================
  Files        2581     2581           
  Lines      189350   189350           
=======================================
+ Hits        93261    93277   +16     
+ Misses      88746    88732   -14     
+ Partials     7343     7341    -2     
Flag Coverage Δ
go-unit-tests 49.26% <ø> (+<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.

@davdhacs
Copy link
Contributor Author

/retest

@davdhacs
Copy link
Contributor Author

davdhacs commented May 19, 2025

looking at one of the tests, https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/stackrox_stackrox/15337/pull-ci-stackrox-stackrox-master-ocp-4-18-qa-e2e-tests/1923844275313840128

central-6db6cdfc98-jzk4k 0/1 CrashLoopBackOff 6 (4m33s ago)

$ head -5 ./stackrox/pods/central-6db6cdfc98-jzk4k-central-previous.log
cp: cannot remove '/etc/pki/ca-trust/extracted/pem/directory-hash/002c0b4f.0': Permission denied
cp: cannot remove '/etc/pki/ca-trust/extracted/pem/directory-hash/01419da9.0': Permission denied
cp: cannot remove '/etc/pki/ca-trust/extracted/pem/directory-hash/0179095f.0': Permission denied
cp: cannot remove '/etc/pki/ca-trust/extracted/pem/directory-hash/02265526.0': Permission denied
cp: cannot remove '/etc/pki/ca-trust/extracted/pem/directory-hash/04f60c28.0': Permission denied

so, it looks like something with updating ca's is being blocked. Maybe the owner changed in the base image (not sure if we're using a different uid) or there is an additional step required on rhel9 for an update

@porridge
Copy link
Contributor

I don't pretend to understand why we're messing around with /etc/pki in the first place. Maybe this is a good opportunity to find out whether it's still a good idea?

@davdhacs
Copy link
Contributor Author

I don't pretend to understand why we're messing around with /etc/pki in the first place. Maybe this is a good opportunity to find out whether it's still a good idea?

Maybe it is a system service that is running or triggered somehow; I do not know if we're running anything outside our entrypoint

@davdhacs
Copy link
Contributor Author

We are replacing these files in the https://github.com/stackrox/stackrox/blob/master/image/rhel/static-bin/central-entrypoint.sh#L25
calling https://github.com/stackrox/stackrox/blob/master/image/rhel/static-bin/import-additional-cas
which runs the update-ca-trust utility script that creates the /etc/pki/ca-trust/extracted files (the man page explains the dirs+files and to only use the script to modify these files. it looks like we're following the guidelines).

@davdhacs davdhacs marked this pull request as draft May 20, 2025 13:28
@davdhacs
Copy link
Contributor Author

/test gke-qa-e2e-tests

@davdhacs
Copy link
Contributor Author

/test gke-qa-e2e-tests

@davdhacs
Copy link
Contributor Author

I was wrong. The file perms error is earlier (https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/stackrox_stackrox/15337/pull-ci-stackrox-stackrox-master-gke-qa-e2e-tests/1924872987819905024/artifacts/gke-qa-e2e-tests/stackrox-stackrox-e2e-test/artifacts/central-74d7c79ff5-5kkm4-central-previous.log):

++ id -u
+ '[' 4000 == 0 ']'
+ restore-all-dir-contents
cp: cannot remove '/etc/pki/ca-trust/extracted/pem/directory-hash/002c0b4f.0': Permission denied
cp: cannot remove '/etc/pki/ca-trust/extracted/pem/directory-hash/01419da9.0': Permission denied
cp: cannot remove '/etc/pki/ca-trust/extracted/pem/directory-hash/0179095f.0': Permission denied

@davdhacs
Copy link
Contributor Author

/test gke-nongroovy-e2e-tests

@davdhacs
Copy link
Contributor Author

An example of a failed overwrite file tls-ca-bundle.pem is owned by the running user (uid=4000) but not with write permissions:
(https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/stackrox_stackrox/15337/pull-ci-stackrox-stackrox-master-gke-ui-e2e-tests/1925667877780721664/artifacts/gke-ui-e2e-tests/stackrox-stackrox-e2e-test/artifacts/central-6d6f78c77c-kxzrh-central-previous.log)

/etc/pki/ca-trust/extracted/pem:
total 912
drwxr-sr-x 3 4000 4000   4096 May 22 22:15 .
drwxr-sr-x 6 4000 4000   4096 May 22 22:09 ..
-rw-r--r-- 1 4000 4000    898 May 22 22:15 README
dr-xr-xr-x 2 4000 4000  20480 May 22 22:09 directory-hash
-r--r--r-- 1 4000 4000 165521 May 22 22:15 email-ca-bundle.pem
-r--r--r-- 1 4000 4000 502506 May 22 22:15 objsign-ca-bundle.pem
-r--r--r-- 1 4000 4000 226489 May 22 22:15 tls-ca-bundle.pem

I think the cp should still pass because of the -f and the user has write permissions on the directory. But it doesn't so is the no-write permission may be enforced differently because .. k8s volume? something specific with this cp?

@davdhacs
Copy link
Contributor Author

summary of what I understand of the file-perms failure in central startup:

  1. we volume mount directories to make them writable and keep the root filesystem read-only
  2. the files are saved to /.init-dirs and then copied back into the volumes (emptyDir on k8s, or replacing the contents on a docker run volume)
  3. for some of these files, there are other writes (example from update-ca-certificates to any changed ca ssl files)

Problem:
File write errors during central pod startup. I think the errors are all with, /etc/pki/ca-trust/extracted/pem/directory-hash/ files that I did not find on UBI8 and appear to be a new feature for the trusted ca files:
cp: cannot remove '/etc/pki/ca-trust/extracted/pem/directory-hash/ff34af3f.0': Permission denied

@davdhacs
Copy link
Contributor Author

/test gke-qa-e2e-tests

@openshift-ci
Copy link

openshift-ci bot commented May 29, 2025

@davdhacs: The following tests 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/gke-upgrade-tests 6ff81f7 link false /test gke-upgrade-tests
ci/prow/ocp-4-12-nongroovy-e2e-tests 6ff81f7 link false /test ocp-4-12-nongroovy-e2e-tests
ci/prow/ocp-4-12-qa-e2e-tests 6ff81f7 link false /test ocp-4-12-qa-e2e-tests
ci/prow/gke-operator-e2e-tests 6ff81f7 link false /test gke-operator-e2e-tests
ci/prow/ocp-4-18-nongroovy-e2e-tests 6ff81f7 link false /test ocp-4-18-nongroovy-e2e-tests
ci/prow/ocp-4-12-operator-e2e-tests 6ff81f7 link false /test ocp-4-12-operator-e2e-tests
ci/prow/ocp-4-18-qa-e2e-tests 6ff81f7 link false /test ocp-4-18-qa-e2e-tests
ci/prow/ocp-4-18-operator-e2e-tests 6ff81f7 link false /test ocp-4-18-operator-e2e-tests
ci/prow/gke-scanner-v4-install-tests 6ff81f7 link false /test gke-scanner-v4-install-tests
ci/prow/ocp-4-12-scanner-v4-install-tests 6ff81f7 link false /test ocp-4-12-scanner-v4-install-tests
ci/prow/ocp-4-18-scanner-v4-install-tests 6ff81f7 link false /test ocp-4-18-scanner-v4-install-tests
ci/prow/gke-nongroovy-e2e-tests 5239acb link true /test gke-nongroovy-e2e-tests
ci/prow/gke-ui-e2e-tests 5239acb link true /test gke-ui-e2e-tests
ci/prow/gke-qa-e2e-tests cf12b4d link false /test gke-qa-e2e-tests

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.

@BradLugo BradLugo mentioned this pull request Jun 15, 2025
9 tasks
@davdhacs davdhacs closed this Jul 11, 2025
@davdhacs davdhacs deleted the ROX-14476-ubi9-postgresupdate branch July 11, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants