Skip to content

Conversation

@rohan47
Copy link
Contributor

@rohan47 rohan47 commented Nov 26, 2025

client-operator will receive information for enabling host network for csi controller plugins if data replicaion seperation is enabled and will configure it for the csi drivers

Copy link
Contributor

@leelavg leelavg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let's not use "HostNet" we are using "HostNetwork" in rest of the places.

for i := range storageClients.Items {
if storageClients.Items[i].Status.RbdDriverRequirements != nil {
enableRbdDriver = true
useHostNetForRbdCtrlPlugin = storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could there be a situation where we have two storage clients, with one using hostNetwork and the other not? What would be the expected value for useHostNetForRbdCtrlPlugin value in that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

apiVersion: v1
data:
generateRbdOMapInfo: "true"
topologyFailureDomainLabels: ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is automatically getting removed while doing make bundle

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leelavg dont we have CI job to catch this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like without removing this verify_generated_changes is failing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@rohan47 rohan47 Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall I add the chage mentioned in the above comment in this PR or have a new one?
make bundle removes this line in main branch as well

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to make the CI happy, please add it as part of this PR

for i := range storageClients.Items {
if storageClients.Items[i].Status.RbdDriverRequirements != nil {
enableRbdDriver = true
useHostNetForRbdCtrlPlugin = storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNet{
useHostNetForRbdCtrlPlugin=true
}

we should use host networking if one client is having this value set to true

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@rohan47 rohan47 force-pushed the drs_hostnet branch 4 times, most recently from bb5fb24 to 86f1495 Compare November 26, 2025 12:33
enableCephFsDriver := c.shouldEnableDriver(enableCephFsDriverKey)
enableNfsDriver := c.shouldEnableDriver(enableNfsDriverKey)

var useHostNetForRbdCtrlPlugin, useHostNetForCephFsCtrlPlugin, useHostNetForNfsCtrlPlugin *bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this as point to bool? lets keep it bool only

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@Madhu-1
Copy link
Member

Madhu-1 commented Nov 26, 2025

/hold

@Madhu-1
Copy link
Member

Madhu-1 commented Nov 26, 2025

adding hold label to have a chance for others to review. @leelavg @rewantsoni PTAL

Comment on lines 626 to 629
if storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork != nil &&
*storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork {
useHostNetForRbdCtrlPlugin = ptr.Deref(storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork, false)
}
Copy link
Member

@rewantsoni rewantsoni Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be simplified to this?

Suggested change
if storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork != nil &&
*storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork {
useHostNetForRbdCtrlPlugin = ptr.Deref(storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork, false)
}
if useHostNetwork:=storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork; useHostNetwork != nil {
useHostNetForRbdCtrlPlugin = ptr.Deref(useHostNetwork, false)
}

Or maybe something like to make sure if it is enabled for even one client it will be enabled for all clients?

Suggested change
if storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork != nil &&
*storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork {
useHostNetForRbdCtrlPlugin = ptr.Deref(storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork, false)
}
if useHostNetwork:=storageClients.Items[i].Status.RbdDriverRequirements.CtrlPluginHostNetwork; useHostNetwork != nil {
useHostNetForRbdCtrlPlugin = useHostNetForRbdCtrlPlugin || ptr.Deref(useHostNetwork, false)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second option looks clean, updated the changes

fetch the provider api changes required for csi controller plugin host
network

Signed-off-by: Rohan Gupta <[email protected]>
added csi ctrl plugin host network setting per driver in storage client
status, based on this setting operator configmap controller will
enable/disable host network for csi controllers

Signed-off-by: Rohan Gupta <[email protected]>
csi controller plugin host network will be configured for drivers based
on the information send via provider server

Signed-off-by: Rohan Gupta <[email protected]>
@rohan47
Copy link
Contributor Author

rohan47 commented Nov 26, 2025

/hold
Testing the changes again

@rohan47
Copy link
Contributor Author

rohan47 commented Nov 26, 2025

Verified the changes

@rewantsoni
Copy link
Member

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Nov 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Madhu-1, rewantsoni, rohan47

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rohan47
Copy link
Contributor Author

rohan47 commented Nov 27, 2025

/unhold

@openshift-merge-bot openshift-merge-bot bot merged commit 68ce318 into red-hat-storage:main Nov 27, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants