kafonek / tljh-shared-directory

Plugin for The Littlest JupyterHub (TLJH) that creates a shared-directory and installs Voila
BSD 3-Clause "New" or "Revised" License
5 stars 6 forks source link

Can't create link when installing tljh-shared-directory #1

Open Betristor opened 4 years ago

Betristor commented 4 years ago

root@myserver:/etc/skel# sudo curl https://raw.githubusercontent.com/jupyterhub/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo python3 - --admin zyh --plugin git+https://github.com/kafonek/tljh-shared-directory % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10949 100 10949 0 0 7348 0 0:00:01 0:00:01 --:--:-- 7348 Checking if TLJH is already installed... TLJH already installed, upgrading... Upgrading TLJH installer... Upgraded pip Setup tljh package Starting TLJH installer... Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 530, in main() File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 499, in main ensure_config_yaml(pm) File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 463, in ensure_config_yaml hook.tljh_config_post_install(config=config) File "/opt/tljh/hub/lib/python3.6/site-packages/pluggy/hooks.py", line 281, in call return self._hookexec(self, self.get_hookimpls(), kwargs) File "/opt/tljh/hub/lib/python3.6/site-packages/pluggy/manager.py", line 93, in _hookexec return self._inner_hookexec(hook, methods, kwargs) File "/opt/tljh/hub/lib/python3.6/site-packages/pluggy/manager.py", line 87, in firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, File "/opt/tljh/hub/lib/python3.6/site-packages/pluggy/callers.py", line 135, in _multicall return outcome.get_result() File "/opt/tljh/hub/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result raise ex[1].with_traceback(ex[2]) File "/opt/tljh/hub/lib/python3.6/site-packages/pluggy/callers.py", line 114, in _multicall res = hook_impl.function(*args) File "/opt/tljh/hub/lib/python3.6/site-packages/tljh_shared_directory.py", line 26, in tljh_config_post_install sh.ln('-s', '/srv/scratch', '/etc/skel/scratch') File "/opt/tljh/hub/lib/python3.6/site-packages/sh.py", line 1520, in call return RunningCommand(cmd, call_args, stdin, stdout, stderr) File "/opt/tljh/hub/lib/python3.6/site-packages/sh.py", line 784, in init self.wait() File "/opt/tljh/hub/lib/python3.6/site-packages/sh.py", line 841, in wait self.handle_command_exit_code(exit_code) File "/opt/tljh/hub/lib/python3.6/site-packages/sh.py", line 865, in handle_command_exit_code raise exc sh.ErrorReturnCode_1:

RAN: /bin/ln -s /srv/scratch /etc/skel/scratch

STDOUT:

STDERR: /bin/ln: 无法创建符号链接'/etc/skel/scratch/scratch': 文件已存在

Above is the error when installing tljh-shared-directory, I tried twice, so I'm sure the file /etc/skel/scratch/scratch wasn't there before I sudo the command. My OS is Ubuntu18.04, TLJH installed for a team no more than 20 people. Can anybody tell me why this is happening?

pnavaro commented 2 years ago

I have the same bug and i can't disable this plugin :-(