whole-tale / wt_home_dirs

0 stars 1 forks source link

Cannot set root path for home/workspace assetstores #6

Closed Xarthisius closed 6 years ago

Xarthisius commented 6 years ago

Even when using clean girder install with wt_home_dirs enabled it's not possible to specify paths for assetstores used by WebDAV folders. They are created during initial boot up (with default values). Subsequent changes to config result in:

Traceback (most recent call last):
  File "/home/xarth/codes/girder/girder/utility/plugin_utilities.py", line 115, in loadPlugins
    root, appconf, apiRoot = loadPlugin(plugin, root, appconf, apiRoot)
  File "/home/xarth/codes/girder/girder/utility/plugin_utilities.py", line 246, in loadPlugin
    pluginLoadMethod(info)
  File "/home/xarth/codes/girder/plugins/wt_home_dir/server/__init__.py", line 164, in load
    WTAssetstoreTypes.WT_HOME_ASSETSTORE)
  File "/home/xarth/codes/girder/plugins/wt_home_dir/server/__init__.py", line 94, in startDAVServer
    provider = WTFilesystemProvider(rootPath, pathMapper, assetstoreType)
  File "/home/xarth/codes/girder/plugins/wt_home_dir/server/lib/WTFilesystemProvider.py", line 290, in __init__
    self.updateAssetstore()
  File "/home/xarth/codes/girder/plugins/wt_home_dir/server/lib/WTFilesystemProvider.py", line 298, in updateAssetstore
    assetstore = self.createAssetstore()
  File "/home/xarth/codes/girder/plugins/wt_home_dir/server/lib/WTFilesystemProvider.py", line 315, in createAssetstore
    return Assetstore().save(dict)
  File "/home/xarth/codes/girder/girder/models/model_base.py", line 418, in save
    document = self.validate(document)
  File "/home/xarth/codes/girder/girder/models/assetstore.py", line 44, in validate
    'exists.', 'name')
girder.exceptions.ValidationException: An assetstore with that name already exists.

during next boot up.

hategan commented 6 years ago

2143597cba986a15bb827c72079c61552b31f062 should fix this. However, changing the path does not move the files. I believe it is sufficient to move the files physically in order to make it work since paths are not explicitly stored in the Girder DB.