Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pool: get the exact deviceClass name instead of crushroot+deviceClass #14325

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

ideepika
Copy link
Contributor

this lead to creation of 2 crush rules because of difference in deviceClass names:
eg:
creating a new crush rule for changed deviceClass
("default~hdd"-->"hdd") on crush rule "test-crush-bug-az-ab-4"

            "rule_id": 3,
            "rule_name": "test-bug-pool_host_hdd",
            "type": 1,
            "steps": [
                {
                    "op": "take",
                    "item": -2,
                    "item_name": "default~hdd"
                },
                {
                    "op": "chooseleaf_firstn",
                    "num": 0,
                    "type": "host"
                },
                {
                    "op": "emit"
                }
            ]
        }

tested locally on changing device class hdd to nvme

2024-06-11 20:34:10.028094 D | cephclient: checking that pool "test-bug-pool" has the failure domain "host" and deviceClass "nvme"

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@travisn
Copy link
Member

travisn commented Jun 11, 2024

The CI failures don't appear related to this PR, there is some github action issue...

@ideepika ideepika marked this pull request as ready for review June 12, 2024 07:18
@ideepika ideepika force-pushed the wip-solve-device-class-bug branch 2 times, most recently from 4cdf5a7 to 9621a74 Compare June 12, 2024 08:20
pkg/daemon/ceph/client/pool.go Show resolved Hide resolved
@@ -529,7 +529,15 @@ func extractPoolDetails(rule ruleSpec) (string, string) {
failureDomain = step.Type
}
if step.ItemName != "" {
deviceClass = step.ItemName
// we are not using crushRoot currently, remove it to
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// we are not using crushRoot currently, remove it to
// we are not using crushRoot currently, remove it

this lead to creation of 2 crush rules because of difference in
deviceClass names:
eg:
creating a new crush rule for changed deviceClass
("default~hdd"-->"hdd") on crush rule "test-crush-bug-az-ab-4"

Signed-off-by: Deepika Upadhyay <deepikaupadhyay01@gmail.com>
@travisn travisn merged commit 720c23a into rook:master Jun 12, 2024
51 of 53 checks passed
travisn added a commit that referenced this pull request Jun 13, 2024
pool: get the exact deviceClass name instead of crushroot+deviceClass (backport #14325)
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.

None yet

2 participants