Skip to content

Commit

Permalink
fix chsh hacluster in cluster init -N
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasyang2022 committed Oct 23, 2023
1 parent 462d1b8 commit cbe3b69
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crmsh/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,8 +887,7 @@ def init_ssh_impl(local_user: str, ssh_public_keys: typing.List[ssh_key.Key], us
for user, node in user_node_list:
user_by_host.add(user, node)
user_by_host.add(local_user, utils.this_node())
for user, node in user_node_list:
change_user_shell('hacluster', node)
user_by_host.save_local()
# Starting from here, ClusterShell is available
shell = sh.ClusterShell(local_shell, UserOfHost.instance())
authorized_key_manager = ssh_key.AuthorizedKeyManager(shell)
Expand All @@ -897,7 +896,9 @@ def init_ssh_impl(local_user: str, ssh_public_keys: typing.List[ssh_key.Key], us
[node for user, node in user_node_list],
'hacluster',
)
user_by_host.save_remote([node for user, node in user_node_list])
for user, node in user_node_list:
change_user_shell('hacluster', node)
user_by_host.save_remote([node for user, node in user_node_list])


def _init_ssh_on_remote_nodes(
Expand Down

0 comments on commit cbe3b69

Please sign in to comment.