-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
mon: add mon storage class support #12384
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the description with what changes you are bringing
ea76740
to
593f22f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, we will also need:
- Documentation update in ceph-cluster-crd.md
- A comment added to the cluster-on-pvc.yaml example
- This scenario will be difficult to test in the CI besides unit tests, but will need manual testing to confirm, if you could comment on the manual testing scenarios you've tried.
// Find a zone in the stretch cluster that still needs an assignment | ||
for _, zone := range c.spec.Mon.StretchCluster.Zones { | ||
for _, zone := range zones { | ||
count, ok := zoneCount[zone.Name] | ||
if !ok { | ||
// The zone isn't currently assigned to any mon, so return it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 626 only applies to stretch cluster where two mons can be in some zones. For non-stretch, we should keep it to one mon per zone in all cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still looks like an issue (now see line 630 instead of 626). The stretch cluster chooses two mons per zone, but for non-stretch clusters, we only want one mon per zone. I believe we should update this condition
if c.spec.Mon.Count == 5 && count == 1 && !zone.Arbiter {
to this:
if c.spec.IsStretchCluster() && c.spec.Mon.Count == 5 && count == 1 && !zone.Arbiter {
pkg/operator/ceph/cluster/mon/mon.go
Outdated
} else { | ||
zones = c.spec.Mon.Zones | ||
} | ||
//TODO: check if it works for all zones or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it should work for all zones. Is this just a note about testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, just for testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the comment now, or still need to test it?
This pull request has merge conflicts that must be resolved before it can be merged. @ideepika please rebase it. https://rook.io/docs/rook/latest/Contributing/development-flow/#updating-your-fork |
74f07b2
to
f0e312e
Compare
@ideepika Please share the logs and summarize the issue you are seeing when creating the cluster with these changes. |
a3e7694
to
a1992c6
Compare
with :
I was able to verify the zonal deployment based on labels:
when node label is zone a
when zone changed to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase to pick up the latest CI fixes.
The changes are looking correct, though since we don't have stretch cluster tested in the CI, it's a bit risky so I'd like to do some manual testing another day.
// Find a zone in the stretch cluster that still needs an assignment | ||
for _, zone := range c.spec.Mon.StretchCluster.Zones { | ||
for _, zone := range zones { | ||
count, ok := zoneCount[zone.Name] | ||
if !ok { | ||
// The zone isn't currently assigned to any mon, so return it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still looks like an issue (now see line 630 instead of 626). The stretch cluster chooses two mons per zone, but for non-stretch clusters, we only want one mon per zone. I believe we should update this condition
if c.spec.Mon.Count == 5 && count == 1 && !zone.Arbiter {
to this:
if c.spec.IsStretchCluster() && c.spec.Mon.Count == 5 && count == 1 && !zone.Arbiter {
if zones field is specified, deploy the mon based on the zone specified, this will help with higher mon availability. See also: rook#11407 Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
* fixes mon zonal deployment of 2 per zone to 1 if zones field is specified. * adds zones field doc to CRDs Documentation. * add code for picking up failureDomainLabel if specified for zones field in mon deployment Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
a1992c6
to
b67bf2d
Compare
@travisn PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My testing of a stretch cluster and the new zone cluster looks good, will approve after the last question about the TODO...
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
932aefc
to
427c537
Compare
@travisn anything that I can help with this PR? |
@ideepika how about you just rebase with master and push, we have multiple CI fixes so we should have more green CI |
@Javlopez Ready to approve? |
The CRDs were not generated for the latest since rook#12384 was merged without rebasing, and other updates with a newer dependency required the newer descriptions. Signed-off-by: travisn <tnielsen@redhat.com>
mon: add mon storage class support (backport #12384)
Ref-rook/rook#12384 Signed-off-by: Malay Kumar Parida <mparida@redhat.com>
Ref-rook/rook#12384 Signed-off-by: Malay Kumar Parida <mparida@redhat.com>
Ref-rook/rook#12384 Signed-off-by: Malay Kumar Parida <mparida@redhat.com>
Ref-rook/rook#12384 Signed-off-by: Malay Kumar Parida <mparida@redhat.com>
Ref-rook/rook#12384 Signed-off-by: Malay Kumar Parida <mparida@redhat.com>
It is generally desirable in production to have multiple zones availability. A
whole storage class could go unavailable then and enough mons could stay up to
keep the cluster running.
In such a case the distribution of mons can be made more homogeneous for each
zone, by this we can leverage the spread of mons for providing high
availability. This could be a useful scenario for a datacenter with own storage
class in contrast to ones provided by cloud providers.
The type of failure domain used for this scenario is commonly "zone", but can
be set to a different failure domain.
eg config:
See also: #11407
Description of your changes:
Which issue is resolved by this Pull Request:
Resolves #
Checklist:
skip-ci
on the PR.