Skip to content

squid: update spdk submodule and python compatibility changes - #67199

Closed
tchaikov wants to merge 32 commits into
ceph:squidfrom
tchaikov:wip-squid-update-spdk
Closed

tchaikov wants to merge 32 commits into
ceph:squidfrom
tchaikov:wip-squid-update-spdk

Conversation

@tchaikov

@tchaikov tchaikov commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

This PR backports two SPDK submodule bumps to the squid branch to resolve a build failure introduced by newer glibc versions.

Background

Building with newer glibc causes a FTBFS due to conflicts in SPDK. The fix for this issue is already present in SPDK's main branch and has been integrated into Ceph's main branch via commits

Changes

This PR cherry-picks the necessary SPDK submodule updates to bring the squid branch in line with main, resolving the build failure.

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.

@tchaikov tchaikov added this to the squid milestone Feb 4, 2026
@tchaikov
tchaikov requested a review from a team as a code owner February 4, 2026 13:52
@djgalloway

Copy link
Copy Markdown
Contributor

I retriggered API tests. Thank you so much, @tchaikov.

@nizamial09

Copy link
Copy Markdown
Member

thanks @tchaikov. now the API tests are failing on pyo3 failure

2026-02-04T23:00:18.264+0000 7a4a2c8116c0  0 log_channel(audit) log [DBG] : from='client.4951 -' entity='client.admin' cmd=[{"prefix": "dashboard create-self-signed-cert", "target": ["mon-mgr", ""]}]: dispatch
2026-02-04T23:00:18.276+0000 7a4a247f96c0 -1 mgr handle_command module 'dashboard' command handler threw exception: PyO3 modules compiled for CPython 3.8 or older may only be initialized once per interpreter process
2026-02-04T23:00:18.281+0000 7a4a247f96c0 -1 mgr.server reply reply (22) Invalid argument Traceback (most recent call last):
  File "/home/jenkins-build/build/workspace/ceph-api/src/pybind/mgr/mgr_module.py", line 1910, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jenkins-build/build/workspace/ceph-api/src/pybind/mgr/mgr_module.py", line 501, in call
    return self.func(mgr, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jenkins-build/build/workspace/ceph-api/src/pybind/mgr/dashboard/module.py", line 467, in set_mgr_created_self_signed_cert
    cert, pkey = create_self_signed_cert('IT', 'ceph-dashboard')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jenkins-build/build/workspace/ceph-api/src/pybind/mgr/mgr_util.py", line 534, in create_self_signed_cert
    from OpenSSL import crypto
  File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import SSL, crypto
  File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 9, in <module>
    from OpenSSL._util import (
  File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 15, in <module>
    from cryptography.exceptions import InternalError
  File "/usr/lib/python3/dist-packages/cryptography/exceptions.py", line 9, in <module>
    from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions
ImportError: PyO3 modules compiled for CPython 3.8 or older may only be initialized once per interpreter process

I had this branch created to backport the pyo3 fixes to squid a while ago. Probably we can also include that commits to this PR?

@nizamial09

Copy link
Copy Markdown
Member

API tests failed on a flaky test thats being fixed in main: https://jenkins.ceph.com/job/ceph-api/110109/

@nizamial09

Copy link
Copy Markdown
Member

jenkins test api

@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Feb 5, 2026
@tchaikov tchaikov changed the title squid: update spdk submodule squid: update spdk submodule and python compatibility changes Feb 5, 2026
@tchaikov

tchaikov commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

@nizamial09 thanks Nizamudeen! as this patchset is non trivial, i am adding the needs-qa label in hope to get it included in the next batch of our qa test.

@djgalloway

Copy link
Copy Markdown
Contributor

@tchaikov Is there a particular suite that would be best? I can schedule one.

@tchaikov

tchaikov commented Feb 9, 2026 •

Copy link
Copy Markdown
Contributor Author

@tchaikov Is there a particular suite that would be best? I can schedule one.

@djgalloway Hi David, thank you for offering to help with testing! I reviewed the integration tests used to verify the PRs included in this changeset and found:

Both ran the orch:cephadm test suite, so I'd recommend scheduling a run of orch:cephadm as well. Running 100 tests should provide sufficient coverage. I pushed the branch to CI, and it has been built at https://shaman.ceph.com/builds/ceph/wip-squid-pr-67199-kefu-1/

@djgalloway

Copy link
Copy Markdown
Contributor

@yuriw yuriw removed this from the squid milestone Feb 24, 2026
phlogistonjohn and others added 20 commits March 4, 2026 19:19
Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit 2b9cf24)

 Conflicts:
	src/pybind/mgr/mgr_util.py
 - accepted incoming changes
Signed-off-by: Paulo E. Castro <[email protected]>
(cherry picked from commit 4bcab13)
…he exit.

Signed-off-by: Paulo E. Castro <[email protected]>
(cherry picked from commit 56d508f)
The remote verify_tls function was not raising errors when it should.
Fix the function so that it always returns an object when it succeeds or
fails gracefully. Always parse that function in the crypto caller class.

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit 96a7a72)
…ode/decode.

