-
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
[OSD on PVC] add kubernetes version check. #4009
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.
nit, once last thing, thanks.
Documentation/ceph-cluster-crd.md
Outdated
@@ -43,6 +43,7 @@ spec: | |||
|
|||
## PVC-based Cluster | |||
|
|||
**NOTE** Kubernetes version should be 1.13.0 or greater to provision OSD on PVC. |
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.
suggestion:
**NOTE** Kubernetes version 1.13.0 or greater is required to provision OSDs on PVCs.
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.
updated.
pkg/operator/ceph/cluster/osd/osd.go
Outdated
//check k8s version | ||
k8sVersion, err := k8sutil.GetK8SVersion(c.context.Clientset) | ||
if err != nil { | ||
logger.Warningf("error finding Kubernetes version. %+v", err) |
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 should be an error if we're aborting the provisioning
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.
added this as a error in the config.
pkg/operator/ceph/cluster/osd/osd.go
Outdated
return | ||
} | ||
if !k8sVersion.AtLeast(version.MustParseSemantic("v1.13.0")) { | ||
logger.Warningf("skipping OSD on PVC provisioning. Minimum Kubernetes version required: 1.13.0. Actual version: %s", k8sVersion.String()) |
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.
We need to think about the right time to log this message.
- If the user doesn't have any settings in the CR for provisioning OSDs on PVs, we shouldn't even need to add this check. Should we add this check around line 252 below after we check the volume sources?
- While we're fixing the warnings, I think the one line 247 should just be an info and could be simplified to:
No volume sources specified for creating OSDs on PVCs
. The rest of the message doesn't even make sense to me now.
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.
Ditto Travis' comment about this being an error message also.
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.
We need to think about the right time to log this message.
- If the user doesn't have any settings in the CR for provisioning OSDs on PVs, we shouldn't even need to add this check. Should we add this check around line 252 below after we check the volume sources?
yes, it would be more appropriate to add this check after checking the volume sources.
Updated the code with this change.
- While we're fixing the warnings, I think the one line 247 should just be an info and could be simplified to:
No volume sources specified for creating OSDs on PVCs
. The rest of the message doesn't even make sense to me now.
Updated the message. Should this still be a warning
or just an info
?
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
- OSD on PVC provisioning fails if k8s version is less than 1.13.0 - updated document to reflect minimum k8s version required. - Added check to skip OSD on pvc provisoning if the minimum k8s version requirement is not met. Signed-off-by: Santosh Pillai <sapillai@redhat.com>
[OSD on PVC] add kubernetes version check. (bp #4009)
Signed-off-by: Santosh Pillai sapillai@redhat.com
Description of your changes:
OSD on PVC provisioning fails if k8s version is less than 1.13.0
Which issue is resolved by this Pull Request:
Resolves #4008
Checklist:
make codegen
) has been run to update object specifications, if necessary.[test ceph]