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
ceph: added support for multus for csi #5740
Conversation
pkg/operator/ceph/csi/spec.go
Outdated
@@ -378,6 +379,10 @@ func startDrivers(namespace string, clientset kubernetes.Interface, ver *version | |||
// apply resource request and limit to rbdplugin containers | |||
applyResourcesToContainers(clientset, rbdPluginResource, &rbdPlugin.Spec.Template.Spec) | |||
k8sutil.SetOwnerRef(&rbdPlugin.ObjectMeta, ownerRef) | |||
err = applyCephClusterNetworkConfig(&rbdPlugin.Spec.Template.ObjectMeta, rookclientset) |
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.
The annotations are applied to the csi daemonset pods but the k8s.v1.cni.cncf.io/networks-status
annotation is missing so couldn't verify if the pods are using multus
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.
Is the annotation getting overwritten?
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.
No.
Just that there is no k8s.v1.cni.cncf.io/networks-status
annotation in the pod and I am not able to get in the containers to check if the multus interfaces are added
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.
The annotations are applied normally
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.
Well how can the annotation be applied normally if not visible later on? Something is off.
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.
The annotation is applied
annotations:
k8s.v1.cni.cncf.io/networks: public
openshift.io/scc: rook-ceph-csi
There should be a k8s.v1.cni.cncf.io/networks-status
something like the following:
Annotations: k8s.v1.cni.cncf.io/networks: public
k8s.v1.cni.cncf.io/networks-status:
[{
"name": "openshift-sdn",
"interface": "eth0",
"ips": [
"10.128.2.31"
],
"dns": {},
"default-route": [
"10.128.2.1"
]
},{
"name": "public",
"interface": "net1",
"ips": [
"192.168.1.209"
],
"mac": "4e:5d:a8:b7:36:2b",
"dns": {}
}]
openshift.io/scc: rook-ceph-csi
pkg/operator/ceph/csi/spec.go
Outdated
@@ -378,6 +379,10 @@ func startDrivers(namespace string, clientset kubernetes.Interface, ver *version | |||
// apply resource request and limit to rbdplugin containers | |||
applyResourcesToContainers(clientset, rbdPluginResource, &rbdPlugin.Spec.Template.Spec) | |||
k8sutil.SetOwnerRef(&rbdPlugin.ObjectMeta, ownerRef) | |||
err = applyCephClusterNetworkConfig(&rbdPlugin.Spec.Template.ObjectMeta, rookclientset) |
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.
Is the annotation getting overwritten?
I have 2 questions related to multus support.
cc @travisn |
After thinking about this it looks like the annotatins will get replaced.
This is the part where I was stuck. Trying to use multus instead of host network and will update once I have the results.
|
This pull request has merge conflicts that must be resolved before it can be merged. @rohan47 please rebase it. https://rook.io/docs/rook/master/development-flow.html#updating-your-fork |
@Madhu-1 csi daemonset doesn't work on multus network. So here are my questions:
|
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.
With this PR we can remove the "experimental" flag from the doc https://rook.io/docs/rook/v1.3/ceph-cluster-crd.html and add a mention in the release note too.
Before we remove the experimental flag, how about we get 3rd party validation as suggested in the separate email thread today. |
4923bdf
to
af1d258
Compare
This doc has the connection information of mons and osds and the logs of the failed OSD |
This pull request has merge conflicts that must be resolved before it can be merged. @rohan47 please rebase it. https://rook.io/docs/rook/master/development-flow.html#updating-your-fork |
9c395a0
to
226abe7
Compare
We are keeping the experimental flag right? |
Yes and let's link the ceph-csi issue too. |
Okay |
Any updates @rohan47? We should move forward with that. |
CSI pods now utilize multus networking and connect to public network specified in the CephCluster CR. Closes: rook#5356 Signed-off-by: rohan47 <rohgupta@redhat.com>
} | ||
} | ||
|
||
return true, nil |
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.
even if the ceph cluster is not using multus it's returning true?
don't we need to return false if the ceph cluster network is not multus?
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.
Good point, we should only return if multus got configured, I'm sending a PR to fix this.
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.
@@ -498,6 +522,23 @@ func deleteCSIDriverResources( | |||
return succeeded | |||
} | |||
|
|||
func applyCephClusterNetworkConfig(objectMeta *metav1.ObjectMeta, rookclientset rookclient.Interface) (bool, error) { | |||
cephClusters, err := rookclientset.CephV1().CephClusters(objectMeta.Namespace).List(metav1.ListOptions{}) |
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.
question: won't this fail if the ceph cluster and CSI is in a different namespace?
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.
The namespace we have here is actually the Rook Ceph operators namespace, right?
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 its rook ceph operator namespace
ceph: added support for multus for csi (bp #5740)
Description of your changes:
CSI pods now utilize multus networking and connect to public
network specified in the CephCluster CR.
Signed-off-by: rohan47 rohgupta@redhat.com
Which issue is resolved by this Pull Request:
Resolves #5356
Checklist:
make codegen
) has been run to update object specifications, if necessary.[test ceph]