pai icon indicating copy to clipboard operation
pai copied to clipboard

Team wise storage for NFS data storage

Open scarlett2018 opened this issue 7 years ago • 3 comments

Rescoping For time and effort limitations, the belowing features will be limited in the context of NFS storage in v0.11.0

What would you like to be added:

  • PAI supports to set up multiple storage;
  • PAI admin can set up users default and accessible storage;
  • Storage between different teams can be isolated through settings;

Why is this needed:

  • security considerations: data isolation;

Without this feature, how does the current module work: all the teams are share one single storage set up

Components that may involve changes: storage_plugin

scarlett2018 avatar Feb 25 '19 04:02 scarlett2018

PR created: https://github.com/Microsoft/pai/pull/2346

wangdian avatar Mar 19 '19 02:03 wangdian

Test Case:

Prerequisites:

  1. Set up nfs server, e.g: 10.0.0.1:/share/teamA with settings: (rw, sync, no_root_squash)
  2. Install PAI plugin submit-nfs-job [https://github.com/Microsoft/pai/tree/master/contrib/submit-nfs-job] #2358
  3. Start PAI dev-box

Steps:

  1. In dev-box, go to pai/contrib/storage_plugin, install jsonschema pip install jsonschema
  2. Create server config: python storagectl.py server set teamA 10.0.0.1 /share/teamA --sharedfolders data --privatefolders users
  3. Create user config: python storagectl.py user setdefault user1 teamA
  4. Go to nfs server, check if /share/teamA/data and /share/teamA/users/user1 folder was created
  5. Login with user1 in PAI, go to submit-nfs-job page, check if nfs mount section filled with right information
  6. Submit a job and check if the job files was created on nfs

wangdian avatar Mar 22 '19 03:03 wangdian

@wangdian When in steps2, come across this error.

root@xxxxxx:/pai/contrib/storage_plugin# python storagectl.py storage set default x.x.x.x /share/default --sharedfolders data --privatefolders user
/usr/local/lib/python2.7/dist-packages/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
usage: storagectl.py [-h] {init,server,user,push} ...
storagectl.py: error: invalid choice: 'storage' (choose from 'init', 'server', 'user', 'push')

ydye avatar Mar 25 '19 12:03 ydye