Skip to content
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

Configure basename and portal #22

Closed
mahlbom opened this issue Nov 17, 2021 · 10 comments
Closed

Configure basename and portal #22

mahlbom opened this issue Nov 17, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@mahlbom
Copy link

mahlbom commented Nov 17, 2021

Possible to change default value of; self.target_basename = 'iqn.2011-08.org.truenas.ctl' and self.target_portal = 'hpe-csi' with a config map/secret.
Apply config map to values in backend.py.

@datamattsson datamattsson added the enhancement New feature or request label Nov 18, 2021
@datamattsson
Copy link
Collaborator

The target_basename is hardcoded in the CSI driver (https://git.io/J1Enf), it doesn't have to be - it's a separate issue, but that's how the CSI driver currently limit the scope of what targets to look for on the host.

The target_portal could technically be associated with something else, Secret, ConfigMap etc but the TrueNAS CSP is oblivious to the fact it's running on Kubernetes (you could technically run it on the appliance itself).

Another approach could be to remove the "hpe-csi" comment requirement all together and simply return all portal IPs found with the target_basename. The CSI driver will figure out for us which ones to perform the discovery on (it matches the node IP address/subnet with the returned discovery IPs).

Let me noodle on this for the next release.

@datamattsson
Copy link
Collaborator

The CSP now (#40) supports either of the official target names. Custom target names altogether needs to be fixed in the upstream CSI driver if desired.

@kingnarmer
Copy link

Where to define target_basename and target_portal ? I tried adding them to secret and storage class without success.

@datamattsson
Copy link
Collaborator

Where to define target_basename and target_portal ? I tried adding them to secret and storage class without success.

Did you follow the INSTALL guide? You configure them on the FreeNAS/TrueNAS appliance.

@kingnarmer
Copy link

I got install working with iqn.2011-08.org.truenas.ctl/hpe-csi. I am asking here how to pass my own custom target_basename and target_portal ?

@datamattsson
Copy link
Collaborator

I am asking here how to pass my own custom target_basename and target_portal

The target_basename is hardcoded in the HPE CSI Driver and the TrueNAS CSP so you need to fork and build everything yourself if you want a different name. The target_portal is only hardcoded in the TrueNAS CSP.

Why do these things matter as both parameters are merely keys to find devices and configuration?

@kingnarmer
Copy link

Thanks for clarification.

@kingnarmer
Copy link

kingnarmer commented Sep 14, 2023

Just wanted to add why this mattered in my case , I have 10 servers already iscsi-connected to TrueNAS. Changing target to hardcoded value "iqn.2011-08.org.truenas.ctl" will require downtime to reconfigure the 10 servers iscsi to new target.

@datamattsson
Copy link
Collaborator

Just wanted to add why this mattered in my case

The target IQNs are hardcoded in the CSI node driver, not the TrueNAS CSP. It's how the HPE CSI Driver filter out iSCSI targets on the worker nodes. It would make sense to allow that list of targets to be dynamically set but it's outside the scope of the TrueNAS CSP.

@kingnarmer
Copy link

Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants