Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
20 changes: 20 additions & 0 deletions pkg/driver/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dfsweden
If no data-portals exist and no fqdn is provided, fipaddr remains empty, this synthetic portal block is skipped, and MountShareAtBestDataportal still returns "could not mount to any data-portals".
Should this fallback use GetAnvilPortal() when portals is empty and fipaddr is empty?

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 {
Expand Down