Skip to content

tentacle: mgr/cephadm: block upgrades onto hosts whose CPU cannot run the target release - #72513

Merged
batrick merged 2 commits into
ceph:tentaclefrom
djgalloway:wip-81458-tentacle
Oct 14, 2026
Merged

batrick merged 2 commits into
ceph:tentaclefrom
djgalloway:wip-81458-tentacle

Conversation

@djgalloway

Copy link
Copy Markdown
Contributor

Compute the highest x86-64 microarchitecture level (x86-64-v1 through
x86-64-v4) supported by the host CPU from /proc/cpuinfo feature flags
and report it as a new 'cpu_isa_level' fact on x86-64 hosts. This will
be used by the orchestrator to refuse upgrades to releases whose
official builds require a higher level than a host CPU supports
(umbrella builds require x86-64-v3).

Fixes: https://tracker.ceph.com/issues/80878
Assisted-by: Claude Fable 5
Signed-off-by: David Galloway <[email protected]>
(cherry picked from commit 79b24c5)
…t release

Official builds of umbrella (21.x) and later require CPUs supporting
x86-64-v3. On an x86-64-v2 host the binaries in the target image die
with "Fatal glibc error: CPU does not support x86-64-v3"; today the
first casualty is cephadm's in-container version probe, so the upgrade
pauses with a misleading UPGRADE_FAILED_PULL alert (found this way on
the sepia lab Long Running Cluster, whose mira nodes are x86-64-v2).

Compare each host's cpu_isa_level fact against the level the target
release requires:

* 'ceph orch upgrade start --ceph-version' refuses to start and lists
  the incompatible hosts
* image-based and in-flight upgrades pause with a new
  UPGRADE_INCOMPATIBLE_HOST_CPU health alert once the target version
  is learned from the image
* 'ceph orch upgrade check' reports the incompatibility
* staggered upgrades restricted via --hosts only consider those hosts
* hosts with an unknown ISA level (no facts yet, non-x86) are skipped

The check can be disabled with
'ceph config set mgr mgr/cephadm/upgrade_cpu_isa_check false' for
custom-built images targeting older CPU generations.

Fixes: https://tracker.ceph.com/issues/80878
Assisted-by: Claude Fable 5
Signed-off-by: David Galloway <[email protected]>
(cherry picked from commit 359b68c)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ceph Release Engineering Audit Report

Automated Backport Parity Review

Discrepancies detected between the backport PR and the original source PR(s). Please see the Commit Parity Visualizer below.


Commit Parity Visualizer

BACKPORT PR #72513 SOURCE PR SOURCE STATUS
ff09f21 cephadm: report cpu_isa_level in host facts PR #72090 79b24c5 cephadm: report cpu_isa_level in host facts
b8e88c8 mgr/cephadm: block upgrades onto hosts whose CPU cannot run the target release 359b68c mgr/cephadm: block upgrades onto hosts whose CPU cannot run the target release
<<<< MISSING IN BACKPORT >>>> 22e6137 Merge remote-tracking branch 'origin/main' into ceph-upgrade-x86-64-v2-warning-ed4bea

Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations

⚠️ WARNING: Cherry-pick conflicts or deviations were found that require component lead review.

A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

This does not necessarily indicate an issue but a maintainer should review.

**Click to expand conflict summaries.**

Deviation in Backport ff09f21 (cherry-pick of 79b24c5)

Affected File(s)

Range Diff

Click to expand
--- Original (79b24c53)
+++ Backport (ff09f218)
@@ -10,3 +10,4 @@
 Fixes: https://tracker.ceph.com/issues/80878
 Assisted-by: Claude Fable 5
 Signed-off-by: David Galloway <[email protected]>
+(cherry picked from commit 79b24c53fd0ab74234631cf793255df3fd30444e)

================================================================================
RANGE DIFF
================================================================================

