ClusterLabs / resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
GNU General Public License v2.0
489 stars 577 forks source link

iSCSITarget - don't create default portal #1893

Closed krudometkin closed 9 months ago

krudometkin commented 9 months ago

Hello,

The iSCSITarget agent does not create the portal by default.

The code does not contain creating the OCF_RESKEY_portals_default: for portal in ${OCF_RESKEY_portals}; do if [ $portal != ${OCF_RESKEY_portals_default} ] ; then IFS=':' read -a sep_portal <<< "$portal" ocf_run targetcli /iscsi/${OCF_RESKEY_iqn}/tpg1/portals create "${sep_portal[0]}" "${sep_portal[1]}" || exit $OCF_ERR_GENERIC fi done

Regards, Konstantin

oalbrigt commented 9 months ago

This is handled in the iSCSILogicalUnit agent: https://github.com/ClusterLabs/resource-agents/blob/main/heartbeat/iSCSILogicalUnit.in#L463

krudometkin commented 9 months ago

Thanks for the answer. What happens if I don't use iSCSILogicalUnit?

oalbrigt commented 9 months ago

Then you'll have to without the features it provides, or find another way to use them.

krudometkin commented 9 months ago

Yes, in this case I need to set the option portals="x.x.x.x:3260" because it is not initialized by default. Thanks for the answers ;)