tiup seems failed if user account default shell is csh

I need to use an user account to install TiKV, but this user account does have the secret-free (ie. NOPASSWD) sudo root permission on all target machines. The following “tiup cluster check” failure looks like and tiup SSH a “bash” command to target machines while the user account default shell is csh. Is there any tiup hidden switch to bypass this error? Thanks!

If I deploy directly as “tiup cluster deploy tikv-test v5.0.1 ./topology.yaml --user mychung”, it seems to failed because the same reason.

021-09-30T20:59:08.644-0700 INFO Execute command finished {“code”: 1, “error”: “task.env_init.failed: Failed to initialize TiDB environment on remote host ‘10.xxx.xxx.xxx’, cause: task.env_init.sub_command_failed: Failed to create ‘~/.ssh’ directory for user ‘mychung’, cause: executor.ssh.execute_failed: Failed to execute command over SSH for ‘mychung@10.xxx.xxx.xxx:22’ {ssh_stderr: Bad : modifier in $ (/).
, ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin /usr/bin/sudo -H bash -c "su - mychung -c ‘mkdir -p ~/.ssh && chmod 700 ~/.ssh’"}, cause: Process exited with status 1”, “errorVerbose”: "task.env_init.failed: Failed to initialize TiDB environment on remote host ‘10.xxx.xxx.xxx’, cause: task.env_init.sub_command_failed: Failed to create ‘~/.ssh’ directory for user ‘mychung’, cause: executor.ssh.execute_failed: Failed to execute command over SSH for ‘mychung@10.xxx.xxx.xxx:22’ {**ssh_stderr: Bad : modifier in $ (/).
**, ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin /usr/bin/sudo -H bash -c "su - mychung -c ‘mkdir -p ~/.ssh && chmod 700 ~/.ssh’"}, cause: Process exited with status 1\

Thanks!
Ming

https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup![image|690x485](upload://ceuc9w0t77yMDP3kRDAzU885kfZ.png)

csh allows variable substitution by the : modifiers ( in the form of $VAR:modifier), so the PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin command fails, because csh recognizes a modifier which is not valid.

However, the root cause is that tiup doesn’t support csh for now, maybe you have to install bash on each target to make tiup work well.

1 个赞

Thanks, buptzhoutian! I have the user account set default shell to bash and the installation procedure passed now.

:+1::+1::+1:

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。