Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][SUSE 15SP7 support] [main branch] ssh to sap systems failed on 'Failed to connect to the host via ssh' #3

Open
lilyeyes opened this issue Mar 6, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@lilyeyes
Copy link

lilyeyes commented Mar 6, 2025

Describe the bug
I tried main branch to test sles15 SP7 BYOS images, playbook deploy/ansible/pb_get-sshkey.yaml passed but the ansible command failed with Failed to connect to the host via ssh, same ansible command passes if using version v3.13.0.1.

It might not be an issue of pb_get-sshkey.yaml but other setup steps (like terraform create ssh key) in front of pb_get-sshkey.yaml.

To reproduce
Steps to reproduce the behavior:

  1. deploy sap systems with sles15 SP7 BYOS image
  2. run deploy/ansible/pb_get-sshkey.yaml and passes
  3. execute ansible QES_DB --private-key=/xxx/sshkey --inventory=QES_hosts.yaml -vvv --module-name=shell --args="sudo registercloudguest -r xxx"
  4. See error
<192.168.59.212> (1, b'\r\n{"changed": true, "stdout": "", "stderr": "", "rc": 1, 
"cmd": "sudo registercloudguest -r xxx", 
"start": "2025-03-05 10:46:34.695321", "end": "2025-03-05 10:49:22.734894", 
"delta": "0:02:48.039573", "failed": true, 
"msg": "non-zero return code", 
"invocation": {"module_args": {"_raw_params": "sudo registercloudguest -r xxx", 
"_uses_shell": true, "warn": false, "stdin_add_newline": true,
"strip_empty_ends": true, "argv": null, "chdir": null,
"executable": null, "creates": null, "removes": null, "stdin": null}}}\r\n', 
b'Shared connection to 192.168.59.212 closed.\r\n')
<192.168.59.212> Failed to connect to the host via ssh: Shared connection to 192.168.59.212 closed.
<192.168.59.212> ESTABLISH SSH CONNECTION FOR USER: azureadm
<192.168.59.212> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 
'IdentityFile="/tmp/Azure_SAP_Automated_Deployment_16961599/WORKSPACES/SYSTEM/PRD-WEEU-16961599-QES/sshkey"' 
-o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o 'User="azureadm"' -o ConnectTimeout=10 
-o 'ControlPath="/home/azureadm/.ansible/cp/7b040e626f"' 
192.168.59.212 '/bin/sh -c '"'"'rm -f -r 
/home/azureadm/.ansible/tmp/ansible-tmp-1741171594.2200086-6955-431860060177/ 
> /dev/null 2>&1 && sleep 0'"'"''
<192.168.59.212> (0, b'', b'')
[WARNING]: Platform linux on host qesdhdb01l1aa is using the discovered Python interpreter at /usr/bin/python3.6, 
but future installation of another Python interpreter could change the meaning of that path. 
See https://docs.ansible.com/ansible-core/2.11/reference_appendices/interpreter_discovery.html for more information.
qesdhdb01l1aa | FAILED | rc=1 >>
non-zero return code

Expected behavior
Command ssh should be succeeded after pb_get-sshkey.yaml passed.

Additional context
Please let me know if you want more inputs

@lilyeyes lilyeyes added the bug Something isn't working label Mar 6, 2025
@lilyeyes
Copy link
Author

lilyeyes commented Mar 6, 2025

Btw, though "v3.13.0.1" can make ssh to sap systems pass but this version does not support sle 15SP7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant