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
Fix SLE15 installation version when SLE12 previously present #3936
Fix SLE15 installation version when SLE12 previously present #3936
Conversation
products/sle/main.pm
Outdated
@@ -686,6 +690,7 @@ sub load_inst_tests { | |||
loadtest "installation/user_settings"; | |||
} | |||
loadtest "installation/user_settings_root"; | |||
|
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.
please don't. I understand everyone has a different style preference but we should not change back and forth single lines
products/sle/main.pm
Outdated
@@ -553,6 +553,10 @@ sub install_this_version { | |||
} | |||
|
|||
sub load_inst_tests { | |||
|
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.
please delete
products/sle/main.pm
Outdated
@@ -553,6 +553,10 @@ sub install_this_version { | |||
} | |||
|
|||
sub load_inst_tests { | |||
|
|||
#Switch to TARGET_DEVELOPING_VERSION (for SLE-15 installation when SLE12-SPx is present in the same test) | |||
set_var('VERSION', get_var('TARGET_DEVELOPING_VERSION')) if get_var('TARGET_DEVELOPING_VERSION'); |
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.
This looks like a good idea but I think we should additionally set the reload_needles => 1
parameter and actually I guess it should be the other way around. For a SLE 15 test the version will be 15 and we can not trigger the test any different but of course we can set any other version as we like. Maybe "TARGET_DEVELOPING_VERSION" is not the right name here as it was introduced for virtualization tests where we start e.g. a SLE15 hypervisor but a SLE 12-SP1 machine. Also, we need to call this within test modules and not in the context of main.pm (but I am not sure on this one). I assume we need to set the version to 12-SP1 at the beginning of the test and set it back to 15 here again so two set_var
calls.
I am basically thinking out loud imagining something like this:
## main.pm
if (get_var('SSH_KEY_IMPORT')) {
loadtest 'other/switch_version';
loadtest 'boot/boot_to_desktop';
…
loadtest 'other/switch_version_back';
}
## other/switch_version.pm
sub run {
my $version_orig = get_required_var('VERSION');
set_var('VERSION_ORIG', $version_orig);
set_var('VERSION', get_var('VERSION_LAYERED') // $version_orig, reload_needles => 1);
## other/switch_version_back.pm
sub run {
set_var('VERSION', get_required_var('VERSION_ORIG'), reload_needles => 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.
I tried this solution, creating separated tests as you proposed, the problem is that the tty is only assigned at the beginning before any test is running (I tried to use the init method of this class to re-initialize but no luck with that) https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/susedistribution.pm#L302, so the only thing we can do is to change the version to the 'real' one to avoid conditional logic with the needles, but the initial one needs to be SLE-12, is a limitation of the framework until we can find some hack or a better solution in the api would be provided.
Verification is successful but if in the test was added something related with tty it will fail in the future, we need to be aware of that, but at least with VERSION set to a incorrect value, we can remember of this limitation.
http://dhcp227/tests/419#
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.
sorry, I don't think we want to try to set the version differently in openQA settings directly. However we can update the VERSION in the tests, e.g. in main.pm if we must. You could try that.
d0f29f5
to
cbfd036
Compare
In subject line of PR s/previosly/previously/ and also write "installation" in lower case |
cbfd036
to
77ea145
Compare
77ea145
to
8a14276
Compare
I understand your concerns about changing the version on the settings. I have a cleaner solution which does not involve to change the version at all, just need to add one flag VERSION_LAYERED=1 to solve the problem that we have with this two jobs. Anyway there was no problem with needles when we stamp SLE-15 from the beginning (except the missing needles contained in this PR needed because the original error was hiding it). These are the result of the testing: |
That looks better :) |
Fix sle version on SLE15 Installation with previous SLE12 installed. We need to change sle version at the middle of the test, due to two products are being under test.
We also need the following parameters added to jobs gnome+do_not_import_ssh_keys & gnome+import_ssh_keys to make it work:
SCC_REGISTER=installation
VERSION=12-SP1
VERSION_ACTUAL=15