1:  79b24c53fd0 ! 1:  ff09f218dc0 cephadm: report cpu_isa_level in host facts
    @@ Commit message
         Fixes: https://tracker.ceph.com/issues/80878
         Assisted-by: Claude Fable 5
         Signed-off-by: David Galloway <[email protected]>
    +    (cherry picked from commit 79b24c53fd0ab74234631cf793255df3fd30444e)
     
      ## src/cephadm/cephadmlib/host_facts.py ##
     @@ src/cephadm/cephadmlib/host_facts.py: from cephadmlib.net_utils import get_fqdn, get_ipv4_address, get_ipv6_address
    @@ src/cephadm/cephadmlib/host_facts.py: class HostFacts:
              # type: () -> List[str]
     
      ## src/cephadm/tests/test_host_facts.py ##
    -@@ src/cephadm/tests/test_host_facts.py: def test_host_facts_skips_sysfs_only_nvme_alias_entries(cephadm_fs):
    - 
    -     hfacts = object.__new__(HostFacts)
    -     assert hfacts._get_block_devs() == ['nvme2n1']
    +@@ src/cephadm/tests/test_host_facts.py: def test_host_facts_security(cephadm_fs):
    +     assert ksec['complain'] == 0
    +     assert ksec['enforce'] == 1
    +     assert ksec['unconfined'] == 2
     +
     +
     +class TestX86_64IsaLevel:

Deviation in Backport b8e88c8 (cherry-pick of 359b68c)

Affected File(s)

Range Diff

Click to expand
--- Original (359b68c1)
+++ Backport (b8e88c8b)
@@ -26,3 +26,4 @@
 Fixes: https://tracker.ceph.com/issues/80878
 Assisted-by: Claude Fable 5
 Signed-off-by: David Galloway <[email protected]>
+(cherry picked from commit 359b68c1d3baf03e905aea7668a5949c84b31f57)

================================================================================
RANGE DIFF
================================================================================

