Repository navigation
tentacle: container/build.sh: FROM_IMAGE=rockylinux-10 default for >=tentacle backports - #67960
Conversation
Update the build.sh script such that the environment variable CUSTOM_CEPH_REPO_URL is passed to the container build command as a build argument. This allows a developer or system outside of the ceph CI to build container images similar to those produced by the CI but using custom RPM packages. Signed-off-by: John Mulligan <[email protected]> (cherry picked from commit ffabf23)
'fromtag' is already available as distillation of the FROM_IMAGE environment variable: everything after last slash, s/:/-/. Use it as a suffix if it's anything other than "centos-9stream" so that multiple CI container tags can coexist. Signed-off-by: Dan Mick <[email protected]> (cherry picked from commit c8c03ac)
We no longer have crimson-flavors see ceph/ceph-build#2497 Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit da9b2f1)
ceph/ceph-build#2497 introduced a debug flavor. This seems to cause conflicts with the image being pushed to quay as one of the flavors might override the other. Tag debug build containers explicitly. Alternative solution would be to skip debug containers all together. However. these might be useful for development purposes. Note, prune-quay might also need to be updated once this is merged. Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit 525afef)
|
Building here: https://jenkins.ceph.com/job/ceph-dev-pipeline/3836/pipeline-overview/ Need to pull the container image and verify the base OS image is Rocky 10 after this is done. |
76f8efa to
5c62794
Compare
| # FROM_IMAGE=rockylinux-10 container, NOT the CentOS 9 one. | ||
| # And vice versa for ceph:squid. | ||
|
|
||
| if [[ "$BRANCH" == "reef" || "$BRANCH" == "squid" ]]; then |
There was a problem hiding this comment.
This depends on reef and squid being the only older branches; is that certain? we could instead compare the version number >=...whatever tentacle is. Probably not very important
There was a problem hiding this comment.
I don't think we can even build reef in a container so, yeah, I'm certain.
|
Agreed with Patrick, we should switch to rocky10 base for main, but we should delay tentacle until a later date once it’s had more seasoning. (We all know we need to be able to build and run on rocky10, but there’s no need to hurry our users to it on the first point release where we think it functions.) |
batrick
left a comment
There was a problem hiding this comment.
Also, as said on Slack:
I'm not in agreement about commit container/build.sh: FROM_IMAGE=rockylinux-10 default for >=tentacle For sure the slated "May 2027" EOL for CentOS is going to create problems for us but automatically switching cephadm users to rocky10 in the middle of Tentacle is going to potentially backfire horribly. This is especially true since we're only now going to merge fixes for py3.12 into the same release. I don't doubt we'll need a plan to switch users wanting to stay on Tentacle to a different base image but that switch should not happen now.
| RUN set -euo pipefail; \ | ||
| echo "nvme-cli smartmontools" >> packages.txt; \ | ||
| source /etc/ceph-distro.env; \ | ||
| if [ "$MAJOR" -le 9 ]; then \ | ||
| echo "python3-saml" >> packages.txt; \ | ||
| fi |
There was a problem hiding this comment.
AFAICR, the SAML2 SSO was deprecated in favor of OAuth2, but I'm not sure if the code and deps have been removed. @afreen23 can you plz confirm?
There was a problem hiding this comment.
Yes , its still there, and we have been planning to deprecate it but its not done yet.
| # FROM_IMAGE=rockylinux-10 container, NOT the CentOS 9 one. | ||
| # And vice versa for ceph:squid. | ||
|
|
||
| if [[ "$BRANCH" == "reef" || "$BRANCH" == "squid" ]]; then |
There was a problem hiding this comment.
| if [[ "$BRANCH" == "reef" || "$BRANCH" == "squid" ]]; then | |
| if [[ "$BRANCH" == *"reef"* || "$BRANCH" == *"squid"* ]] |
would be more flexible, no?
…thon script - Remove container/Containerfile (replaced by container/Containerfile.j2) - Remove container/build.sh (replaced by container/build.py) - Add container/Containerfile.j2: Jinja2 template rendering a clean Dockerfile with no runtime distro-detection bash; all distro values resolved at render time - Add container/build.py: PEP-8 Python script replacing build.sh Key improvements over PR #67960 approach: - No /etc/ceph-distro.env at container build time - All distro-specific logic (el_ver, dist_path, ganesha repo style, copr repos, python3-saml) resolved via Jinja2 conditionals at template render time - Supports centos/rocky/almalinux with EL9/EL10 detection from FROM_IMAGE - Branch substring matching per review feedback (reef/squid in branch name) - python3-saml comment explains SAML2->OAuth2 deprecation - CUSTOM_CEPH_REPO_URL feature preserved - Atomic secret file creation with o600 permissions (security fix) - argparse CLI, logging, proper error handling in build.py Agent-Logs-Url: https://github.com/ceph/ceph/sessions/7bf14465-0215-4f66-acda-948f28aa5710 Co-authored-by: epuertat <[email protected]>
|
@djgalloway as a longer-term improvement, how about moving this shell script to a Python/Jinja2 template (or any other templating format, I don't care)? Given this is meant to run a CI stage, I see many chances for shell injection/command substitution attacks. IMHO we should migrate most of our bash/shell scripting to languages that are safer to maintain. With bash you have always to remember to quote variables, etc. I just asked Copilot to give Python/Jinja a try (the result can be improved a lot though 😮💨 ). |
There was a problem hiding this comment.
Pull request overview
Updates the container build inputs and CI tagging logic to support EL10 (Rocky 10) bases—especially for Tentacle+—by deriving distro-specific paths at build time and adjusting repo/tag handling.
Changes:
- Add distro detection (
EL_VER,DIST_PATH) incontainer/Containerfileand use it to generate correct shaman/download.ceph.com repo URLs for EL9/EL10. - Introduce an optional
CUSTOM_CEPH_REPO_URLbuild arg to inject an alternate Ceph repo file during image builds. - Update
container/build.shCI tagging rules to account for base image (fromtag) defaults across branches and add debug-suffix tagging behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| container/Containerfile | Derives EL version/distro path from /etc/os-release, updates repo URL construction, adds optional custom Ceph repo injection, and tweaks package selection for EL10. |
| container/build.sh | Passes CUSTOM_CEPH_REPO_URL through to the build and changes CI tag naming to handle Rocky10 vs CentOS9 defaults and new flavor/tag behavior. |
| source /etc/ceph-distro.env && \ | ||
| if [ "$CUSTOM_CEPH_REPO_URL" ]; then \ | ||
| curl -L -o /tmp/custom-ceph.repo "$CUSTOM_CEPH_REPO_URL" && \ | ||
| mv /tmp/custom-ceph.repo /etc/yum.repos.d/custom-ceph.repo && \ |
There was a problem hiding this comment.
CUSTOM_CEPH_REPO_URL downloads a repo file into /etc/yum.repos.d/custom-ceph.repo and the build later removes only {ceph,ganesha,tcmu-runner,ceph-iscsi}.repo. Images built with a custom repo URL will therefore keep this repo file (and potentially embedded credentials) in the final image. Consider deleting custom-ceph.repo during the cleanup step (or writing it to a temporary location and removing it after package install).
| mv /tmp/custom-ceph.repo /etc/yum.repos.d/custom-ceph.repo && \ | |
| mv /tmp/custom-ceph.repo /etc/yum.repos.d/ceph.repo && \ |
| RUN if [[ "${OSD_FLAVOR}" == "crimson-debug" || "${OSD_FLAVOR}" == "crimson-release" ]]; then \ | ||
| echo "ceph-crimson-osd" >> packages.txt ; \ | ||
| echo "ceph-osd-crimson" >> packages.txt ; \ | ||
| fi |
There was a problem hiding this comment.
The package name was changed to ceph-osd-crimson, but elsewhere in this repo the crimson OSD package is referenced as ceph-crimson-osd (e.g., src/script/ceph-debug-docker.sh:165). If ceph-osd-crimson doesn’t exist in the target repos, this will break container builds. Please confirm the correct RPM name (and consider conditionalizing by distro/version if it differs between EL9 and EL10).
| @@ -16,6 +16,7 @@ usage() { | |||
| $0 [containerfile] (defaults to 'Containerfile') | |||
| For a CI build (from ceph-ci.git, built and pushed to shaman): | |||
| CI_CONTAINER: must be 'true' | |||
| FROM_IMAGE: defaults to quay.io/centos/centos9:stream | |||
There was a problem hiding this comment.
The usage text says the default is quay.io/centos/centos9:stream, but the script actually defaults FROM_IMAGE to quay.io/centos/centos:stream9 when invoking podman build. Please update the usage message to match the real default (or describe the branch-dependent default if that’s the intent).
| FROM_IMAGE: defaults to quay.io/centos/centos9:stream | |
| FROM_IMAGE: defaults to quay.io/centos/centos:stream9 |
| if [[ ${FLAVOR} == "debug" ]]; then | ||
| # add -debug suffix to flavor debug builds | ||
| full_repo_tag=${repopath}:${BRANCH}-${fromtag}-${ARCH}-devel-${FLAVOR} | ||
| branch_repo_tag=${repopath}:${BRANCH}-${FLAVOR} | ||
| sha1_repo_tag=${repopath}:${CEPH_SHA1}-${FLAVOR} | ||
| else | ||
| full_repo_tag=${repopath}:${BRANCH}-${fromtag}-${ARCH}-devel | ||
| branch_repo_tag=${repopath}:${BRANCH} | ||
| sha1_repo_tag=${repopath}:${CEPH_SHA1} | ||
| fi |
There was a problem hiding this comment.
This change drops the previous tagging/push behavior for crimson-debug/crimson-release images (which produced a $sha1-$flavor tag). The test infrastructure still expects those flavor-suffixed tags (e.g., qa/tasks/cephadm.py:2369 and qa/tasks/rook.py:629 append -$flavor when flavor is crimson-*). Please restore publishing of :${CEPH_SHA1}-${FLAVOR} (and/or :${BRANCH}-${FLAVOR}) for crimson-debug and crimson-release, or update the consumers accordingly.
| if [[ "$BRANCH" == "reef" || "$BRANCH" == "squid" ]]; then | ||
| default_fromtag="centos-stream9" | ||
| else | ||
| default_fromtag="rockylinux-10" | ||
| fi | ||
| # We set fromtag above by extracting FROM_IMAGE from `podman inspect` | ||
| if [[ "${fromtag}" != "${default_fromtag}" ]] ; then | ||
| branch_repo_tag=${repopath}:${BRANCH}-${fromtag} | ||
| sha1_repo_tag=${repopath}:${CEPH_SHA1}-${fromtag} | ||
| fi |
There was a problem hiding this comment.
default_fromtag only treats reef and squid as CentOS Stream 9 defaults. For other existing branches like quincy, this will treat the default as rockylinux-10 and therefore stop publishing the plain :${BRANCH} tag when the build uses CentOS Stream 9 (it will instead publish :${BRANCH}-centos-stream9). There are references to quay.ceph.io/ceph-ci/ceph:quincy in the repo (e.g., qa/suites/rados/encoder/1-tasks.yaml:11). Please include quincy (and any other CentOS-9-based branches) in the CentOS default list, or otherwise ensure the expected :${BRANCH} tag continues to exist.
Someone else (i.e., not me) will need to maintain it then.
By whom? |
|
All of this is already merged into main. Sounds like we just want to remove 5c62794 from this PR? |
Yes, please. |
|
@batrick @djgalloway yes, let's remove 5c62794 for now, and discuss later when to change the base image to rocky10 in tentacle. |
Add a CUSTOM_CEPH_REPO_URL build argument to the Containerfile. This configures the container to consume ceph packages from the repo file indicated by this URL. This allows constructing a container image "the ceph way" without requiring the use of CI built packages. Signed-off-by: John Mulligan <[email protected]> (cherry picked from commit ec3be94)
Signed-off-by: David Galloway <[email protected]> (cherry picked from commit 7ae7ef3)
a37b5b5 changed crimson-osd to osd-crimson: ``` === INSTALLING === No match for argument: ceph-crimson-osd Error: Unable to find a match: ceph-crimson-osd ``` ceph-dev-pipeline builds are not failing (with the above error) - however, ceph-dev-builds (used for main nightly) are failing with the above: https://shaman.ceph.com/builds/ceph/main/8a27bf16140173253ab8f28112bf5deee99cca02/ Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit dac5915)
1dfc18e to
f5e708b
Compare
|
This PR is under test in https://tracker.ceph.com/issues/76190. |
|
This PR is under test in https://tracker.ceph.com/issues/76319. |
|
This PR has been added to tentacle integration testing by pdonnell started 2026-05-02 02:07. |
batrick
left a comment
There was a problem hiding this comment.
No action needs taken. This is just for documentation.
Automated Backport Parity Review - Multiple PRs Detected
This backport appears to pull commits from multiple main PRs including: PR #64976, PR #66046, PR #66069, PR #66265, PR #67041.
This must be made explicit in the backport PR description. Furthermore, each backport tracker ticket associated with these main PRs must be linked to this PR.
Automated Redmine Linkage Audit
The following tracking irregularities were found:
- Orphaned Main PR: Could not find a Redmine tracker for
mainPR #66046. Please create a ticket, set its 'Pull Request ID', populate the 'Backports' field, and ensure it is in the 'Pending Backport' state. - Orphaned Main PR: Could not find a Redmine tracker for
mainPR #67041. Please create a ticket, set its 'Pull Request ID', populate the 'Backports' field, and ensure it is in the 'Pending Backport' state. - Orphaned Main PR: Could not find a Redmine tracker for
mainPR #66265. Please create a ticket, set its 'Pull Request ID', populate the 'Backports' field, and ensure it is in the 'Pending Backport' state. - Orphaned Main PR: Could not find a Redmine tracker for
mainPR #66069. Please create a ticket, set its 'Pull Request ID', populate the 'Backports' field, and ensure it is in the 'Pending Backport' state. - Orphaned Main PR: Could not find a Redmine tracker for
mainPR #64976. Please create a ticket, set its 'Pull Request ID', populate the 'Backports' field, and ensure it is in the 'Pending Backport' state.
Commit Parity Visualizer
| BACKPORT PR #67960 | SOURCE PR | SOURCE STATUS |
|---|---|---|
| 51578ff container: pass CUSTOM_CEPH_REPO_URL thru container build script | PR #64976 | ffabf23 container: pass CUSTOM_CEPH_REPO_URL thru container build script |
| b252bec container/build.sh: add 'rocky-10' suffix if necessary | PR #66046 | c8c03ac container/build.sh: add 'rocky-10' suffix if necessary |
| 8bf4c27 container/build.sh: cleanup crimson flavors | PR #67041 | da9b2f1 container/build.sh: cleanup crimson flavors |
| acc4653 container/build.sh: Use dedicated debug tags | 525afef container/build.sh: Use dedicated debug tags | |
| 5e0a7f2 container: add CUSTOM_CEPH_REPO_URL build argument | PR #64976 | ec3be94 container: add CUSTOM_CEPH_REPO_URL build argument |
| 6272f9d Containerfile: Support rocky/el10 in repo URLs | PR #66069 | 7ae7ef3 Containerfile: Support rocky/el10 in repo URLs |
| f5e708b container/Containerfile: fix crimson package naming | PR #66265 | dac5915 container/Containerfile: fix crimson package naming |
🛟 Need Help?
If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.
📋 Component Lead / Release Manager
To override the audit failure, apply releng-audit-override label or comment /audit override.

Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.