-
Notifications
You must be signed in to change notification settings - Fork 267
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
Replace check_var ARCH ppc64le by get_var OFW #4477
Conversation
WARNING: I did not tried to test it yet ! |
problem initially detected on ppc64 (BE) tests failures with openSUSE snapshot 2018021 as reported by https://progress.opensuse.org/issues/32155 Assumption: OFW key defined in used templates for PowerPC arches (ppc64, ppc64le) which is the case for default opensuse templates (bot not for sle one <= potential TODO) === $find . -name templates -exec grep -Hn backend -A8 {} \; |grep -E 'backend|ppc64|OFW' |grep ppc64 -A100 products/opensuse/templates-2691- name => "ppc64le", products/opensuse/templates-2694- { key => "OFW", value => 1 }, products/opensuse/templates-2695- { key => "QEMU", value => "ppc64" }, products/opensuse/templates:2704: backend => "qemu", products/opensuse/templates-2705- name => "ppc64", products/opensuse/templates-2708- { key => "OFW", value => 1 }, products/opensuse/templates-2709- { key => "QEMU", value => "ppc64" }, products/opensuse/templates:2718: backend => "qemu", products/opensuse/templates-2719- name => "ppc64le-multipath", products/opensuse/templates-2723- { key => "OFW", value => 1 }, products/opensuse/templates-2724- { key => "QEMU", value => "ppc64" }, products/opensuse/templates:2733: backend => "qemu", products/opensuse/templates-2734- name => "ppc64-multipath", products/opensuse/templates-2738- { key => "OFW", value => 1 }, products/opensuse/templates-2739- { key => "QEMU", value => "ppc64" }, products/opensuse/templates:2748: backend => "qemu", === Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
looks like a good idea. Let's see if someone can help with testing. |
I am on the way to test it locally with same snapshot 20180221 ppc64 iso on my local openQA instance, at least first tests seems to work correctly. |
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.
Good idea. ;)
We have to look at this in more detail to detect where it is PPC related and OFW related.
@@ -333,7 +333,7 @@ sub workaround_type_encrypted_passphrase { | |||
return if get_var('UNENCRYPTED_BOOT'); | |||
return if !get_var('ENCRYPT') && !get_var('FULL_LVM_ENCRYPT'); | |||
# ppc64le on pre-storage-ng boot was part of encrypted LVM | |||
return if !get_var('FULL_LVM_ENCRYPT') && !is_storage_ng && !check_var('ARCH', 'ppc64le'); | |||
return if !get_var('FULL_LVM_ENCRYPT') && !is_storage_ng && !get_var('OFW'); |
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.
Here the check is about PPC having a proposed separated /boot partition.
AFAIK OFW and PPC are not always the same. So here would make more sense to have
return if !get_var('FULL_LVM_ENCRYPT') && !is_storage_ng && get_var('ARCH) !~ /^ppc/;
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.
As per products/opensuse/templates OFW is defined for ppc64 and ppc64le ARCH, so I consider the same for all the tests of this commit.
Why do you want to keep a difference between the two ?
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.
It is a coincidence that only our ppc machines have OFW. We could have another machines non-ppc which use OFW.
@@ -44,7 +44,7 @@ sub run { | |||
select_console 'root-console'; | |||
|
|||
# all but PPC64LE arch's vmlinux images are gzipped | |||
my $suffix = check_var('ARCH', 'ppc64le') ? '' : '.gz'; | |||
my $suffix = get_var('OFW') ? '' : '.gz'; |
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.
Here also seems to be unrelated to OFW, but about PPC specific
@@ -39,7 +39,7 @@ sub run { | |||
} | |||
# on ppc64le boot have to be confirmed with ctrl-x or F10 | |||
# and it doesn't have nice graphical menu with video and language options | |||
if (!check_var('ARCH', 'ppc64le')) { | |||
if (!get_var('OFW')) { |
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 adapt also the comment above to clarify that the "textmode" comes from OFW.
@@ -22,10 +22,10 @@ use version_utils 'is_storage_ng'; | |||
|
|||
sub run { | |||
create_new_partition_table; | |||
if (check_var('ARCH', 'ppc64le')) { # ppc64le always needs PReP boot | |||
if (get_var('OFW')) { # ppc64le always needs PReP boot |
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.
That's also PPC related, not OFW
@@ -24,7 +24,7 @@ sub run { | |||
if (check_var('ARCH', 's390x')) { # s390x need /boot/zipl on ext partition | |||
addpart(role => 'OS', size => 500, format => 'ext2', mount => '/boot'); | |||
} | |||
elsif (check_var('ARCH', 'ppc64le')) { # ppc64le need PReP /boot | |||
elsif (get_var('OFW')) { # ppc64le need PReP /boot |
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.
PPC related, not OFW
@@ -101,7 +101,7 @@ sub run { | |||
sles4sap => 'i', | |||
hpc => 'x' | |||
); | |||
$hotkey{sles4sap} = 'u' if check_var('ARCH', 'ppc64le'); | |||
$hotkey{sles4sap} = 'u' if get_var('OFW'); |
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.
PPC, not OFW
Because a different list of products are offered for PPC
well, the whole idea of this patch is that OFW is always there when ARCH starts with ppc - so your reviews are bit strange |
@coolo, for semantic. It would be like changing check_var('ARCH', 'aarch64') to check_var('UEFI', 1) |
Yeah, once we test sparc servers we might be in trouble - until then I prefer check_var('OFW' ) over regexp checks |
@coolo, @SergioAtSUSE so what should I do with this PR ?
|
Dismissing review. People is already aware that in the future we would need to review this checks, but accepting argument against regexp.
@michelmno, from my part I only need some verification runs, like RAID0 test. |
my local tests with this patch allow all Raid* tests to pass for ppc64 on snapshot 20180221. |
Waiting for verification run: http://copland.arch.suse.de/tests/911 |
worked |
problem initially detected on ppc64 (BE) tests failures with openSUSE snapshot 2018021 as reported by https://progress.opensuse.org/issues/32155 Assumption: OFW key defined in used templates for PowerPC arches (ppc64, ppc64le) which is the case for default opensuse templates (bot not for sle one <= potential TODO) === $find . -name templates -exec grep -Hn backend -A8 {} \; |grep -E 'backend|ppc64|OFW' |grep ppc64 -A100 products/opensuse/templates-2691- name => "ppc64le", products/opensuse/templates-2694- { key => "OFW", value => 1 }, products/opensuse/templates-2695- { key => "QEMU", value => "ppc64" }, products/opensuse/templates:2704: backend => "qemu", products/opensuse/templates-2705- name => "ppc64", products/opensuse/templates-2708- { key => "OFW", value => 1 }, products/opensuse/templates-2709- { key => "QEMU", value => "ppc64" }, products/opensuse/templates:2718: backend => "qemu", products/opensuse/templates-2719- name => "ppc64le-multipath", products/opensuse/templates-2723- { key => "OFW", value => 1 }, products/opensuse/templates-2724- { key => "QEMU", value => "ppc64" }, products/opensuse/templates:2733: backend => "qemu", products/opensuse/templates-2734- name => "ppc64-multipath", products/opensuse/templates-2738- { key => "OFW", value => 1 }, products/opensuse/templates-2739- { key => "QEMU", value => "ppc64" }, products/opensuse/templates:2748: backend => "qemu", === Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
IMHO this was a wrong direction: detecting ppc* with variable for It'd be great, if there was another variable for ARCH (not sure for name), which would have more general name than |
@pevik I agree with you that we should not "detect ppc* with OFW" but I do not think that we do. I think we are doing a good job to really handle OFW-specific behaviour based on that variable and we still look at ARCH (or maybe MACHINE) in other places. We can always use |
problem initially detected on ppc64 (BE) tests failures
with openSUSE snapshot 2018021 as reported by
https://progress.opensuse.org/issues/32155
(ppc64, ppc64le) which is the case for default opensuse templates
(bot not for sle one <= potential TODO)