1:  359b68c1d3b ! 1:  b8e88c8b08e mgr/cephadm: block upgrades onto hosts whose CPU cannot run the target release
    @@ Commit message
         Fixes: https://tracker.ceph.com/issues/80878
         Assisted-by: Claude Fable 5
         Signed-off-by: David Galloway <[email protected]>
    +    (cherry picked from commit 359b68c1d3baf03e905aea7668a5949c84b31f57)
     
      ## PendingReleaseNotes ##
     @@
    - >=22.0.0
    - 
     +* Cephadm: ``ceph orch upgrade start`` and ``ceph orch upgrade check`` now
     +  verify that every host's CPU supports the x86-64 microarchitecture level
     +  required by the target release (official builds of 21.x and later require
    @@ PendingReleaseNotes
     +  ``cpu_isa_level`` host fact (e.g. ``x86-64-v2``). The check can be disabled
     +  with ``ceph config set mgr mgr/cephadm/upgrade_cpu_isa_check false``, e.g.
     +  when running custom-built images targeting an older CPU generation.
    - * RGW: The default value of ``rgw_rest_conn_connect_to_resolved_ips`` changed
    -   from ``false`` to ``true``.
    - * RGW: The default value of ``rgw_rest_conn_ip_fail_timeout_secs`` changed
    ++
    + * RADOS: PG autoscaler allows overlapping roots. Each root receives a PG target based
    +   on its OSDs, with OSDs shared across multiple roots contributing proportionally
    +   less to each root's allocation.
     
      ## doc/cephadm/upgrade.rst ##
     @@ doc/cephadm/upgrade.rst: the following commands:
    @@ doc/cephadm/upgrade.rst: the following commands:
     +  ceph config set mgr mgr/cephadm/upgrade_cpu_isa_check false
     +
     +
    - Using Customized Container Images
    + Using customized container images
      =================================
      
     
      ## src/pybind/mgr/cephadm/module.py ##
     @@ src/pybind/mgr/cephadm/module.py: class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule):
                  default=10 * 60,
    -             desc='How frequently to perform a host check',
    +             desc='how frequently to perform a host check',
              ),
     +        Option(
     +            'upgrade_cpu_isa_check',
    @@ src/pybind/mgr/cephadm/module.py: class CephadmOrchestrator(orchestrator.Orchest
                  'stray_daemon_check_interval',
                  type='secs',
     @@ src/pybind/mgr/cephadm/module.py: class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule):
    -             self.allow_lo_routes = False
    -             self.allow_bgp_routes = False
    +             self.daemon_cache_timeout = 0
    +             self.facts_cache_timeout = 0
                  self.host_check_interval = 0
     +            self.upgrade_cpu_isa_check = True
                  self.stray_daemon_check_interval = 0
    @@ src/pybind/mgr/cephadm/module.py: Then run the following:
              r: dict = {
     
      ## src/pybind/mgr/cephadm/tests/test_upgrade.py ##
    -@@ src/pybind/mgr/cephadm/tests/test_upgrade.py: def test_do_upgrade_limit_exhausted_marks_complete_without_scope_check(
    - 
    -     mark_complete.assert_called_once()
    -     filtered_scope.assert_not_called()
    +@@ src/pybind/mgr/cephadm/tests/test_upgrade.py: def test_staggered_upgrade_validation(
    +     else:
    +         cephadm_module.upgrade._validate_upgrade_filters(
    +             'new_image_name', daemon_types, hosts, services)
     +
     +
     [email protected]("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
    @@ src/pybind/mgr/cephadm/upgrade.py: MID_UPGRADE_MUTED_WARNINGS = [
      def normalize_image_digest(digest: str, default_registry: str) -> str:
          """
     @@ src/pybind/mgr/cephadm/upgrade.py: class CephadmUpgrade:
    +         'UPGRADE_BAD_TARGET_VERSION',
    +         'UPGRADE_EXCEPTION',
              'UPGRADE_OFFLINE_HOST',
    -         'UPGRADE_INVALID_CRUSH_BUCKET',
    -         'UPGRADE_OSD_NO_VERSION',
     -        'UPGRADE_KEY_ROTATION'
     +        'UPGRADE_KEY_ROTATION',
     +        'UPGRADE_INCOMPATIBLE_HOST_CPU'

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.


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


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

View workflow run

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Oct 8, 2026
@djgalloway

Copy link
Copy Markdown
Contributor Author

/audit override

The "missing" commit 22e6137 is the original PR's merge of origin/main (conflict resolution against the base branch), not a content commit — it cannot be cherry-picked into a backport. Both content commits are present with cherry-picked-from trailers.

@github-actions github-actions Bot added releng-audit-override and removed releng-audit-fail Release engineering: failed backport verification audit. labels Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

✅ Audit Override Applied by @djgalloway.

View workflow run

@yuriw

yuriw commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri9-testing-20261012.161822-tentacle.

@batrick
batrick merged commit a9d5e50 into ceph:tentacle Oct 14, 2026
18 of 19 checks passed
batrick pushed a commit that referenced this pull request Oct 28, 2026
A source PR can contain a merge of main done for conflict resolution
(e.g. #72090, commit 22e6137).  Such merge commits are
never cherry-picked into a backport, but the parity audit enumerated
every commit in merge^1..merge^2 and therefore flagged all three of
that PR's backports (#72512, #72513, #72514) with "MISSING IN
BACKPORT" and releng-audit-fail, forcing manual overrides.

Skip commits with more than one parent when building the source
commit list: only the content commits of the original PR need parity.

Assisted-by: Claude Fable 5
Signed-off-by: David Galloway <[email protected]>
aainscow pushed a commit to aainscow/ceph that referenced this pull request Nov 4, 2026
A source PR can contain a merge of main done for conflict resolution
(e.g. ceph#72090, commit 22e6137).  Such merge commits are
never cherry-picked into a backport, but the parity audit enumerated
every commit in merge^1..merge^2 and therefore flagged all three of
that PR's backports (ceph#72512, ceph#72513, ceph#72514) with "MISSING IN
BACKPORT" and releng-audit-fail, forcing manual overrides.

Skip commits with more than one parent when building the source
commit list: only the content commits of the original PR need parity.

Assisted-by: Claude Fable 5
Signed-off-by: David Galloway <[email protected]>
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.

3 participants