fix: pass mount id to the s3ng storage driver (#12756)
* fix: pass mount id to the s3ng storage driver Uploads to a s3ng backed storage-users service never left the processing state, leaving the file unreadable and unmodifiable. This affects every client equally: WebDAV, the desktop sync client and the web UI. Decomposedfs discards any event whose storage id does not match its configured mount id. Only the ocis driver was ever given a mount_id, so under s3ng the comparison ran against an empty string and every PostprocessingFinished event was dropped. Regression since 8.1.0, where the mount-id event filter was introduced for vault storage. * fix: adding mount_id in OcisNoEvents and S3NGNoEvents
This commit is contained in:
1 parent
36d5089424
commit
81527e98e4
2 files changed
+23
No files matched your search
@@ -0,0 +1,20 @@
|
||||
Bugfix: Fix uploads stuck in processing with the s3ng storage driver
|
||||
|
||||
Uploads to a `s3ng` backed storage-users service never left the processing
|
||||
state, so the file stayed unreadable and unmodifiable forever. Every client was
|
||||
affected equally, because the defect sits below the protocol layer: WebDAV, the
|
||||
desktop sync client and the Web UI alike.
|
||||
|
||||
Decomposedfs ignores any event whose storage id does not match its configured
|
||||
mount id. The `s3ng` driver never received a `mount_id`, so that comparison ran
|
||||
against an empty string and every `PostprocessingFinished` event was discarded.
|
||||
The `s3ng` driver now passes `mount_id` the same way the `ocis` driver already
|
||||
does.
|
||||
|
||||
The same key is also added to `OcisNoEvents` and `S3NGNoEvents`. Those build the
|
||||
storage provider rather than the data provider and configure no events, so today
|
||||
the value is unused there. Setting it keeps both constructions of the same
|
||||
storage consistent about their own identity, rather than leaving one of them to
|
||||
report an empty mount id to any future reader of that option.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12756
|
||||
@@ -214,6 +214,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{}{
|
||||
"mount_id": cfg.MountID,
|
||||
"metadata_backend": "messagepack",
|
||||
"propagator": cfg.Drivers.OCIS.Propagator,
|
||||
"async_propagator_options": map[string]interface{}{
|
||||
@@ -272,6 +273,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{}{
|
||||
"mount_id": cfg.MountID,
|
||||
"metadata_backend": "messagepack",
|
||||
"propagator": cfg.Drivers.S3NG.Propagator,
|
||||
"async_propagator_options": map[string]interface{}{
|
||||
@@ -338,6 +340,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{}{
|
||||
"mount_id": cfg.MountID,
|
||||
"metadata_backend": "messagepack",
|
||||
"propagator": cfg.Drivers.S3NG.Propagator,
|
||||
"async_propagator_options": map[string]interface{}{
|
||||
|
||||
Reference in new issue
Block a user