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

Add support for new SLE15 system roles 'textmode' and 'minimal' #3718

Merged
merged 2 commits into from
Oct 17, 2017

Conversation

okurz
Copy link
Member

@okurz okurz commented Oct 16, 2017

Based on the existing test variable 'SYSTEM_ROLE' we can explicitly select the
new SLE15 system roles 'textmode' or 'minimal' as well as the existant ones.
As this also influences the initial bootup target the 'default_desktop' method
is updated accordingly.

Verification local, see screenshots:

textmode:
openqa_feature_system_role_textmode

minimal:
openqa_feature_system_role_minimal

Related SLE needles MR:
https://gitlab.suse.de/openqa/os-autoinst-needles-sles/merge_requests/527

Related progress issues:

Specify 'all-packages' in test variable 'ADDONS' to add default sles/sled
modules using the 'all-packages' medium specified in an ISO. Additional addons
specified comma-separated are still supported.

Verification run: local, see screenshot

SLE needles MR: https://gitlab.suse.de/openqa/os-autoinst-needles-sles/merge_requests/526

Related progress issue: https://progress.opensuse.org/issues/25456
Based on the existing test variable 'SYSTEM_ROLE' we can explicitly select the
new SLE15 system roles 'textmode' or 'minimal' as well as the existant ones.
As this also influences the initial bootup target the 'default_desktop' method
is updated accordingly.

Verification local, see screenshots.

Related SLE needles MR:
https://gitlab.suse.de/openqa/os-autoinst-needles-sles/merge_requests/527

Related progress issues:

* minimal: https://progress.opensuse.org/issues/26038
* textmode: https://progress.opensuse.org/issues/26042
@okurz
Copy link
Member Author

okurz commented Oct 16, 2017

Includes #3717 . If I would have needed to separate then there would be a conflicting line in main.pm. If you see a reason to split it, please tell me.

@okurz
Copy link
Member Author

okurz commented Oct 16, 2017

completed installation with "minimal" role:
openqa_feature_system_role_minimal_installation_completed

# are not preselected, to crosscheck or just recreate automatic selections
# manually
our %SLE15_DEFAULT_MODULES = (
sles => 'base,script,desktop,serverapp',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the script in here is actually a bug

Copy link
Member Author

@okurz okurz Oct 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really? which one?

but anyway:

  1. I am just moving the definition here, did not change it
  2. It's a bug anyway (which we track already) that the modules are not preselected, at least when registering against SCC and having a product selected

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will discuss this once scc shows the right default modules - no need to discuss this now :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that's what I'm thinking. Anyway I reported a bug about this. Also here we use the same list for the all-packages medium where we don't assume there are any modules pre-selected

# manually
our %SLE15_DEFAULT_MODULES = (
sles => 'base,script,desktop,serverapp',
sled => 'base,script,desktop'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks incomplete. It should contain at least productivity as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true but different story. For now I am just changing the scope of the variable.

@@ -92,6 +92,8 @@ sub default_desktop {
return 'gnome' if get_var('BASE_VERSION', '') =~ /^12/;
# In sle15 we add repos manually to make a workaround of missing SCC, gnome will be installed as default system.
return 'gnome' if get_var('ADDONURL', '') =~ /(desktop|server)/;
return 'textmode' if (get_var('SYSTEM_ROLE') && !check_var('SYSTEM_ROLE', 'default'));
return 'gnome' if check_var_array('ADDONS', 'all-packages');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is strange reasoning. If you use the packages DVD or not has no relevance to the default system role - only what modules you pick from it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is what is defined by 'ADDONS=all-packages'. ADDONS is a test variable so it is our decision within tests what we do with it. We could of course layer this on the second layer and select modules from the all packages medium based on the content of another variable but right now I don't see the need for it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if you could set SYSTEM_ROLE=default from within handle_all_packages_medium and depend on this variable only. The whole logic in here grows just too much - the ADDONURL match is already too much if you ask me.

But I'm just saying

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

problem is the test schedule evaluation so evaluating SYSTEM_ROLE within handle_all_packages_medium is too late to influence the schedule. I hear what you are saying but honestly I like the default_desktop method better than the previous approach of hiding the expected desktop somewhere spread.


use strict;
use base "y2logsstep";
use testapi;
use utils 'sle_version_at_least';


my %role_hotkey = (
default => 's', # sles with gnome
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, relying on hot keys on this screen sounds dangerous. One more system role and yast will reshuffle everything. For now we're lucky though as all system roles start with unique and unused letters :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, so what? I don't see a problem with that. When the roles change we want to update this. Now we need to update it. But otherwise we would have needles so everything is in vain … as is life ;)

@@ -29,7 +29,8 @@ our @EXPORT = qw(
registration_bootloader_params
yast_scc_registration
skip_registration
SLE15_MODULES
%SLE15_MODULES
%SLE15_DEFAULT_MODULES
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yxususe , @rwx788 I don't know why your previous changes worked but do you think this makes problems for suseconnect now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I guess it's correct way, as you've done it. But it works with both ways.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I can confirm both way worked.

@asmorodskyi asmorodskyi merged commit c73465e into os-autoinst:master Oct 17, 2017
@okurz okurz deleted the feature/new_system_roles branch October 17, 2017 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants