-
Notifications
You must be signed in to change notification settings - Fork 280
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
PC: Fixup ssh host key validation #20274
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
This is an automatically generated QA checklist based on modified files. |
e89237d
to
38f4060
Compare
38f4060
to
cdbd422
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes could impact HanaSR tests which add a -F none
to avoid using .ssh/config
. The overriding of ssh_opts
internal to the function could break the tests.
Added some HanaSR VRs to confirm: |
Please help to do a VR for |
HanaSR VRs passed. Cloned the saptune test (the one mentioned by @lilyeyes ) in https://openqaworker15.qa.suse.cz/tests/298412#live |
78732db
to
5854994
Compare
@alvarocarvajald @lilyeyes I miss those two variables:
|
Restarted jobs in https://openqaworker15.qa.suse.cz/tests/overview?build=VR4PR20274&distri=sle&version=15-SP5&groupid=41 and the saptune job (https://openqaworker15.qa.suse.cz/tests/298423) to verify latest changes. |
They are in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please give us time to add the new setting (PUBLIC_CLOUD_SSH_CONFIG) into the jobf before merging.
@@ -115,7 +115,7 @@ sub run_cmd { | |||
delete($args{timeout}); | |||
delete($args{runas}); | |||
|
|||
$self->{my_instance}->wait_for_ssh(timeout => $timeout); | |||
$self->{my_instance}->wait_for_ssh(timeout => $timeout, scan_ssh_host_key => 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea to put scan_ssh_host_key => 1
not to perturbate SAP tests? To let SAP test works exactly like before?
Could you explain what we should check to decide if we can omit scan_ssh_host_key
here too ?
lib/sles4sap_publiccloud_basetest.pm
Outdated
'-o', 'LogLevel=DEBUG3', | ||
'-o', 'PasswordAuthentication=no', | ||
#'-o', 'PasswordAuthentication=no', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand why exactly but only these two are commented. Why not all of them or none? Is this PR specifically about PasswordAuthentication
. -F
is
-F configfile
Specifies an alternative per-user configuration file. If a configuration file is given on the command line, the system-wide configuration file (/etc/ssh/ssh_config) will be ignored. The default for the per-user configuration file is ~/.ssh/config. If set to “none”, no configuration files will be read.
Is the idea here to force SAP tests to to use a ssh config file? Why is that? What we miss not doing that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You use Ansible. Ansible does care about the SSH config so without ssh config it's hard to make Ansible to f.e. not validate the ssh host key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got rid of this as it's now in the config file.
6b88be9
to
8addd30
Compare
@pdostal we were discussing in QE-SAP where to add the extra settings ( Do you think you can add it as part of this PR? And schedule a VR without setting |
8addd30
to
385fb21
Compare
@alvarocarvajald I've modified |
I'm running into this issue: https://pdostal-server.suse.cz/tests/7680#step/Verify_azure_fence_agent_MSI/91 |
saptune jobs should not use
Hmm. This is a HanaSR test, so schedule is OK. Failure seems to come from this output: https://pdostal-server.suse.cz/tests/7680#step/Verify_azure_fence_agent_MSI/89 It's actually expecting only the list of nodes, as in: https://pdostal-server.suse.cz/tests/7616#step/Verify_azure_fence_agent_MSI/89 So something changed in between these 2 runs and now the ssh command must be missing something like |
56d1dde
to
5330ce3
Compare
5330ce3
to
bde2966
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM to latest version
but I think it is necessary also to get LGTM's from Michele and/or Alvaro |
Thank you Alvaro. Now all verification runs on pdostal-server.suse.cz are green. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -8,6 +8,7 @@ vars: | |||
BOOT_HDD_IMAGE: '1' | |||
NODE_COUNT: '1' | |||
TEST_CONTEXT: 'OpenQA::Test::RunArgs' | |||
PUBLIC_CLOUD_SSH_CONFIG: 'publiccloud/ssh_config_sap' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh. I thought since saptune tests are using the SSH terminal connection/tunnel thingy, that this was not necessary here, but if it works, awesome!
This continues the SSH host key validation journey:
I propose
PUBLIC_CLOUD_SSH_CONFIG
variable so different test suites can have different SSH config. For QE-C we always validate the SSH host key but SAP not yet. The SSH host key needs to be fetched in those situations:cloud-init clean
is performed