Signed-off-by: Paulo E. Castro <[email protected]>
(cherry picked from commit e364df3)
Signed-off-by: Paulo E. Castro <[email protected]>
(cherry picked from commit 21d6e1d)

 Conflicts:
	src/pybind/mgr/cephadm/cert_mgr.py
 - removed this file since it doesn't exist in squid
Name the parser objects after their functions and not `foo` and `bar`.

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit 5d4eeff)
Replace a direct usage of bycrypt with our cryptocaller wrapper.

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit d2fd81e)
Why violate the typing in a test? mypy never noticed this because tests
are not type checked but there seems to be no need to turn a str into
bytes to pass to a function that is typed only as taking str!

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit 955143d)
The functions now handle the i/o but allow the crypto function class
to centralize the functions that actually use the crypto libs.

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit 4e4cfa5)
Use a main function to encapsulate the cli parsing rather than a block
of code in module scope.

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit c98e53f)
Lightly reorganize and make the "endpoint" functions in cryptotools.py more
consistent and uniform. Use small functions for input and output
handling so that the handling is done the same way throughout. Pass a
pre-constructed crypto caller via the args to then endpoint functions.
Make generating the private key it's own named function rather than
one single (and only) function with overloaded behavior controlled by
a cli switch.

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit 552d7b4)
Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit c3dc34a)
Add a module to select a desired crypto caller. Update the callers
to use the crypto caller interface.

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit 0eb2f4b)
Previously, the internal crypto caller would catch (and convert) some
errors when reading the cert but not all cases. Move the logic to catch
the errors to a common location and do it once consistently.

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit f6ab087)
The cephadm modules needs to use python cryptography module for ssh (via
asyncssh) and thus there's no need to use the remote crypto caller in
cephadm. Configure cephadm to always use the internal cryptocaller.

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit 2128ffa)

 Conflicts:
	src/pybind/mgr/cephadm/module.py
 - REQUIRE_POST_OPTIONS import was not present in that file on squid, so
   removing it
Add a mgr config option `crypto_caller` that lets a ceph user override
the default behavior of using the remote crypto caller. Supported
values are `internal` and `remote`.

Signed-off-by: John Mulligan <[email protected]>
(cherry picked from commit 27c2050)

 Conflicts:
	src/pybind/mgr/dashboard/module.py
 - removed the sso oauth2 option
in frontend e2e.sh file, we don't need to start the node venv early on
before the ceph cluster is started. we only need it for the `npm` or
`npx` commands. Starting node virtual env and then starting ceph will
cause the ceph cluster to assume the node-env python as the python
environment which breaks the cryptotools call.

So moving the node-env venv start after the ceph is created

Fixes: https://tracker.ceph.com/issues/73804
Signed-off-by: Nizamudeen A <[email protected]>
(cherry picked from commit a56ae5b)
(cherry picked from commit 411fcaa)
@tchaikov
tchaikov force-pushed the wip-squid-update-spdk branch from 05b55d1 to 4899c9b Compare March 4, 2026 11:20
@tchaikov

