Switch from ocis/s3ng to decomposed/decomposed_s3 storage drivers
ocis/s3ng are still supported for backwards compatibility reasons, but they need to be configured using the decomposed/decomposed_s3 options.
This commit is contained in:
@@ -27,7 +27,7 @@ type Config struct {
|
||||
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_SYSTEM_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token." introductionVersion:"pre5.0"`
|
||||
|
||||
FileMetadataCache Cache `yaml:"cache"`
|
||||
Driver string `yaml:"driver" env:"STORAGE_SYSTEM_DRIVER" desc:"The driver which should be used by the service." introductionVersion:"pre5.0"`
|
||||
Driver string `yaml:"driver" env:"STORAGE_SYSTEM_DRIVER" desc:"The driver which should be used by the service. The only supported driver is 'decomposed'. For backwards compatibility reasons it's also possible to use the 'ocis' driver and configure it using the 'decomposed' options. " introductionVersion:"pre5.0"`
|
||||
Drivers Drivers `yaml:"drivers"`
|
||||
DataServerURL string `yaml:"data_server_url" env:"STORAGE_SYSTEM_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by other services using this service." introductionVersion:"pre5.0"`
|
||||
|
||||
@@ -72,11 +72,11 @@ type HTTPConfig struct {
|
||||
|
||||
// Drivers holds Drivers config
|
||||
type Drivers struct {
|
||||
OCIS OCISDriver `yaml:"ocis"`
|
||||
Decomposed DecomposedDriver `yaml:"decomposed"`
|
||||
}
|
||||
|
||||
// OCISDriver holds ocis Driver config
|
||||
type OCISDriver struct {
|
||||
// DecomposedDriver holds the decomposed Driver config
|
||||
type DecomposedDriver struct {
|
||||
// Root is the absolute path to the location of the data
|
||||
Root string `yaml:"root" env:"STORAGE_SYSTEM_OC_ROOT" desc:"Path for the directory where the STORAGE-SYSTEM service stores it's persistent data. If not defined, the root directory derives from $OC_BASE_DATA_PATH/storage." introductionVersion:"pre5.0"`
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ func DefaultConfig() *config.Config {
|
||||
},
|
||||
Reva: shared.DefaultRevaConfig(),
|
||||
DataServerURL: "http://localhost:9216/data",
|
||||
Driver: "ocis",
|
||||
Driver: "decomposed",
|
||||
Drivers: config.Drivers{
|
||||
OCIS: config.OCISDriver{
|
||||
Decomposed: config.DecomposedDriver{
|
||||
Root: filepath.Join(defaults.BaseDataPath(), "storage", "metadata"),
|
||||
MaxAcquireLockCycles: 20,
|
||||
LockCycleDurationFactor: 30,
|
||||
|
||||
@@ -148,30 +148,33 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
}
|
||||
|
||||
func metadataDrivers(localEndpoint string, cfg *config.Config) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"ocis": map[string]interface{}{
|
||||
"metadata_backend": "messagepack",
|
||||
"root": cfg.Drivers.OCIS.Root,
|
||||
"user_layout": "{{.Id.OpaqueId}}",
|
||||
"treetime_accounting": false,
|
||||
"treesize_accounting": false,
|
||||
"permissionssvc": localEndpoint,
|
||||
"max_acquire_lock_cycles": cfg.Drivers.OCIS.MaxAcquireLockCycles,
|
||||
"lock_cycle_duration_factor": cfg.Drivers.OCIS.LockCycleDurationFactor,
|
||||
"disable_versioning": true,
|
||||
"statcache": map[string]interface{}{
|
||||
"cache_store": "noop",
|
||||
"cache_database": "system",
|
||||
},
|
||||
"filemetadatacache": map[string]interface{}{
|
||||
"cache_store": cfg.FileMetadataCache.Store,
|
||||
"cache_nodes": cfg.FileMetadataCache.Nodes,
|
||||
"cache_database": cfg.FileMetadataCache.Database,
|
||||
"cache_ttl": cfg.FileMetadataCache.TTL,
|
||||
"cache_disable_persistence": cfg.FileMetadataCache.DisablePersistence,
|
||||
"cache_auth_username": cfg.FileMetadataCache.AuthUsername,
|
||||
"cache_auth_password": cfg.FileMetadataCache.AuthPassword,
|
||||
},
|
||||
m := map[string]interface{}{
|
||||
"metadata_backend": "messagepack",
|
||||
"root": cfg.Drivers.Decomposed.Root,
|
||||
"user_layout": "{{.Id.OpaqueId}}",
|
||||
"treetime_accounting": false,
|
||||
"treesize_accounting": false,
|
||||
"permissionssvc": localEndpoint,
|
||||
"max_acquire_lock_cycles": cfg.Drivers.Decomposed.MaxAcquireLockCycles,
|
||||
"lock_cycle_duration_factor": cfg.Drivers.Decomposed.LockCycleDurationFactor,
|
||||
"disable_versioning": true,
|
||||
"statcache": map[string]interface{}{
|
||||
"cache_store": "noop",
|
||||
"cache_database": "system",
|
||||
},
|
||||
"filemetadatacache": map[string]interface{}{
|
||||
"cache_store": cfg.FileMetadataCache.Store,
|
||||
"cache_nodes": cfg.FileMetadataCache.Nodes,
|
||||
"cache_database": cfg.FileMetadataCache.Database,
|
||||
"cache_ttl": cfg.FileMetadataCache.TTL,
|
||||
"cache_disable_persistence": cfg.FileMetadataCache.DisablePersistence,
|
||||
"cache_auth_username": cfg.FileMetadataCache.AuthUsername,
|
||||
"cache_auth_password": cfg.FileMetadataCache.AuthPassword,
|
||||
},
|
||||
}
|
||||
|
||||
return map[string]interface{}{
|
||||
"ocis": m, // deprecated: use decomposed
|
||||
"decomposed": m,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user