-
Notifications
You must be signed in to change notification settings - Fork 378
GetNodeId is burdensome #141
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
Comments
Except how does an SP know the provided node ID is the same as the one returned by GetNodeID? Or how did the CO get it in the first place since the node ID is specific to the SP and opaque to the CO. In my experience implementing SPs, the node IDs for each are disparate and unique to the SP. I’m just not sure how the CO is getting the node IDs in the first place when that process is in part why SPs are necessary. |
It would be up to the SP to determine if it wants a custom node ID or not. If it wants a custom node ID, it would completely disregard the node ID passed in by the CO and return the node ID it wants the CO to use. If it can use the same node ID as the CO, instead of figuring out what that ID is, it would simply return the same node ID passed in by the CO.
The ID passed in would be the CO node ID NOT specific to any SP.
The CO has it's own way it identifies nodes. This is simply saying that that should be passed as input for the SP to optionally use. |
Hi saad, this is a very good question. I took a look at the old design about GetNodeID.
The NodeInfo like 'iqn' will be used to init ISCSI Target on the Storage Server. The NodeInfo indicates which node could connect target on the Storage Server, and then 'NodePublishVolume' could do the work to connect the Storage Servers. So I proposal to change 'GetNodeID' into 'GetNodeInfo' like below:
If 'GetNodeID' only returns the NodeID, it is ok for the OnCloud scenario like GCE or OpenStack and so on. In the OnCloud scenario, it just needs to launch attach operation only by using 'NodeName' and 'DiskName'. GCE Example. But in the OffCloud scenario, 'ControllerPublishVolume' need more information about the Node like ISCSI example. So what do you think about that? Thank you. |
I just don’t see the utility of this change. It assumes the CO has knowledge that simply cannot be assumed and breaks the relationship between the CO and SP. I wholeheartedly disagree with this proposal. |
Can you explain what you mean by this? I do think it's a little strange to pass in a node ID into |
Hi @cpuguy83, Sure. The node ID is a piece of information that is specific to the SP. For example, on any host one could argue that the node ID could be the host name. Maybe that is what the CO elects to use as the CO's node ID. However, this is not the node ID for an EBS host, a ScaleIO host, or many other hosts connected to storage platforms. And how does a CO know what the node ID is for one of those hosts as it relates to the storage platform? Simply put, it doesn't. This is where @saad-ali's proposed workflow does not make sense to me. He says an SP can check to see if the provided node ID is valid, but how does it do that? With a regex? That's not a reliable or robust solution IMO. What likely has to happen is the SP must get the node ID anyway and compare it to the one provided by the CO. Which means the SP still got the node ID.
Most of the storage platforms with which I've worked have custom node IDs:
The above links demonstrate working examples from real storage platforms that show the disparate nature of what amounts to the CSI node ID. A node ID is specific to a storage platform, and a CO is simply unlikely to have knowledge of the node ID. That's the entire point of the SP -- to provide an opaque means of interacting with several, disparate storage platforms. This proposal is in direct contradiction to that. |
Also, this does not make sense to me:
How so? It is called once on a node host by the CO. The Node ID is supposed to be static and cacheable by the CO, so I do not see how getting the node ID once per SP is burdensome. |
I do not think it's about checking if a node ID is valid but rather giving the node a default node ID for which it can respond with if the plugin doesn't care about node ID. |
Hi @cpuguy83, My points are:
|
I would take a different tack on this... The spec calls out the following for the message GetNodeIDResponse {
message Result {
// The ID of the node which SHALL be used by CO in
// `ControllerPublishVolume`. This is an OPTIONAL field. If unset,
// the CO SHALL leave the `node_id` field unset in
// `ControllerPublishVolume`.
string node_id = 1;
} The node |
Hi @codenrhoden, I was literally about to suggest the same thing. Why pass in a default value at all? If Totally agreed with you Travis. |
Hi @saad-ali, It's odd that the result of This feels to me like the point of the Capabilities. I'd introduce a new Node Capability |
Problem with that is in
This is not sufficient to resolve the original issue. If I am writing an SP that can understand and use the CO's node_id, I shouldn't have to do a ton of work to discover what that node_id is. |
This will literally never happen unless the SP simply doesn't have a node ID and elects to use the CO's provided string. It is not ever the business of the CO to presume to know what the SP uses as the node ID. Because the only valid case for this proposal is when the SP doesn't provide a node ID, I don't see why the proposal isn't the following:
|
The cases that I'm thinking about are cloud provider SP's like GCE PD or AWS EBS where the names that the CO uses to identify the node are identical to the way the SP identifies nodes.
I would prefer letting the SP explicitly make the call, rather than putting something in the spec that leaves an input completely undefined and unvalidated. If the CO's node_id is passed to the SP in GetNodeId, the SP can validate that ID, if the id doesn't match the expected format then it can choose to do a heavyweight operation to discover the id, otherwise it can just return that id. |
Hi Saad, But you are letting the SP make that decision. It decides to not return a Node ID with the understanding that the CO will use one of its own. |
I'm ok closing this. We worked around it on k8s side. |
Arguably for many SPs the NodeID will be the same as the CO's nodeID, and forcing them to figure out their own nodeID via the
GetNodeID
call is burdensome. Can we make life easier for such plugins?We should consider passing the CO node ID in the GetNodeID request and if the SP doesn't have a custom node ID it can just return that instead of doing extra work to figure out what the CO thinks the node ID should be.
The text was updated successfully, but these errors were encountered: