From 4a911ac047aca87801c4cceacbb6ed94f3bb27a0 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Thu, 19 Sep 2024 11:27:25 +0200 Subject: [PATCH] feat(storage-users): remove metadata backend envvar Signed-off-by: jkoberg --- changelog/unreleased/remove-metadata-backend.md | 5 +++++ services/storage-system/README.md | 4 ---- services/storage-system/pkg/config/config.go | 1 - .../storage-system/pkg/config/defaults/defaultconfig.go | 1 - services/storage-system/pkg/revaconfig/config.go | 2 +- services/storage-users/README.md | 4 ---- services/storage-users/pkg/config/config.go | 2 -- .../storage-users/pkg/config/defaults/defaultconfig.go | 2 -- services/storage-users/pkg/revaconfig/drivers.go | 8 ++++---- 9 files changed, 10 insertions(+), 19 deletions(-) create mode 100644 changelog/unreleased/remove-metadata-backend.md diff --git a/changelog/unreleased/remove-metadata-backend.md b/changelog/unreleased/remove-metadata-backend.md new file mode 100644 index 0000000000..8906d693fb --- /dev/null +++ b/changelog/unreleased/remove-metadata-backend.md @@ -0,0 +1,5 @@ +Enhancement: Remove METADATA_BACKEND + +Removes the deprecated XXX_METADATA_BACKEND envvars + +https://github.com/owncloud/ocis/pull/10113 diff --git a/services/storage-system/README.md b/services/storage-system/README.md index ad1361f47e..15d7fe9b25 100644 --- a/services/storage-system/README.md +++ b/services/storage-system/README.md @@ -2,10 +2,6 @@ Purpose and description to be added -## Deprecated Metadata Backend - -Starting with ocis version 3.0.0, the default backend for metadata switched to messagepack. If the setting `STORAGE_SYSTEM_OCIS_METADATA_BACKEND` has not been defined manually, the backend will be migrated to `messagepack` automatically. Though still possible to manually configure `xattrs`, this setting should not be used anymore as it will be removed in a later version. - ## Caching The `storage-system` service caches file metadata via the configured store in `STORAGE_SYSTEM_CACHE_STORE`. Possible stores are: diff --git a/services/storage-system/pkg/config/config.go b/services/storage-system/pkg/config/config.go index cc35e32107..75d2adcb90 100644 --- a/services/storage-system/pkg/config/config.go +++ b/services/storage-system/pkg/config/config.go @@ -78,7 +78,6 @@ type Drivers struct { // OCISDriver holds ocis Driver config type OCISDriver struct { - MetadataBackend string `yaml:"metadata_backend" env:"OCIS_DECOMPOSEDFS_METADATA_BACKEND;STORAGE_SYSTEM_OCIS_METADATA_BACKEND" desc:"The backend to use for storing metadata. Supported values are 'messagepack' and 'xattrs'. The setting 'messagepack' uses a dedicated file to store file metadata while 'xattrs' uses extended attributes to store file metadata. Defaults to 'messagepack'." introductionVersion:"pre5.0"` // Root is the absolute path to the location of the data Root string `yaml:"root" env:"STORAGE_SYSTEM_OCIS_ROOT" desc:"Path for the directory where the STORAGE-SYSTEM service stores it's persistent data. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH:/storage." introductionVersion:"pre5.0"` diff --git a/services/storage-system/pkg/config/defaults/defaultconfig.go b/services/storage-system/pkg/config/defaults/defaultconfig.go index 40f78410ee..c0f1555ad4 100644 --- a/services/storage-system/pkg/config/defaults/defaultconfig.go +++ b/services/storage-system/pkg/config/defaults/defaultconfig.go @@ -45,7 +45,6 @@ func DefaultConfig() *config.Config { Driver: "ocis", Drivers: config.Drivers{ OCIS: config.OCISDriver{ - MetadataBackend: "messagepack", Root: filepath.Join(defaults.BaseDataPath(), "storage", "metadata"), MaxAcquireLockCycles: 20, LockCycleDurationFactor: 30, diff --git a/services/storage-system/pkg/revaconfig/config.go b/services/storage-system/pkg/revaconfig/config.go index 82373265e8..d0304e05c6 100644 --- a/services/storage-system/pkg/revaconfig/config.go +++ b/services/storage-system/pkg/revaconfig/config.go @@ -150,7 +150,7 @@ 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": cfg.Drivers.OCIS.MetadataBackend, + "metadata_backend": "messagepack", "root": cfg.Drivers.OCIS.Root, "user_layout": "{{.Id.OpaqueId}}", "treetime_accounting": false, diff --git a/services/storage-users/README.md b/services/storage-users/README.md index 04da17533b..b529fb3f67 100644 --- a/services/storage-users/README.md +++ b/services/storage-users/README.md @@ -2,10 +2,6 @@ Purpose and description to be added -## Deprecated Metadata Backend - -Starting with ocis version 3.0.0, the default backend for metadata switched to messagepack. If the setting `STORAGE_USERS_OCIS_METADATA_BACKEND` has not been defined manually, the backend will be migrated to `messagepack` automatically. Though still possible to manually configure `xattrs`, this setting should not be used anymore as it will be removed in a later version. - ## Graceful Shutdown Starting with Infinite Scale version 3.1, you can define a graceful shutdown period for the `storage-users` service. diff --git a/services/storage-users/pkg/config/config.go b/services/storage-users/pkg/config/config.go index 3d56f3bf34..d9f30aaf1a 100644 --- a/services/storage-users/pkg/config/config.go +++ b/services/storage-users/pkg/config/config.go @@ -116,7 +116,6 @@ type AsyncPropagatorOptions struct { // OCISDriver is the storage driver configuration when using 'ocis' storage driver type OCISDriver struct { - MetadataBackend string `yaml:"metadata_backend" env:"OCIS_DECOMPOSEDFS_METADATA_BACKEND;STORAGE_USERS_OCIS_METADATA_BACKEND" desc:"The backend to use for storing metadata. Supported values are 'messagepack' and 'xattrs'. The setting 'messagepack' uses a dedicated file to store file metadata while 'xattrs' uses extended attributes to store file metadata. Defaults to 'messagepack'." introductionVersion:"pre5.0"` Propagator string `yaml:"propagator" env:"OCIS_DECOMPOSEDFS_PROPAGATOR;STORAGE_USERS_OCIS_PROPAGATOR" desc:"The propagator used for decomposedfs. At the moment, only 'sync' is fully supported, 'async' is available as an experimental option." introductionVersion:"pre5.0"` AsyncPropagatorOptions AsyncPropagatorOptions `yaml:"async_propagator_options"` // Root is the absolute path to the location of the data @@ -143,7 +142,6 @@ type OCISDriver struct { // S3NGDriver is the storage driver configuration when using 's3ng' storage driver type S3NGDriver struct { - MetadataBackend string `yaml:"metadata_backend" env:"STORAGE_USERS_S3NG_METADATA_BACKEND" desc:"The backend to use for storing metadata. Supported values are 'xattrs' and 'messagepack'. The setting 'xattrs' uses extended attributes to store file metadata while 'messagepack' uses a dedicated file to store file metadata. Defaults to 'xattrs'." introductionVersion:"pre5.0"` Propagator string `yaml:"propagator" env:"OCIS_DECOMPOSEDFS_PROPAGATOR;STORAGE_USERS_S3NG_PROPAGATOR" desc:"The propagator used for decomposedfs. At the moment, only 'sync' is fully supported, 'async' is available as an experimental option." introductionVersion:"pre5.0"` AsyncPropagatorOptions AsyncPropagatorOptions `yaml:"async_propagator_options"` // Root is the absolute path to the location of the data diff --git a/services/storage-users/pkg/config/defaults/defaultconfig.go b/services/storage-users/pkg/config/defaults/defaultconfig.go index 218d3b68ab..d6de665dee 100644 --- a/services/storage-users/pkg/config/defaults/defaultconfig.go +++ b/services/storage-users/pkg/config/defaults/defaultconfig.go @@ -106,7 +106,6 @@ func DefaultConfig() *config.Config { UsersProviderEndpoint: "com.owncloud.api.users", }, S3NG: config.S3NGDriver{ - MetadataBackend: "messagepack", Propagator: "sync", Root: filepath.Join(defaults.BaseDataPath(), "storage", "users"), ShareFolder: "/Shares", @@ -126,7 +125,6 @@ func DefaultConfig() *config.Config { DisableMultipart: true, }, OCIS: config.OCISDriver{ - MetadataBackend: "messagepack", Propagator: "sync", Root: filepath.Join(defaults.BaseDataPath(), "storage", "users"), ShareFolder: "/Shares", diff --git a/services/storage-users/pkg/revaconfig/drivers.go b/services/storage-users/pkg/revaconfig/drivers.go index 6ab8b0e309..d351da4a6d 100644 --- a/services/storage-users/pkg/revaconfig/drivers.go +++ b/services/storage-users/pkg/revaconfig/drivers.go @@ -159,7 +159,7 @@ func OwnCloudSQL(cfg *config.Config) map[string]interface{} { // Ocis is the config mapping for the Ocis storage driver func Ocis(cfg *config.Config) map[string]interface{} { return map[string]interface{}{ - "metadata_backend": cfg.Drivers.OCIS.MetadataBackend, + "metadata_backend": "messagepack", "propagator": cfg.Drivers.OCIS.Propagator, "async_propagator_options": map[string]interface{}{ "propagation_delay": cfg.Drivers.OCIS.AsyncPropagatorOptions.PropagationDelay, @@ -216,7 +216,7 @@ func Ocis(cfg *config.Config) map[string]interface{} { // OcisNoEvents is the config mapping for the ocis storage driver emitting no events func OcisNoEvents(cfg *config.Config) map[string]interface{} { return map[string]interface{}{ - "metadata_backend": cfg.Drivers.OCIS.MetadataBackend, + "metadata_backend": "messagepack", "propagator": cfg.Drivers.OCIS.Propagator, "async_propagator_options": map[string]interface{}{ "propagation_delay": cfg.Drivers.OCIS.AsyncPropagatorOptions.PropagationDelay, @@ -276,7 +276,7 @@ func S3(cfg *config.Config) map[string]interface{} { // S3NG is the config mapping for the s3ng storage driver func S3NG(cfg *config.Config) map[string]interface{} { return map[string]interface{}{ - "metadata_backend": cfg.Drivers.S3NG.MetadataBackend, + "metadata_backend": "messagepack", "propagator": cfg.Drivers.S3NG.Propagator, "async_propagator_options": map[string]interface{}{ "propagation_delay": cfg.Drivers.S3NG.AsyncPropagatorOptions.PropagationDelay, @@ -343,7 +343,7 @@ func S3NG(cfg *config.Config) map[string]interface{} { // S3NGNoEvents is the config mapping for the s3ng storage driver emitting no events func S3NGNoEvents(cfg *config.Config) map[string]interface{} { return map[string]interface{}{ - "metadata_backend": cfg.Drivers.S3NG.MetadataBackend, + "metadata_backend": "messagepack", "propagator": cfg.Drivers.S3NG.Propagator, "async_propagator_options": map[string]interface{}{ "propagation_delay": cfg.Drivers.S3NG.AsyncPropagatorOptions.PropagationDelay,