Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max AcquireLock Cycles and Bump Reva #4965

Merged
merged 3 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/configurable-max-lock-cycles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Configurable max lock cycles

Adds config option for max lock cycles. Also bumps reva

https://github.com/owncloud/ocis/pull/4964
1 change: 1 addition & 0 deletions changelog/unreleased/update-reva-rc1.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ https://github.com/owncloud/ocis/pull/4867
https://github.com/owncloud/ocis/pull/4903
https://github.com/owncloud/ocis/pull/4908
https://github.com/owncloud/ocis/pull/4915
https://github.com/owncloud/ocis/pull/4964
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/blevesearch/bleve/v2 v2.3.5
github.com/coreos/go-oidc/v3 v3.4.0
github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965
github.com/cs3org/reva/v2 v2.10.1-0.20221028083225-fdea5de75e96
github.com/cs3org/reva/v2 v2.10.1-0.20221103130432-65012c8466b4
github.com/disintegration/imaging v1.6.2
github.com/ggwhite/go-masker v1.0.9
github.com/go-chi/chi/v5 v5.0.7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ github.com/crewjam/saml v0.4.6 h1:XCUFPkQSJLvzyl4cW9OvpWUbRf0gE7VUpU8ZnilbeM4=
github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD96t1A=
github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965 h1:y4n2j68LLnvac+zw/al8MfPgO5aQiIwLmHM/JzYN8AM=
github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva/v2 v2.10.1-0.20221028083225-fdea5de75e96 h1:zirPCF7XxGpWh/ZN2MES3muW2dzasjhUTOPUj0KoB9s=
github.com/cs3org/reva/v2 v2.10.1-0.20221028083225-fdea5de75e96/go.mod h1:Gv4tlxYM4wGKP8DD/S/TVsv619Z00QpsFbTR/2wfjVw=
github.com/cs3org/reva/v2 v2.10.1-0.20221103130432-65012c8466b4 h1:tJTOa/Tp0rXBWXsBTZE8P3O8+BLQIUhZiw0zkDA/S3I=
github.com/cs3org/reva/v2 v2.10.1-0.20221103130432-65012c8466b4/go.mod h1:Gv4tlxYM4wGKP8DD/S/TVsv619Z00QpsFbTR/2wfjVw=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
Expand Down
3 changes: 2 additions & 1 deletion services/storage-users/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ type OCISDriver struct {
// the general space alias, eg: `{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}`
GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template" env:"STORAGE_USERS_OCIS_GENERAL_SPACE_ALIAS_TEMPLATE" desc:"Template string to construct general space aliases."`
//ShareFolder defines the name of the folder jailing all shares
ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OCIS_SHARE_FOLDER" desc:"Name of the folder jailing all shares."`
ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OCIS_SHARE_FOLDER" desc:"Name of the folder jailing all shares."`
MaxAcquireLockCycles int `yaml:"max_acquire_lock_cycles" env:"STORAGE_USERS_OCIS_MAX_ACQUIRE_LOCK_CYCLES" desc:"When trying to lock files, ocis will try this amount of times to acquire the lock before failing. After each try it will wait for an increasing amount of time. Values of 0 or below will be ignored and the default value of 25 will be used"`
Copy link
Collaborator Author

@kobergj kobergj Nov 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmattel following our discussion from #4958

This is the master version. Could you check my description?

}

type S3NGDriver struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func DefaultConfig() *config.Config {
PersonalSpaceAliasTemplate: "{{.SpaceType}}/{{.User.Username | lower}}",
GeneralSpaceAliasTemplate: "{{.SpaceType}}/{{.SpaceName | replace \" \" \"-\" | lower}}",
PermissionsEndpoint: "127.0.0.1:9191",
MaxAcquireLockCycles: 25,
},
},
Events: config.Events{
Expand Down
2 changes: 2 additions & 0 deletions services/storage-users/pkg/revaconfig/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func UserDrivers(cfg *config.Config) map[string]interface{} {
"treesize_accounting": true,
"permissionssvc": cfg.Drivers.OCIS.PermissionsEndpoint,
"permissionssvc_tls_mode": cfg.Commons.GRPCClientTLS.Mode,
"max_acquire_lock_cycles": cfg.Drivers.OCIS.MaxAcquireLockCycles,
},
"s3": map[string]interface{}{
"enable_home": false,
Expand All @@ -121,6 +122,7 @@ func UserDrivers(cfg *config.Config) map[string]interface{} {
"s3.secret_key": cfg.Drivers.S3NG.SecretKey,
"s3.endpoint": cfg.Drivers.S3NG.Endpoint,
"s3.bucket": cfg.Drivers.S3NG.Bucket,
"max_acquire_lock_cycles": cfg.Drivers.OCIS.MaxAcquireLockCycles,
},
}
}