Skip to content

Add molecule upgrade scenario to the matrix - #7752

Merged
guits merged 5 commits into
ceph:mainfrom
noonedeadpunk:feat/molecule_improvements
Nov 9, 2026
Merged

guits merged 5 commits into
ceph:mainfrom
noonedeadpunk:feat/molecule_improvements

Conversation

@noonedeadpunk

Copy link
Copy Markdown
Collaborator

This PR adds a new molecule scenario, which performs both Ceph and Ceph-Ansible upgrade tests.

As prepare step, we checkout to N-1 branch and do normal Ceph-Ansible deployment.
During converge, we checkout back to current N, and run Ceph-Ansible against the setup, to ensure that upgrade of Ceph-Ansible is possible.

Then, if CEPH_INITIAL_RELEASE != CEPH_TARGET_RELEASE, we perform Ceph upgrade as a side-effect of the scenario.
Normal all-in-one tests are executed both after ceph-ansible and ceph upgrades.

At the moment, only Ubuntu 22.04 is supporting upgrade for both Ceph and Ceph-Ansible. At the same time, RockyLinux 9 is being tested only for Ceph-Ansible upgrade, as there's no Ceph upgrade path clearly existing for this distro, while RockyLinux 10 is not supported for stable-9.0 branch.

Copilot AI 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.

🟡 Changes recommended

Unresolved issues can trigger unnecessary rolling updates, fail development-build upgrades, unintentionally change existing erasure-code plugins, and block upgrades when health warnings are present.

4 open issues
What changed in this PR

Adds a Molecule upgrade scenario to test Ceph-Ansible upgrades from the previous branch and optional Ceph release upgrades, reusing the existing all-in-one checks.

Changes:

  • Adds preparation, convergence, rolling-upgrade, verification, and cleanup stages.
  • Extends CI with Ubuntu 22.04 Ceph upgrades and Rocky Linux 9 Ceph-Ansible-only upgrades.
  • Adjusts erasure-code plugin handling and makes rolling-update release checks configurable.
File Description
tox-molecule.ini Registers the upgrade scenario and passes upgrade settings.
roles/​ceph-rgw/​tasks/​rgw_create_pools.yml Passes optional erasure-code plugin settings.
molecule/​upgrade/​verify.yml Checks cluster functionality and daemon releases.
molecule/​upgrade/​side_effect.yml Runs conditional Ceph upgrades and records completion.
molecule/​upgrade/​prepare.yml Deploys the previous branch using a Git worktree.
molecule/​upgrade/​molecule.yml Defines upgrade hosts and test sequencing.
molecule/​upgrade/​extra_vars.yml Configures upgrade confirmation and an erasure-coded pool.
molecule/​upgrade/​converge.yml Applies current Ceph-Ansible to the initial release.
molecule/​upgrade/​cleanup.yml Removes test resources, markers, worktree, and logs.
molecule/​all_in_one/​molecule.yml Uses a project-rooted scenario variables path.
molecule/​all_in_one/​extra_vars.yml Adds the confirmation-variable mapping.
library/​ceph_ec_profile.py Limits the default plugin assignment to new profiles.
infrastructure-playbooks/​rolling_update.yml Uses the configured release for validation and OSD requirements.
.github/​workflows/​molecule.yml Adds the upgrade matrix alongside deployment tests.

Review effort: Balanced

Comment thread library/ceph_ec_profile.py Resolved
Comment thread molecule/upgrade/prepare.yml Resolved
Comment thread molecule/upgrade/side_effect.yml Resolved
@noonedeadpunk
noonedeadpunk force-pushed the feat/molecule_improvements branch from ed7cdbc to 163ad47 Compare November 3, 2026 17:29
guits
guits previously approved these changes Nov 9, 2026
@mergify

mergify Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

This addresses upgrade regression introduced by [1].
Once set, EC plugin for the profile can not be updated. If we set a
`isa` plugin for the cluster which was using jerasure, plugin will
fail to update and crash the play.

So instead of the explicit default value, we verify existing profile
first and set `isa` only when no profile is defined yet.

This ensures that upgrade for older clusters is passing, while
all new clusters are shipped with correct plugin, unless being
overriden.

[1] ceph@d5d2b1c

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
At the moment rolling-upgrade is hardcoded to accept only squid as a
destination upgrade.
We make it slightly more universal, allowing it to accept
`ceph_stable_release` as a target relase and set require-osd-release
to it's value once upgrade is complete.

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
This commit adds a new molecule scenario, which performs both Ceph and
Ceph-Ansible upgrade tests.

As prepare step, we checkout to N-1 branch and do normal Ceph-Ansible
deployment.
During converge, we checkout back to current N, and run Ceph-Ansible
against
the setup, to ensure that upgrade of Ceph-Ansible is possible.

Then, if CEPH_INITIAL_RELEASE != CEPH_TARGET_RELEASE, we perform Ceph
upgrade as a side-effect of the scenario.
Normal all-in-one tests are executed both after ceph-ansible and ceph
upgrades.

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
From time to time we get an intermittent issue, where
verifications fails due to peering. At it has hugely intermittent
behavior, this looks like a race condition, where ceph status is fetched
before pgs getting synced after ceph installation.

So let's additionally wait for PGs getting in synced and active.

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
In ansible-core 2.21, Ansible introduced serialization profiles as
part of its data-tagging and wire-format overhaul to govern how data
is encoded and decoded between the controller and modules.

We define _ANSIBLE_PROFILE explicitly for compatability
between older Ansible and modern one.

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
@noonedeadpunk
noonedeadpunk force-pushed the feat/molecule_improvements branch from 90e277c to 0bdb407 Compare November 9, 2026 08:33
@noonedeadpunk
noonedeadpunk requested a review from guits November 9, 2026 09:17
@guits
guits merged commit 0fc0492 into ceph:main Nov 9, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants