Bug ID 1209162
Summary yast2-s390: wrong management if DIAG in some situations
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware S/390
OS openSUSE Tumbleweed
Status NEW
Severity Normal
Priority P5 - None
Component YaST2
Assignee yast2-maintainers@suse.de
Reporter ancor@suse.com
QA Contact jsrain@suse.com
Found By ---
Blocker ---

Disclaimer: I found this bug by reading the source code of yast2-s390.
Unfortunately I don't have access to an s/390 system with DIAG-capable devices,
so I cannot confirm any of my observations or assertions.

First of all, let's take a look to how the options "Set DIAG On" and "Set DIAG
off" work in yast2-s390. I find the behavior very weird, but I can confirm by
reading the code that it's indeed intentional.

1) When the value of the DIAG flag is changed in YaST for an enabled device,
the change is done immediately. That implies disabling the device and enabling
it again with the new value.

2) When the flag is changed for a disabled device, the new desired value is
stored by YaST in memory but not written to the system configuration. The
change will only have effect if the device is enabled afterwards via YaST
during the same YaST execution (the change is lost if YaST quits without ever
enabling the device).

3) In the UI, DIAG is always displayed as 'no' for disabled devices. For
enabled devices the correct/current value is displayed.

And now, let me describe the bug which I believe was introduced in this change
(remember I diagnosed the problem by reading the code, with no empirical
confirmation): https://github.com/yast/yast-s390/pull/93

I believe that now YaST forgets the desired value of the DIAG flag for disabled
DASDs in some situation. Let me illustrate it with two possible scenarios.

Scenario a)
When YaST starts, a given DASD is already enabled and with DIAG=1
YaST is used to disable it
YaST is used to enable it again
Before the mentioned change (eg. Leap 15.3) the device is enabled with DIAG=1
After the change (eg. Leap 15.4) it's enabled with DIAG=0

Scenario b)
When YaST starts, there is a disabled DASD
YaST is used to "Set Diag On"
The, YaST is used to enable the device
Before the change (eg. Leap 15.3), the device is enabled with DIAG=1
After the change (eg. Leap 15.4), it's enabled with DIAG=0

I believe the root of the evil resides in two things:

- The attribute Dasd#diag_wanted is not properly initialized
- The mentioned attribute is reset to nil after every operation


You are receiving this mail because: