syncloud / platform

Run popular services on your device with one click
https://syncloud.org
GNU General Public License v3.0
400 stars 40 forks source link

diaspora breaks hard drive activation #324

Closed cyberb closed 6 years ago

cyberb commented 6 years ago

From the log diaspora installer cannot find lib ports while it shoild have correct lob version embedded, probably this is our platform python sharing problem.

We shoild move toward not sharing any platform python with installers and use api rest (already in progress).

Probably it is loading one of the other libs from platform or other apps.

------------------------------------------------------------
Traceback (most recent call last):
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/flask_login.py", line 758, in decorated_view
    return func(*args, **kwargs)
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/syncloud_platform-180921690-py2.7.egg/syncloud_platform/rest/public.py", line 225, in disk_activate
    return jsonify(success=True, disks=public.disk_activate(request.args['device'])), 200
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/syncloud_platform-180921690-py2.7.egg/syncloud_platform/rest/facade/public.py", line 90, in disk_activate
    return self.hardware.activate_disk(device)
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/syncloud_platform-180921690-py2.7.egg/syncloud_platform/disks/hardware.py", line 61, in activate_disk
    self.deactivate_disk()
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/syncloud_platform-180921690-py2.7.egg/syncloud_platform/disks/hardware.py", line 88, in deactivate_disk
    self.event_trigger.trigger_app_event_disk()
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/syncloud_platform-180921690-py2.7.egg/syncloud_platform/events.py", line 48, in trigger_app_event_disk
    self.__trigger_app_event('storage-change')
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/syncloud_platform-180921690-py2.7.egg/syncloud_platform/events.py", line 58, in __trigger_app_event
    run_hook_script(app_dir, action)
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/syncloud_platform-180921690-py2.7.egg/syncloud_platform/events.py", line 32, in run_hook_script
    run_script(app_event_script, add_location_to_sys_path)
  File "/snap/platform/180921690/python/lib/python2.7/site-packages/syncloud_platform-180921690-py2.7.egg/syncloud_platform/gaplib/scripts.py", line 11, in run_script
    execfile(script_filename, g)
  File "/snap/diaspora/current/hooks/storage-change.py", line 1, in <module>
    from installer import DiasporaInstaller
  File "/snap/diaspora/current/hooks/installer.py", line 21, in <module>
    from syncloudlib.application import paths, urls, storage, ports
ImportError: cannot import name ports
cyberb commented 6 years ago

Fixed by embedding python into diaspora for now, later we need to find a language with a minimum set of dependencies and a small runtime to write our hooks. Bash is not really an option. Probably Go.