Skip to content

cephadm: fix staggered upgrade - #69691

Merged
guits merged 1 commit into
ceph:mainfrom
guits:fix-staggered-upgrade
Jun 25, 2026
Merged

guits merged 1 commit into
ceph:mainfrom
guits:fix-staggered-upgrade

Conversation

@guits

@guits guits commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Do not mark an upgrade complete until daemons in the filtered scope match the target image. Limited (--limit) upgrades still complete when remaining_count reaches zero.

Fixes: https://tracker.ceph.com/issues/62959

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)

Do not mark an upgrade complete until daemons in the filtered scope
match the target image. Limited (--limit) upgrades still complete
when remaining_count reaches zero.

Fixes: https://tracker.ceph.com/issues/62959

Signed-off-by: Guillaume Abrioux <[email protected]>
@guits
guits requested a review from a team as a code owner June 24, 2026 05:30
@guits
guits requested a review from adk3798 June 24, 2026 05:57
@guits

guits commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test api

@afreen23

Copy link
Copy Markdown
Contributor
2026-06-24 13:13:16,417.417 ERROR:tasks.mgr.dashboard.helper:Request response: {"detail": "Error in creating tracker issue: Remote method threw exception: Traceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/urllib3/connection.py\", line 203, in _new_conn\n    sock = connection.create_connection(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/urllib3/util/connection.py\", line 60, in create_connection\n    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/socket.py\", line 963, in getaddrinfo\n    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsocket.gaierror: [Errno -2] Name or service not known\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/urllib3/connectionpool.py\", line 791, in urlopen\n    response = self._make_request(\n               ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/urllib3/connectionpool.py\", line 492, in _make_request\n    raise new_e\n  File \"/usr/lib/python3/dist-packages/urllib3/connectionpool.py\", line 468, in _make_request\n    self._validate_conn(conn)\n  File \"/usr/lib/python3/dist-packages/urllib3/connectionpool.py\", line 1097, in _validate_conn\n    conn.connect()\n  File \"/usr/lib/python3/dist-packages/urllib3/connection.py\", line 611, in connect\n    self.sock = sock = self._new_conn()\n                       ^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/urllib3/connection.py\", line 210, in _new_conn\n    raise NameResolutionError(self.host, self, e) from e\nurllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7e3cdca94680>: Failed to resolve 'invalid.example.invalid' ([Errno -2] Name or service not known)\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/requests/adapters.py\", line 486, in send\n    resp = conn.urlopen(\n           ^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/urllib3/connectionpool.py\", line 845, in urlopen\n    retries = retries.increment(\n              ^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/urllib3/util/retry.py\", line 517, in increment\n    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='invalid.example.invalid', port=443): Max retries exceeded with url: /projects/46/issues.json (Caused by NameResolutionError(\"<urllib3.connection.HTTPSConnection object at 0x7e3cdca94680>: Failed to resolve 'invalid.example.invalid' ([Errno -2] Name or service not known)\"))\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/home/jenkins-build/build/workspace/ceph-api/src/pybind/mgr/feedback/module.py\", line 143, in validate_and_create_issue\n    result = tracker_client.create_issue(feedback, api_key)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/jenkins-build/build/workspace/ceph-api/src/pybind/mgr/feedback/service.py\", line 44, in create_issue\n    response = requests.post(\n               ^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/requests/api.py\", line 115, in post\n    return request(\"post\", url, data=data, json=json, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/requests/api.py\", line 59, in request\n    return session.request(method=method, url=url, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/requests/sessions.py\", line 589, in request\n    resp = self.send(prep, **send_kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/requests/sessions.py\", line 703, in send\n    r = adapter.send(request, **kwargs)\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/requests/adapters.py\", line 519, in send\n    raise ConnectionError(e, request=request)\nrequests.exceptions.ConnectionError: HTTPSConnectionPool(host='invalid.example.invalid', port=443): Max retries exceeded with url: /projects/46/issues.json (Caused by NameResolutionError(\"<urllib3.connection.HTTPSConnection object at 0x7e3cdca94680>: Failed to resolve 'invalid.example.invalid' ([Errno -2] Name or service not known)\"))\n", "component": "feedback"}

Seeing this looks like env issue, re-running

@afreen23

Copy link
Copy Markdown
Contributor

jenkins test api

1 similar comment
@adk3798

adk3798 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

jenkins test api

@guits
guits merged commit 9e1e620 into ceph:main Jun 25, 2026
15 of 19 checks passed
@guits
guits deleted the fix-staggered-upgrade branch June 25, 2026 06:37
FredNass pushed a commit to FredNass/ceph that referenced this pull request Sep 25, 2026
Backport of ceph#70314 as a single commit. Upstream, the first
commit adds an HTTP-mirror distribution mode and the second drops it,
keeping only the registry pre-pull; this applies the net result, so
none of the removed local_http code is carried.

Add an opt-in upgrade phase (mgr/cephadm/upgrade_image_mirror_method =
registry) that pulls the target image in parallel on every in-scope
host before any daemon is upgraded, and learns the target digests and
version from those pulls instead of a serial first pull on one host.
If pre-distribution fails on any host, the upgrade is paused before
any daemon is touched.

Fixes: https://tracker.ceph.com/issues/77270

Based-on-patch-by: Frédéric Nass <[email protected]>
Signed-off-by: Kobi Ginon <[email protected]>
Signed-off-by: Frédéric Nass <[email protected]>
(cherry picked from commit 3219728)
(cherry picked from commit 275bcf4)

Conflicts:
	src/pybind/mgr/cephadm/upgrade.py: context only - reef lacks errno import, MID_UPGRADE_MUTED_WARNINGS and the main-only UpgradeState fields (crush bucket, autoscale, cephx rotation); added only the image-mirror constants, asyncio import and image_mirror_done
	src/pybind/mgr/cephadm/module.py: context only - reef lacks max_parallel_osd_upgrades and pg_autoscale_during_upgrade; added only the two upgrade_image_mirror_* options
	src/pybind/mgr/cephadm/tests/test_upgrade.py: reef imports only CephadmUpgrade/UpgradeState from cephadm.upgrade; added UPGRADE_IMAGE_MIRROR_METHOD_REGISTRY and appended only this PR's tests
	doc/cephadm/upgrade.rst: reef titles the next section 'Starting the upgrade'; kept reef's heading
	src/pybind/mgr/cephadm/tests/test_upgrade.py: test_do_upgrade_registry_discovers_without_serial_first_pull asserts on the state populated by the pre-pull, since reef has no filtered-scope completion gate (ceph#69691) and clears upgrade_state when nothing is left to upgrade

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019joi2QbCJyyVwNqHqpJ1vU
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