Bug 1561662

Summary: zfcp.allow_lun_scan=0 is not carried forward to installed system
Product: Red Hat Enterprise Linux 7 Reporter: Jan Stodola <jstodola>
Component: anacondaAssignee: Vendula Poncova <vponcova>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact: Sharon Moroney <smoroney>
Priority: medium    
Version: 7.5CC: bugproxy, dhorak, hannsj_uhl, jkonecny, smoroney, vponcova
Target Milestone: rc   
Target Release: 7.6   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-21.48.22.140-1 Doc Type: Bug Fix
Doc Text:
Installation started with boot option "zfcp.allow_lun_scan" is applied to the installed system Previously, the boot option "zfcp.allow_lun_scan" was not applied to the installed system and as a result, the installed system started without the boot option. This update applies the boot option "zfcp.allow_lun_scan" to the installed system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 07:52:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1275658, 1477564, 1513404, 1557360    

Description Jan Stodola 2018-03-28 16:29:33 UTC
Description of problem:
When the installation on s390x is started with the zfcp.allow_lun_scan=0 kernel boot parameter, the parameter should be applied on the installed system as well. But it's not.

Version-Release number of selected component (if applicable):
RHEL-7.5
anaconda-21.48.22.134-1.el7

How reproducible:
always

Steps to Reproduce:
1. start the installation with the zfcp.allow_lun_scan=0 kernel parameter
2. finish the installation
3. check if the zfcp kernel module was loaded with the allow_lun_scan parameter disabled

Actual results:
# cat /sys/module/zfcp/parameters/allow_lun_scan
Y
#

Expected results:
# cat /sys/module/zfcp/parameters/allow_lun_scan 
N
#


Proposed patch:

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 1ef3941..0b81344 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -2132,7 +2132,7 @@ class ZIPL(BootLoader):
             return ["ext4", "ext3", "ext2", "xfs"]
 
     image_label_attr = "short_label"
-    preserve_args = ["cio_ignore", "rd.znet", "rd_ZNET"]
+    preserve_args = ["cio_ignore", "rd.znet", "rd_ZNET", "zfcp.allow_lun_scan"]
 
     def __init__(self):
         super(ZIPL, self).__init__()

Comment 1 Dan HorĂ¡k 2018-03-28 16:45:07 UTC
Thanks for the test, Jan. Same fix should go into Fedora. The question might be whether anaconda shouldn't preserve all parameters except those it uses for itself.

Comment 2 IBM Bug Proxy 2018-03-29 08:41:10 UTC
------- Comment From MAIER.com 2018-03-29 04:36 EDT-------
(In reply to comment #4)
> Description of problem:
> When the installation on s390x is started with the zfcp.allow_lun_scan=0
> kernel boot parameter, the parameter should be applied on the installed
> system as well. But it's not.
>
> Version-Release number of selected component (if applicable):
> RHEL-7.5
> anaconda-21.48.22.134-1.el7

> Proposed patch:
>
> diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
> index 1ef3941..0b81344 100644
> --- a/pyanaconda/bootloader.py
> +++ b/pyanaconda/bootloader.py
> @@ -2132,7 +2132,7 @@ class ZIPL(BootLoader):
> return ["ext4", "ext3", "ext2", "xfs"]
>
> image_label_attr = "short_label"
> -    preserve_args = ["cio_ignore", "rd.znet", "rd_ZNET"]
> +    preserve_args = ["cio_ignore", "rd.znet", "rd_ZNET",
> "zfcp.allow_lun_scan"]
>
> def __init__(self):
> super(ZIPL, self).__init__()
>
> Thanks for the test, Jan. Same fix should go into Fedora. The question might
> be whether anaconda shouldn't preserve all parameters except those it uses
> for itself.

+1 for Dan's suggestion. Zfcp has more options and there are enough other kernel parameters which a user likely expects to be carried over.
Also this would be consistent to how the kernel processes its cmdline by only consuming options it parsed and understood itself.

Comment 3 Vendula Poncova 2018-05-17 15:37:27 UTC
Fixed in a pull request: https://github.com/rhinstaller/anaconda/pull/1481

Comment 5 Jan Stodola 2018-07-04 15:15:52 UTC
zfcp.allow_lun_scan=0 is present on the kernel command line of the installed system if the parameter was present during the installation.
Tested with anaconda-21.48.22.143-2.el7, moving to VERIFIED.

Comment 10 errata-xmlrpc 2018-10-30 07:52:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3035