Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jj-ceph-balancer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
resplat-public
jj-ceph-balancer
Commits
fd5a30d1
Commit
fd5a30d1
authored
6 months ago
by
William Xiong
Browse files
Options
Downloads
Patches
Plain Diff
Prevent pg movement on osds with no crushclasses
parent
6c9f1272
Branches
Branches containing commit
No related tags found
1 merge request
!2
Prevent pg movement on osds with no crushclasses
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
placementoptimizer.py
+18
-0
18 additions, 0 deletions
placementoptimizer.py
with
18 additions
and
0 deletions
placementoptimizer.py
+
18
−
0
View file @
fd5a30d1
...
...
@@ -4668,6 +4668,24 @@ def balance(args, cluster):
if osd_from not in source_osds:
continue
## WX BUGFIX --- Only utilize the osds with the right crushclass
#Iterate through valid crushclasses
for crushclass_name in pg_mappings.get_enabled_crushclasses():
osds_in_crushclass = cluster.get_crushclass_osds(crushclass_name)
#Skip balancing the OSD if it does not have the right crushclass
if osd_from not in osds_in_crushclass:
logging.info(f"-BUGFIX: WE ARE ONLY USING CRUSHCLASS: {crushclass_name}")
logging.info(f"-BUGFIX: OSD: {osd_from} HAS INVALID CRUSHCLASS - SKIPPING")
skip_osd=True
continue
else:
skip_osd=False
#Comment/uncomment this if statement to see effects of bugfix
if skip_osd:
continue
source_attempts += 1
if source_attempts > args.max_move_attempts:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment