-
Notifications
You must be signed in to change notification settings - Fork 282
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
Avoid die in check_takeover for uninitialized variables #18330
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
0e292c1
to
7b36f97
Compare
7b36f97
to
1173807
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
But in the VRs the |
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.
Avoid an exception if get_hana_topology return an empty result. It could happens if SAPHanaSR-showAttr is not succesful and output is not parsable. This new behavior is obtained avoiding the usage of local variables in check_takeover. Sleep 30 moved in a different position only to be used once for each get_hana_topology and not to be called when there's no more retry to run. Add some unit testing for these two functions.
1173807
to
18da85a
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
|
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
Avoid an exception if get_hana_topology return an empty result. It could happens if SAPHanaSR-showAttr is not successful and output is not what expected.
This new behavior is obtained avoiding the usage of local variables in check_takeover.
Sleep 30 moved in a different position only to be used once for each get_hana_topology and not to be called when there's no more retry to run.
Add some unit testing for these two functions.
Verification run:
sle-15-SP4-HanaSr-Azure-Byos-x86_64-Build15-SP4_2023-12-15T05:03:11Z-hanasr_azure_test_sapconf_spn@64bit
check_takeover
runs fine http://openqaworker15.qa.suse.cz/tests/273037#step/Crash_site_a-primary/96 but here http://openqaworker15.qa.suse.cz/tests/273037#step/Crash_site_b-primary/99 it is not okIt is because field
sync_state
is missing in SAPHanaSR-showAttr --format=scriptIt needs PR improvement: https://github.com/os-autoinst/os-autoinst-distri-opensuse/compare/117380726ba2dd7f10aa6c2a3078a08886185ed7..18da85a3f6ba7f6965c97064170154e325960242
sle-12-SP5-Azure-SAP-PAYG-Incidents-x86_64-Build:31892:nfs-utils-SAPHanaSR-ScaleUp-PerfOpt@az_Standard_E8s_v3
sudo zypper --no-gpg-checks ar -f -n TEST_0
due to locked zypper. Issue is not related to the PR content, but prevent code of interest to be reached.Test died: Test failed: takeover failed to complete
in case ofSignon CIB failed
. It is the right way to react to terminate an unsuccessful takeover