Skip to content

Commit

Permalink
upgrade irodsfs, irodsfs-pool
Browse files Browse the repository at this point in the history
  • Loading branch information
iychoi committed Oct 31, 2024
1 parent 1411d3c commit a347461
Show file tree
Hide file tree
Showing 17 changed files with 301 additions and 484 deletions.
2 changes: 1 addition & 1 deletion deploy/image/irods_csi_driver_image.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ARG CSI_DRIVER_SRC_DIR="/go/src/github.com/cyverse/irods-csi-driver"
ARG IRODS_FUSE_DIR="/opt/irodsfs"
ARG FUSE_NFS_DIR="/opt/fuse-nfs"
ARG DEBIAN_FRONTEND=noninteractive
ARG IRODSFS_VER=v0.9.7
ARG IRODSFS_VER=v0.10.2

### Install dumb-init
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 \
Expand Down
2 changes: 1 addition & 1 deletion deploy/image/irods_csi_driver_pool_image.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LABEL version="0.1"
LABEL description="iRODS CSI Driver Pool Image"

ARG DEBIAN_FRONTEND=noninteractive
ARG IRODSFS_POOL_VER=v0.6.26
ARG IRODSFS_POOL_VER=v0.8.2

### Install dumb-init
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 \
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ module github.com/cyverse/irods-csi-driver

go 1.21

toolchain go1.21.5

require (
github.com/container-storage-interface/spec v1.2.0
github.com/cyverse/go-irodsclient v0.14.11
github.com/cyverse/irodsfs-common v0.0.0-20240716191935-69006aedefdc
github.com/cyverse/go-irodsclient v0.15.6
github.com/cyverse/irodsfs v0.10.2
github.com/cyverse/irodsfs-common v0.0.0-20241025231356-4e650ac30aa6
github.com/pkg/xattr v0.4.9
github.com/prometheus/client_golang v1.13.0
github.com/rs/xid v1.3.0
Expand All @@ -25,6 +24,7 @@ require (
github.com/go-logr/logr v0.2.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/kr/pretty v0.2.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
Expand All @@ -38,4 +38,5 @@ require (
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
12 changes: 8 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/container-storage-interface/spec v1.2.0 h1:bD9KIVgaVKKkQ/UbVUY9kCaH/CJbhNxe0eeB4JeJV2s=
github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
github.com/cyverse/go-irodsclient v0.14.11 h1:pPAo3UOncFon/TsIjAAUT+rDTfJ6NRux6tr1fmz7Fx0=
github.com/cyverse/go-irodsclient v0.14.11/go.mod h1:eBXha3cwfrM0p1ijYVqsrLJQHpRwTfpA4c5dKCQsQFc=
github.com/cyverse/irodsfs-common v0.0.0-20240716191935-69006aedefdc h1:o75XZvO0FQx2Vy8FwUmL9XffqqLoittvyXGv/5b4UEw=
github.com/cyverse/irodsfs-common v0.0.0-20240716191935-69006aedefdc/go.mod h1:cEywU4X9x1v1UfZC2o7T9Du7yQyJaxrkLlHrn7Wxxgs=
github.com/cyverse/go-irodsclient v0.15.6 h1:9pbyNCKqEGWEcnkFMK3ygelc1rNIGMrFh2PWbRFDxPI=
github.com/cyverse/go-irodsclient v0.15.6/go.mod h1:NN+PxHfLDUmsqfqSY84JfmqXS4EYiuiNW6ti6oPGCgk=
github.com/cyverse/irodsfs v0.10.2 h1:iQJiT3toGGbTF/yCV4q2Rbsb6/OnSF5ChsjX+OERHYs=
github.com/cyverse/irodsfs v0.10.2/go.mod h1:RetQ3DaEwuMr0p3dGZ2q/Qjui4XjNSzGb8T3Jr+o6ZM=
github.com/cyverse/irodsfs-common v0.0.0-20241025231356-4e650ac30aa6 h1:/T/JcR11r1dGzExKjrFwLe68zWdtp+HMlib+4cbz3ck=
github.com/cyverse/irodsfs-common v0.0.0-20241025231356-4e650ac30aa6/go.mod h1:+eZ+/tYP54StOJCchIBUKEmzBip0n32CYOzYr+KXhPM=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -150,6 +152,8 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
Expand Down
16 changes: 9 additions & 7 deletions pkg/client/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"path/filepath"
"strconv"
"strings"

"github.com/cyverse/irods-csi-driver/pkg/common"
)

// ClientType is a mount client type
Expand All @@ -22,7 +24,7 @@ const (

// GetClientType returns iRODS Client value from param map
func GetClientType(params map[string]string) ClientType {
return GetValidClientType(params["client"])
return GetValidClientType(params[common.NormalizeConfigKey("client")])
}

// IsValidClientType checks if given client string is valid
Expand Down Expand Up @@ -55,14 +57,14 @@ func GetValidClientType(client string) ClientType {

// GetConfigEnforceProxyAccess checks if proxy access is enforced via driver config
func GetConfigEnforceProxyAccess(configs map[string]string) bool {
enforce := configs["enforceproxyaccess"]
enforce := configs[common.NormalizeConfigKey("enforce_proxy_access")]
bEnforce, _ := strconv.ParseBool(enforce)
return bEnforce
}

// GetConfigMountPathWhitelist returns a whitelist of collections that users can mount
func GetConfigMountPathWhitelist(configs map[string]string) []string {
if whitelist, ok := configs["mountpathwhitelist"]; ok {
if whitelist, ok := configs[common.NormalizeConfigKey("mount_path_whitelist")]; ok {
if len(whitelist) > 0 {
whitelistItems := strings.Split(whitelist, ",")
for idx := range whitelistItems {
Expand All @@ -83,26 +85,26 @@ func GetConfigMountPathWhitelist(configs map[string]string) []string {
// GetConfigDataRootPath returns a data root path
func GetConfigDataRootPath(configs map[string]string, volID string) string {
irodsClientType := GetClientType(configs)
return filepath.Join(configs["storagepath"], string(irodsClientType), volID)
return filepath.Join(common.NormalizeConfigKey(configs["storage_path"]), string(irodsClientType), volID)
}

// GetConfigOverlayFSLowerPath returns a lower path for overlayfs
func GetConfigOverlayFSLowerPath(configs map[string]string, volID string) string {
irodsClientType := GetClientType(configs)
name := fmt.Sprintf("%s-overlayfs-lower", volID)
return filepath.Join(configs["storagepath"], string(irodsClientType), name)
return filepath.Join(common.NormalizeConfigKey(configs["storage_path"]), string(irodsClientType), name)
}

// GetConfigOverlayFSUpperPath returns a upper path for overlayfs
func GetConfigOverlayFSUpperPath(configs map[string]string, volID string) string {
irodsClientType := GetClientType(configs)
name := fmt.Sprintf("%s-overlayfs-upper", volID)
return filepath.Join(configs["storagepath"], string(irodsClientType), name)
return filepath.Join(common.NormalizeConfigKey(configs["storage_path"]), string(irodsClientType), name)
}

// GetConfigOverlayFSWorkDirPath returns a work dir path for overlayfs
func GetConfigOverlayFSWorkDirPath(configs map[string]string, volID string) string {
irodsClientType := GetClientType(configs)
name := fmt.Sprintf("%s-overlayfs-workdir", volID)
return filepath.Join(configs["storagepath"], string(irodsClientType), name)
return filepath.Join(common.NormalizeConfigKey(configs["storage_path"]), string(irodsClientType), name)
}
Loading

0 comments on commit a347461

Please sign in to comment.