Skip to content

Commit bcedbf9

Browse files
author
Abby Deng
committed
bypass feature flag temporarily
1 parent 630674e commit bcedbf9

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

internal/node/fs/fs_node.go

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,29 +71,23 @@ func (d *Node) NodePublishVolume(ctx context.Context, request *csi.NodePublishVo
7171
}
7272
klog.Infof("NFS enabled: %v", nfsEnabled)
7373

74-
vastUseSecondaryCluster, err := crusoe.GetVastUseSecondaryClusterFlag(
75-
ctx, d.CrusoeHTTPClient, d.CrusoeAPIEndpoint, d.HostInstance.ProjectId,
76-
)
77-
if err != nil {
78-
klog.Errorf("failed to fetch vast-use-secondary-cluster flag: %s", err)
79-
80-
return nil, status.Errorf(codes.Internal, "failed to fetch vast-use-secondary-cluster flag: %s", err)
81-
}
82-
klog.Infof("vast-use-secondary-cluster enabled: %v", vastUseSecondaryCluster)
83-
8474
var mountOpts []string
8575

8676
if request.GetReadonly() {
8777
// Read-only volumes cannot be written to in any way
8878
mountOpts = append(mountOpts, node.ReadOnlyMountOption)
8979
}
9080

91-
// Use DNS for ICAT locations instead of IP-based NFSHost if feature flag is enabled
81+
// Use DNS for ICAT locations instead of IP-based NFSHost
9282
nfsHost := d.NFSHost
9383
nfsRemotePorts := d.NFSRemotePorts
94-
if vastUseSecondaryCluster && d.HostInstance.Location == icatLocation {
84+
klog.Infof("Host instance location: %q, checking against icatLocation: %q", d.HostInstance.Location, icatLocation)
85+
if d.HostInstance.Location == icatLocation {
86+
klog.Infof("Using DNS-based NFS host for ICAT location: %s", crusoeCloudDNSNFSHost)
9587
nfsHost = crusoeCloudDNSNFSHost
9688
nfsRemotePorts = dnsRemotePorts
89+
} else {
90+
klog.Infof("Using IP-based NFS host: %s with remote ports: %s", nfsHost, nfsRemotePorts)
9791
}
9892

9993
err = nodePublishVolume(d.Mounter, d.Resizer, mountOpts, nfsEnabled, nfsRemotePorts, nfsHost, request)

0 commit comments

Comments
 (0)