Skip to content

Commit 576836c

Browse files
authored
Merge pull request #1483 from iltyty/fix-oss-rrsa
Fix oss rrsa mount issue
2 parents 92ef3f3 + 216098b commit 576836c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/oss/nodeserver.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
141141
return nil, status.Error(codes.InvalidArgument, err.Error())
142142
}
143143
mountOptions = ns.fusePodManagers[opts.FuseType].AddDefaultMountOptions(mountOptions)
144-
mountOptions, err = mounterutils.AppendRRSAAuthOptions(ns.metadata, mountOptions, req.VolumeId, targetPath, authCfg)
145-
if err != nil {
146-
return nil, status.Error(codes.Internal, err.Error())
147-
}
148144

149145
// rund 3.0 protocol
150146
if features.FunctionalMutableFeatureGate.Enabled(features.RundCSIProtocol3) {
@@ -163,6 +159,10 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
163159
// Note: In ACK and ACS GPU scenarios, the socket path is provided by publishContext.
164160
var ossfsMounter mounter.Mounter
165161
if socketPath == "" {
162+
mountOptions, err = mounterutils.AppendRRSAAuthOptions(ns.metadata, mountOptions, req.VolumeId, targetPath, authCfg)
163+
if err != nil {
164+
return nil, status.Error(codes.Internal, err.Error())
165+
}
166166
ossfsMounter = mounter.NewOssCmdMounter(ossfsExecPath, req.VolumeId, ns.rawMounter)
167167
} else {
168168
ossfsMounter = mounter.NewProxyMounter(socketPath, ns.rawMounter)

0 commit comments

Comments
 (0)