tchaikov commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

rebased against latest squid HEAD, to address the test failure of "Check for missing .qa links".

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

Hi @tchaikov, thanks for the fixes. I'm wondering about this change and others which appear to be related to python3.12. We do not support a distribution with that python version for squid?

Comment thread do_cmake.sh
MAJOR_VER=$(echo "$VERSION_ID" | sed -e 's/\..*$//')
if [ "$MAJOR_VER" -ge "22" ] ; then
if [ "$MAJOR_VER" -ge "24" ] ; then
PYBUILD="3.12"

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.

Noble is not supported on squid (not even yet on main), why is this change necessary?

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.

@batrick Noble is used on at least some of our test nodes (e.g. soko08). This change was cherry-picked from 4df3683, which was originally created to address the exact same test failure after some test nodes were upgraded to Ubuntu Noble:

CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS
  Python3_LIBRARIES Interpreter Development Development.Module
  Development.Embed) (Required is exact version "3.10")

      Reason given by package: 
          Interpreter: Wrong version for the interpreter "/bin/python3"

Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindPython/Support.cmake:3863 (find_package_handle_standard_args)
  cmake/modules/FindPython3.cmake:545 (include)
  CMakeLists.txt:557 (find_package)

This failure was triggered while testing the squid backport in #67623. Since "Ceph API tests" is a required gating workflow, this was blocking merges — hence backporting #61827 to fix it. An example of the failing run is here.

@batrick batrick Mar 5, 2026 •

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.

I'm concerned that even allowing a build on Squid on Noble might give users the false impression it will work. We already know (as part of the rocky10 effort) that the ceph-mgr will fail in surprising ways with py3.12.

That we're using Noble for our test nodes is a separate issue. I'm also discovering that change in this reef backport: #67657

I don't think this distribution upgrade was appropriate for Squid/Reef. I'm trying to learn more about what happened here.

@tchaikov tchaikov Mar 5, 2026 •

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.

@batrick Hi Patrick, i don't think we claim to user that Squid supports Nobel in this changeset. the changeset was originally created to address the build failure caused by SPDK + glibc in our CI, and later was expanded to address more issues due to our building host changes. none of these changes updates the supporting matrix. but yes, they are pulled in to enable us to support Nobel. but the idea is merely to fix the CI workflow.

@djgalloway what do you think? if i am working in the wrong direction, i am happy to close this pull request.

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.

I think the builders must be fixed to build with Jammy for ceph api tests. That seems to be the primary issue.

Are there other build failures (jenkins or otherwise) caused by inappropriately using Noble?

cc @djgalloway @dmick @akraitman

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.

@tchaikov I'm not rejecting all of these requested changes. If perhaps, you're trying to support Noble for some internal user that's fine but the Noble specific changes must be carried downstream. The other changes should be backported through the normal tracker ticket process with separate PRs. (If no main tracker exists, a manual backport ticket should be created.)

@tchaikov tchaikov Mar 6, 2026 •

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.

Thanks Patrick.

I think the builders must be fixed to build with Jammy for ceph api tests. That seems to be the primary issue.

Are there other build failures (jenkins or otherwise) caused by inappropriately using Noble?

cc @djgalloway @dmick @akraitman

I think all of these commits were backported to fix the FTBFS and test failures with/on Nobel. Again, I am not trying to support "some internal users", but to fix the test failures.

The other changes should be backported through the normal tracker ticket process with separate PRs.

I see. And i am going to close this pull request. i created it per the request of @djgalloway .

@github-project-automation github-project-automation Bot moved this from Reviewer approved to Review in progress in Ceph-Dashboard Mar 4, 2026
@tchaikov tchaikov closed this Mar 6, 2026
@github-project-automation github-project-automation Bot moved this from Review in progress to Done in Ceph-Dashboard Mar 6, 2026
@tchaikov
tchaikov deleted the wip-squid-update-spdk branch March 10, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

10 participants