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
OCPBUGS-9996: make lvms configuration more robust #1489
OCPBUGS-9996: make lvms configuration more robust #1489
Conversation
@dhellmann: This pull request references Jira Issue OCPBUGS-9996, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cherry-pick release-4.13 |
@dhellmann: once the present PR merges, I will cherry-pick it on top of release-4.13 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test e2e-reboot |
I'm pretty hesitant to make educated guesses about users' systems. For one, it means user's can't expect uniform default behavior from the platform and will get different results based on their storage stack. It'd be safer instead to select the VG that backs the user's homedir. This would mesh well with current dev env we suggest with a microshift user, be predictable, and allow users to select special VGs if they want. Making the 'rhel' name special also makes the storage configuration just a little bit more esoteric - one more reason to assume home VG if none are provided. |
Maybe, we should not attempt selecting any volumes if 'rhel' does not exist and nothing is specified in the config? |
The point about predictability is fair. There is no user with a home directory, so I'm not sure how to use that to be more deterministic. Just look for How many hosts where someone is likely to run MicroShift actually have multiple volume groups?
Disabling if there is no 'rhel' VG and the user has not provided a config file would be more predictable. It's not a minimal configuration for a nice out-of-the-box experience, though, so I was hoping to make things "just work." |
My vote would be to make it simple and robust rather than "clever". There's no end to users' imagination, so we may inadvertedly end up in situations where the volume selection logic does not behave well. |
It's not selecting a volume. It's selecting a volume group. The vast majority of systems running MicroShift are only going to have 1 of those. |
d3d9d1f
to
4ed902f
Compare
I totally agree that's the best approach. Thank you, @dhellmann ! |
/retest |
@dhellmann, do we need to update GitHub docs with this change? I think we need to at least mention this new logic in the config doc, maybe a CSI design as well. |
Good point. See cb4e618. While I was working on that, I made a few other changes in that file in other commits. |
/test e2e-openshift-conformance-reduced |
CI system timed out accessing images /test e2e-openshift-conformance-reduced |
pkg/config/lvmd/lvmd.go
Outdated
// DefaultLvmdConfig returns a configuration struct for Lvmd with | ||
// default settings based on the current host. If the default volume | ||
// group name "rhel" is found, that volume group is used, otherwise | ||
// the largest volume group is used. If there are no volume groups, | ||
// the configuration returned will report that it is not enabled (see | ||
// IsEnabled()). |
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.
A nit: the comment needs to be fixed. The code no longer picks the largest volume group.
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.
I fixed this and added some unit tests in the latest draft.
d978782
to
c70ee9c
Compare
/test e2e-greenboot |
/retest |
1 similar comment
/retest |
Instead of requiring the user to configure their system with a "rhel" volume group, look at the volume groups that exist and apply some selection rules: * If there is a "rhel" VG, use it. * If there is only one VG, use it. * Otherwise, disable the CSI driver with a log message.
When there are multiple volume groups, look for one named "microshift" to use, instead of "rhel".
@dhellmann , the
Looks like the CI is falling back to the case with CSI disabled.
|
764fb4c
to
01502d3
Compare
@dhellmann, last error remaining:
|
Include a message in the body of the file added to the config map to explain where the content came from.
c5e813a
to
5d313f8
Compare
That's what I get for not running the unit tests locally before pushing. :-/ |
@dhellmann: This pull request references Jira Issue OCPBUGS-9996, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dhellmann, ggiguash The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@dhellmann: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@dhellmann: Jira Issue OCPBUGS-9996: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-9996 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@dhellmann: new pull request created: #1530 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Instead of requiring the user to configure their system with a "rhel"
volume group, look at the volume groups that exist and pick one as the default. If there is only 1, use it. If there is a "microshift" VG, use it. Otherwise, disable the CSI driver.
/assign @copejon