Closed tatsuya6502 closed 9 years ago
Fixed via https://github.com/hibari/clus/commit/9b805074a3e1a01d5393c756b400755669d48f91 on dev branch. Merged dev into master branch.
Now installer_user
is working as expected.
[worker@hibari-builder clus]$ echo $USER
worker
[worker@hibari-builder clus]$ ssh hibari@test0
Warning: Permanently added 'test0,10.1.54.22' (RSA) to the list of known hosts.
hibari@test0's password: ^C
[worker@hibari-builder clus]$ ./priv/clus.sh init hibari test0 clus
hibari@test0
[worker@hibari-builder clus]$ ssh hibari@test0
Last login: Sat Sep 26 15:28:50 2015 from 10.1.54.25
[hibari@test0 ~]$ logout
Connection to test0 closed.
[worker@hibari-builder clus]$ ./priv/clus.sh init hibari test0 clus
remote user 'hibari@test0' exists
run ./priv/clus.sh without any arguments for usage
[worker@hibari-builder clus]$ ./priv/clus.sh -f init hibari test0 clus
hibari@test0
[worker@hibari-builder clus]$ ./priv/clus.sh delete hibari test0 clus
-f option is required
run ./priv/clus.sh without any arguments for usage
[worker@hibari-builder clus]$ ./priv/clus.sh -f delete hibari test0 clus
[worker@hibari-builder clus]$ ssh hibari@test0
hibari@test0's password: ^C
[worker@hibari-builder clus]$
clus.sh
'sinit
anddelete
commands takes optional fourth parameterinstaller_user
, which, I believe, is used as the ssh login user to run remote commands. Howeverclush.sh
does not use it for ssh sessions even though it sets up$INSTALLER_USER
variable. For instance, it does$SSH $NODE_HOST '$SUDO true' || die ...
instead of$SSH $INSTALLER_USER@$NODE_HOST ...
As a result,
$USER
is always used as the ssh login user.