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

Expose posix fs settings #8598

Merged
merged 11 commits into from
May 29, 2024
Merged

Expose posix fs settings #8598

merged 11 commits into from
May 29, 2024

Conversation

aduffeck
Copy link
Contributor

@aduffeck aduffeck commented Mar 6, 2024

ocis companion PR for cs3org/reva#4562

Example settings for gpfs with the gpfswatchfolder watcher:

"STORAGE_USERS_DRIVER": "posix",
"STORAGE_USERS_POSIX_ROOT": "/ibm/fs1/storage-users",
"STORAGE_USERS_POSIX_WATCH_TYPE": "gpfswatchfolder",
"STORAGE_USERS_POSIX_WATCH_PATH": "fs1_audit", // the kafka topic to watch
"STORAGE_USERS_POSIX_WATCH_FOLDER_KAFKA_BROKERS": "192.168.1.180:29092",
"STORAGE_USERS_ID_CACHE_STORE": "redis",
"STORAGE_USERS_ID_CACHE_STORE_NODES": "127.0.0.1:6379",

Copy link

update-docs bot commented Mar 6, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

Copy link

sonarcloud bot commented Mar 6, 2024

UseSpaceGroups bool `yaml:"use_space_groups" env:"STORAGE_USERS_POSIX_USE_SPACE_GROUPS" desc:"Use space groups to manage permissions on spaces."`

WatchType string `yaml:"watch_type" env:"STORAGE_USERS_POSIX_WATCH_TYPE" desc:"Type of the watcher to use for getting notified about changes to the filesystem. Currently available options are 'inotifywait' (default), 'gpfswatchfolder' and 'gpfsfileauditlogging'."`
WatchPath string `yaml:"watch_path" env:"STORAGE_USERS_POSIX_WATCH_PATH" desc:"Path to the watch directory/file. Only applies to the 'gpfsfileauditlogging' and 'inotifywait' watcher, in which case it is the path of the file audit log file/base directory to watch."`
Copy link
Member

@butonic butonic May 29, 2024

Choose a reason for hiding this comment

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

when inotify is used this is actually overwritten with the posix root path:

	watchPath := o.WatchPath
	var err error
	switch o.WatchType {
	case "gpfswatchfolder":
		t.watcher, err = NewGpfsWatchFolderWatcher(t, strings.Split(o.WatchFolderKafkaBrokers, ","))
		if err != nil {
			return nil, err
		}
	case "gpfsfileauditlogging":
		t.watcher, err = NewGpfsFileAuditLoggingWatcher(t, o.WatchPath)
		if err != nil {
			return nil, err
		}
	default:
		t.watcher = NewInotifyWatcher(t)
		watchPath = o.Root
	}

@butonic
Copy link
Member

butonic commented May 29, 2024

Using

"STORAGE_USERS_DRIVER": "posix",
"STORAGE_USERS_POSIX_ROOT": "/home/jfd/ocis-posix",

on first login I get an error in the log

2024-05-29T11:19:24+02:00 ERR failed to list storage spaces error="error reading user index: stat /home/jfd/ocis-posix/indexes/by-user-id/some-admin-user-id-0000-000000000000.mpk: no such file or directory" filters=[{"Term":{"SpaceType":"project"},"type":4},{"Term":{"User":{"idp":"https://cloud.ocis.test","opaque_id":"some-admin-user-id-0000-000000000000"}},"type":6}] line=/home/jfd/Repositories/reva/internal/grpc/services/storageprovider/storageprovider.go:575 pkg=rgrpc service=storage-users status={"code":15,"message":"error listing spaces","trace":"10838818faa9f6ef276aeed0574143eb"} traceid=10838818faa9f6ef276aeed0574143eb

and I do not get a space in the web ui

@butonic
Copy link
Member

butonic commented May 29, 2024

was fixed by enabling redis with

					"STORAGE_USERS_ID_CACHE_STORE": "redis",
					"STORAGE_USERS_ID_CACHE_STORE_NODES": "127.0.0.1:6379",

@butonic
Copy link
Member

butonic commented May 29, 2024

When creating files and directories via cli they would get assimilated, but the browser listing would not change when reloading the page. The cause was that the web ui somehow was using old spaceids ... cached somewhere. when cutting everything but the domain web would pick up the new personal spaceid and new files would show up properly.

@butonic
Copy link
Member

butonic commented May 29, 2024

ok, only issues I am aware of:

  • nats-js-kv does not seem to work, fine for now
    				//"STORAGE_USERS_ID_CACHE_STORE": "nats-js-kv",
    				//"STORAGE_USERS_ID_CACHE_STORE_NODES": "127.0.0.1:9233",
    
  • weird web ui caching where it remembers the old personal spaceid from a session with ocis using default decomposedfs where the userid will become the personal spaceid.
  • it seems two inotifywait processes are started ... one for the dataprovider and on for the storageprovider?
  • on arch inotify-tools must be installed for the default STORAGE_USERS_POSIX_WATCH_TYPE=inotifywait

Copy link
Member

@butonic butonic left a comment

Choose a reason for hiding this comment

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

no blockers from my POV

Copy link

sonarcloud bot commented May 29, 2024

@aduffeck aduffeck marked this pull request as ready for review May 29, 2024 12:51
@aduffeck aduffeck changed the title [Draft] Expose posix fs settings Expose posix fs settings May 29, 2024
@aduffeck aduffeck merged commit 80480cb into owncloud:master May 29, 2024
4 checks passed
@aduffeck aduffeck deleted the posixfs branch May 29, 2024 13:38
ownclouders pushed a commit that referenced this pull request May 29, 2024
@johnmmcgee
Copy link

Has this currently be added to a release? I do not see mention in the changelogs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants