Skip to content

tentacle: container/build.sh: FROM_IMAGE=rockylinux-10 default for >=tentacle backports - #67960

Merged
batrick merged 7 commits into
ceph:tentaclefrom
djgalloway:r10-default-fromimage-tentacle
May 9, 2026
Merged

batrick merged 7 commits into
ceph:tentaclefrom
djgalloway:r10-default-fromimage-tentacle

Conversation

@djgalloway

@djgalloway djgalloway commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

phlogistonjohn and others added 4 commits March 23, 2026 11:33
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)
@github-actions github-actions Bot added this to the tentacle milestone Mar 23, 2026
@djgalloway

Copy link
Copy Markdown
Contributor Author

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.

@djgalloway
djgalloway force-pushed the r10-default-fromimage-tentacle branch from 76f8efa to 5c62794 Compare March 23, 2026 16:12
@djgalloway

Copy link
Copy Markdown
Contributor Author

@djgalloway

Copy link
Copy Markdown
Contributor Author

Looks like that worked.
image

Comment thread container/build.sh Outdated
# FROM_IMAGE=rockylinux-10 container, NOT the CentOS 9 one.
# And vice versa for ceph:squid.

if [[ "$BRANCH" == "reef" || "$BRANCH" == "squid" ]]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think we can even build reef in a container so, yeah, I'm certain.

@batrick batrick modified the milestones: tentacle, v20.2.2 Mar 25, 2026
@gregsfortytwo

Copy link
Copy Markdown
Member

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 batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

cc @yaarith @djgalloway

Comment thread container/Containerfile
Comment on lines +188 to +193
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No explanation for removing python3-saml? As far as I can tell, it's still a recommended dependency add in d8d3b33 by @epuertat .

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No explanation for removing python3-saml? As far as I can tell, it's still a recommended dependency add in d8d3b33 by @epuertat .

It's not available.

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.

Yes , its still there, and we have been planning to deprecate it but its not done yet.

Comment thread container/build.sh Outdated
# FROM_IMAGE=rockylinux-10 container, NOT the CentOS 9 one.
# And vice versa for ceph:squid.

if [[ "$BRANCH" == "reef" || "$BRANCH" == "squid" ]]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
if [[ "$BRANCH" == "reef" || "$BRANCH" == "squid" ]]; then
if [[ "$BRANCH" == *"reef"* || "$BRANCH" == *"squid"* ]]

would be more flexible, no?

Copilot AI added a commit that referenced this pull request Apr 8, 2026
…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]>
@epuertat

epuertat commented Apr 8, 2026

Copy link
Copy Markdown
Member

@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 😮‍💨 ).

Copilot AI left a comment

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.

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) in container/Containerfile and use it to generate correct shaman/download.ceph.com repo URLs for EL9/EL10.
  • Introduce an optional CUSTOM_CEPH_REPO_URL build arg to inject an alternate Ceph repo file during image builds.
  • Update container/build.sh CI 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.

Comment thread container/Containerfile
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 && \

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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).

Suggested change
mv /tmp/custom-ceph.repo /etc/yum.repos.d/custom-ceph.repo && \
mv /tmp/custom-ceph.repo /etc/yum.repos.d/ceph.repo && \

Copilot uses AI. Check for mistakes.
Comment thread container/Containerfile
Comment on lines 183 to 185
RUN if [[ "${OSD_FLAVOR}" == "crimson-debug" || "${OSD_FLAVOR}" == "crimson-release" ]]; then \
echo "ceph-crimson-osd" >> packages.txt ; \
echo "ceph-osd-crimson" >> packages.txt ; \
fi

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment thread container/build.sh
@@ -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

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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).

Suggested change
FROM_IMAGE: defaults to quay.io/centos/centos9:stream
FROM_IMAGE: defaults to quay.io/centos/centos:stream9

Copilot uses AI. Check for mistakes.
Comment thread container/build.sh
Comment on lines +166 to +175
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

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread container/build.sh Outdated
Comment on lines +183 to +192
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

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@djgalloway

Copy link
Copy Markdown
Contributor Author

@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)?

Someone else (i.e., not me) will need to maintain it then.

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.

By whom?

@djgalloway

Copy link
Copy Markdown
Contributor Author

All of this is already merged into main. Sounds like we just want to remove 5c62794 from this PR?

@batrick

batrick commented Apr 17, 2026

Copy link
Copy Markdown
Member

All of this is already merged into main. Sounds like we just want to remove 5c62794 from this PR?

Yes, please.

@yaarith

yaarith commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

@batrick @djgalloway yes, let's remove 5c62794 for now, and discuss later when to change the base image to rocky10 in tentacle.

phlogistonjohn and others added 3 commits April 20, 2026 11:46
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)
@batrick

batrick commented Apr 21, 2026

Copy link
Copy Markdown
Member

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@batrick batrick added the releng-audit-queue Release engineering: queued for backport verification audit. label Apr 30, 2026
@batrick

batrick commented May 2, 2026

Copy link
Copy Markdown
Member

@batrick batrick added releng-audit-pass Release engineering: passed backport verification audit. and removed releng-audit-queue Release engineering: queued for backport verification audit. labels May 2, 2026

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 main PR #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 main PR #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 main PR #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 main PR #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 main PR #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.

@batrick batrick added the releng-audit-fail Release engineering: failed backport verification audit. label May 8, 2026
@batrick
batrick merged commit 3065bd0 into ceph:tentacle May 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build/ops needs-qa releng-audit-fail Release engineering: failed backport verification audit. releng-audit-pass Release engineering: passed backport verification audit. rocky10-tentacle wip-pdonnell-testing2

Projects

None yet

Development

Successfully merging this pull request may close these issues.