diff --git a/CHANGELOG.md b/CHANGELOG.md index 39e0c1d..776dafa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Treated all known terminal task states consistently so failed, halted, cancelled, validation-failed, and resumed tasks stop polling and report failure. - Avoided passing StorageClass NFS mount options to local filesystem mounts for file-backed volumes; those options are now only used for the backing NFS share mount. - Prevented duplicate or conflicting NFS version mount flags by treating both `nfsvers=` and `vers=` as version options, removing them before fallback retries, and passing NFSv3 fallback options as separate mount arguments. +- Honored the StorageClass `fqdn` parameter in deployments without data-portals (e.g. Anvil-only/no-DSX). Previously the resolved FQDN/floating IP was discarded because the mount loops only ran per data-portal, so an empty `data-portals` list caused provisioning to fail with `could not mount to any data-portals`. ### Changed - Removed the driver-specific `clientMountOptions` StorageClass parameter; CSI node mounts now rely on Kubernetes `mountOptions` / CSI `mountFlags`. diff --git a/pkg/driver/utils.go b/pkg/driver/utils.go index dcd1118..86d55c1 100644 --- a/pkg/driver/utils.go +++ b/pkg/driver/utils.go @@ -309,6 +309,26 @@ func (d *CSIDriver) MountShareAtBestDataportal(ctx context.Context, shareExportP } } + // In a no-DSX deployment (e.g. Anvil-only) GetDataPortals returns an empty + // list, so the portal-bounded mount loops below would never execute and the + // resolved fipaddr (from the FQDN or floating IP) would be silently thrown + // away. Synthesize a single portal from fipaddr so the existing mount logic + // (export discovery via showmount, NFS 4.2 -> 3 fallback) still runs. + if len(portals) == 0 && fipaddr != "" { + log.Infof("No data-portals returned by Anvil; using resolved address %s as the mount target", fipaddr) + portals = []common.DataPortal{ + { + Node: common.DataPortalNode{ + Name: fqdn, + MgmtIpAddress: common.DataPortalNodeAddress{ + Address: fipaddr, + }, + }, + Uoid: map[string]string{"uuid": fipaddr}, + }, + } + } + MountToDataPortal := func(portal common.DataPortal, mount_options []string) bool { addr := "" if len(fipaddr) > 0 {