Skip to content

Commit

Permalink
[full-ci] Bump reva to include ini metadata backend (#5613)
Browse files Browse the repository at this point in the history
* bump reva

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* default to ini backend

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* bump reva, add metadata backend config

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update changelog

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix tag

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* Update services/storage-system/pkg/config/config.go

Co-authored-by: kobergj <jkoberg@owncloud.com>

* fix storage user metadata config desc and env var

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: kobergj <jkoberg@owncloud.com>
  • Loading branch information
butonic and kobergj authored Feb 23, 2023
1 parent 56d3192 commit a5fb068
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog/unreleased/bump-reva.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ https://github.com/owncloud/ocis/pull/5285
https://github.com/owncloud/ocis/pull/5310
https://github.com/owncloud/ocis/pull/5404
https://github.com/owncloud/ocis/pull/5460
https://github.com/owncloud/ocis/pull/5613
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ require (
github.com/go-micro/plugins/v4/registry/nats v1.2.1
github.com/go-micro/plugins/v4/server/grpc v1.2.0
github.com/go-micro/plugins/v4/server/http v1.2.0
github.com/go-micro/plugins/v4/store/nats-js v1.1.0
github.com/go-micro/plugins/v4/store/redis v1.1.0
github.com/go-micro/plugins/v4/wrapper/breaker/gobreaker v1.2.0
github.com/go-micro/plugins/v4/wrapper/monitoring/prometheus v1.2.0
github.com/go-micro/plugins/v4/wrapper/trace/opencensus v1.1.0
Expand All @@ -38,6 +40,7 @@ require (
github.com/golang-jwt/jwt/v4 v4.4.3
github.com/golang/protobuf v1.5.2
github.com/google/go-tika v0.2.0
github.com/google/uuid v1.3.0
github.com/gookit/config/v2 v2.1.8
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0
Expand All @@ -49,6 +52,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/nats-io/nats-server/v2 v2.9.4
github.com/nats-io/nats.go v1.19.0
github.com/oklog/run v1.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/onsi/ginkgo v1.16.5
Expand Down Expand Up @@ -166,8 +170,6 @@ require (
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-micro/plugins/v4/store/nats-js v1.1.0 // indirect
github.com/go-micro/plugins/v4/store/redis v1.1.0 // indirect
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
Expand All @@ -184,7 +186,6 @@ require (
github.com/gomodule/redigo v1.8.9 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gookit/goutil v0.5.15 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/schema v1.2.0 // indirect
Expand Down Expand Up @@ -236,7 +237,6 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/nats-io/jwt/v2 v2.3.0 // indirect
github.com/nats-io/nats.go v1.19.0 // indirect
github.com/nats-io/nkeys v0.3.0 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/nxadm/tail v1.4.8 // indirect
Expand Down
1 change: 1 addition & 0 deletions services/storage-system/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ type Drivers struct {
}

type OCISDriver struct {
MetadataBackend string `yaml:"metadata_backend" env:"STORAGE_SYSTEM_OCIS_METADATA_BACKEND" desc:"The backend to use for storing metadata. Supported values are 'xattrs' and 'ini'. The setting 'xattrs' uses extended attributes to store file metadata while 'ini' uses a dedicated file to store file metadata. Defaults to 'xattrs'."`
// 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 definied, the root directory derives from $OCIS_BASE_DATA_PATH:/storage."`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func DefaultConfig() *config.Config {
Driver: "ocis",
Drivers: config.Drivers{
OCIS: config.OCISDriver{
MetadataBackend: "xattrs",
Root: filepath.Join(defaults.BaseDataPath(), "storage", "metadata"),
MaxAcquireLockCycles: 20,
LockCycleDurationFactor: 30,
Expand Down
1 change: 1 addition & 0 deletions services/storage-system/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} {
func metadataDrivers(cfg *config.Config) map[string]interface{} {
return map[string]interface{}{
"ocis": map[string]interface{}{
"metadata_backend": cfg.Drivers.OCIS.MetadataBackend,
"root": cfg.Drivers.OCIS.Root,
"user_layout": "{{.Id.OpaqueId}}",
"treetime_accounting": false,
Expand Down
2 changes: 2 additions & 0 deletions services/storage-users/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ type Drivers struct {
}

type OCISDriver struct {
MetadataBackend string `yaml:"metadata_backend" env:"STORAGE_USERS_OCIS_METADATA_BACKEND" desc:"The backend to use for storing metadata. Supported values are 'xattrs' and 'ini'. The setting 'xattrs' uses extended attributes to store file metadata while 'ini' uses a dedicated file to store file metadata. Defaults to 'xattrs'."`
// Root is the absolute path to the location of the data
Root string `yaml:"root" env:"STORAGE_USERS_OCIS_ROOT" desc:"The directory where the filesystem storage will store blobs and metadata. If not definied, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users."`
UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_OCIS_USER_LAYOUT" desc:"Template string for the user storage layout in the user directory."`
Expand All @@ -107,6 +108,7 @@ type OCISDriver struct {
}

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 'ini'. The setting 'xattrs' uses extended attributes to store file metadata while 'ini' uses a dedicated file to store file metadata. Defaults to 'xattrs'."`
// Root is the absolute path to the location of the data
Root string `yaml:"root" env:"STORAGE_USERS_S3NG_ROOT" desc:"The directory where the filesystem storage will store metadata for blobs. If not definied, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users."`
UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_S3NG_USER_LAYOUT" desc:"Template string for the user storage layout in the user directory."`
Expand Down
2 changes: 2 additions & 0 deletions services/storage-users/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func DefaultConfig() *config.Config {
UsersProviderEndpoint: "localhost:9144",
},
S3NG: config.S3NGDriver{
MetadataBackend: "xattrs",
Root: filepath.Join(defaults.BaseDataPath(), "storage", "users"),
ShareFolder: "/Shares",
UserLayout: "{{.Id.OpaqueId}}",
Expand All @@ -69,6 +70,7 @@ func DefaultConfig() *config.Config {
LockCycleDurationFactor: 30,
},
OCIS: config.OCISDriver{
MetadataBackend: "xattrs",
Root: filepath.Join(defaults.BaseDataPath(), "storage", "users"),
ShareFolder: "/Shares",
UserLayout: "{{.Id.OpaqueId}}",
Expand Down
4 changes: 4 additions & 0 deletions services/storage-users/pkg/revaconfig/drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,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,
"root": cfg.Drivers.OCIS.Root,
"user_layout": cfg.Drivers.OCIS.UserLayout,
"share_folder": cfg.Drivers.OCIS.ShareFolder,
Expand Down Expand Up @@ -148,6 +149,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,
"root": cfg.Drivers.OCIS.Root,
"user_layout": cfg.Drivers.OCIS.UserLayout,
"share_folder": cfg.Drivers.OCIS.ShareFolder,
Expand Down Expand Up @@ -184,6 +186,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,
"root": cfg.Drivers.S3NG.Root,
"user_layout": cfg.Drivers.S3NG.UserLayout,
"share_folder": cfg.Drivers.S3NG.ShareFolder,
Expand Down Expand Up @@ -225,6 +228,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,
"root": cfg.Drivers.S3NG.Root,
"user_layout": cfg.Drivers.S3NG.UserLayout,
"share_folder": cfg.Drivers.S3NG.ShareFolder,
Expand Down

0 comments on commit a5fb068

Please sign in to comment.