Skip to content

scheduler: clear snapshot_id from replica request_spec - #367

Open
kpawar-sap wants to merge 1 commit into
stable/2025.1-m3from
fix_share_reserver_precentage_for_replica
Open

kpawar-sap wants to merge 1 commit into
stable/2025.1-m3from
fix_share_reserver_precentage_for_replica

Conversation

@kpawar-sap

Copy link
Copy Markdown

A share created from a snapshot carries snapshot_id, which the capacity filter and weigher use to apply reserved_snapshot_percentage instead of reserved_percentage, and which the host-affinity weigher uses to steer scheduling toward the snapshot's source host.

Neither behaviour is appropriate for replica scheduling: replicas are intentionally placed on a different backend, so reserved_snapshot_percentage (meant to keep snapshot-derived shares near their parent) is wrong, and affinity toward the original snapshot host is actively harmful.

Change-Id: I9ba703dc38c6d9630174dad7ab4faf6270360d3a

@kpawar-sap

Copy link
Copy Markdown
Author

Removing snapshot_id from request_spec has additional following changes .

create_from_snapshot.py filter — snapshot_id=None → returns True (all hosts pass). This is correct — a replica is not being created from a snapshot, it's
being created from an active share. No regression.

host_affinity.py weigher — snapshot_id=None → returns 0, no DB lookup. Previously it would fetch the snapshot from DB and steer the replica toward the
snapshot's source host — which is wrong for replicas. Now it correctly gives no affinity weight. No regression.

A share created from a snapshot carries snapshot_id, which the capacity
filter and weigher use to apply reserved_snapshot_percentage instead of
reserved_percentage, and which the host-affinity weigher uses to steer
scheduling toward the snapshot's source host.

Neither behaviour is appropriate for replica scheduling: replicas are
intentionally placed on a different backend, so reserved_snapshot_percentage
(meant to keep snapshot-derived shares near their parent) is wrong, and
affinity toward the original snapshot host is actively harmful.

Change-Id: I9ba703dc38c6d9630174dad7ab4faf6270360d3a
@kpawar-sap
kpawar-sap force-pushed the fix_share_reserver_precentage_for_replica branch from 94683bc to 3fe4479 Compare September 14, 2026 14:22
@kpawar-sap

Copy link
Copy Markdown
Author

lets wait for a some-time for review on upstream PR https://review.opendev.org/c/openstack/manila/+/1005578

@Carthaca

Copy link
Copy Markdown
Collaborator

ack

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.

2 participants