Bug 1220563

Summary: [WSL 15-SP6 Build 2.251] SLED license screen not showing up
Product: [openSUSE] PUBLIC SUSE Linux Enterprise Server 15 SP6 Reporter: Pablo Herranz Ramírez <pablo.herranz>
Component: YaST2Assignee: E-mail List <yast2-maintainers>
Status: RESOLVED INVALID QA Contact:
Severity: Normal    
Priority: P2 - High CC: felix.niederwanger, jcheung, jreidinger, lubos.kocman, pablo.herranz, rtsvetkov, sle-ms, swayammitra.tripathy
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://openqa.suse.de/tests/13626581/modules/firstrun/steps/24
Whiteboard:
Found By: openQA Services Priority:
Business Priority: Blocker: Yes
Marketing QA Status: --- IT Deployment: ---
Attachments: YaST2 logs for build 2.257
YaST2 logs for build 2.290

Description Pablo Herranz Ramírez 2024-02-28 13:07:06 UTC
## Observation

openQA test in scenario sle-15-SP6-Windows 10 BIOS-x86_64-wsl2-main+sled@win10_64bit fails in
[firstrun](https://openqa.suse.de/tests/13626581/modules/firstrun/steps/24)

## Test suite description
Basic WSL test Test scope:
    1) Prepare WSL and other features in Windows
    2) Download the image
    3) Import embedded certificate from the image
    4) Load image
    5) Define users
    6) Register SUT
    7) Exit WSL



## Reproducible

Fails since (at least) Build [2.138](https://openqa.suse.de/tests/13112597)


## Expected result

Last good: (unknown) (or more recent)


## Further details

Always latest result in this scenario: [latest](https://openqa.suse.de/tests/latest?arch=x86_64&distri=sle&flavor=Windows+10+BIOS&machine=win10_64bit&test=wsl2-main%2Bsled&version=15-SP6)



A license screen should appear when choosing the SLED extension to install.
Comment 1 Pablo Herranz Ramírez 2024-03-04 09:16:37 UTC
No movement since the ticket was opened.

Adding Lubos Kocman to CC.
Comment 2 Josef Reidinger 2024-03-08 17:03:44 UTC
I think it is caused by having beta license which is identical for SLES and SLED extension ( it differs later for final license ). To confirm it I will need yast logs which I do not see attached to that openqa tests.
Comment 3 Radoslav Tzvetkov 2024-03-18 10:47:25 UTC
Any update here? What is the ETA for this?
Comment 4 Pablo Herranz Ramírez 2024-03-25 10:41:03 UTC
Created attachment 873778 [details]
YaST2 logs for build 2.257
Comment 5 Pablo Herranz Ramírez 2024-03-25 10:41:28 UTC
Hello, I've tried to re-run the test in a failing build (2.257) and suddenly the license screen for SLEWE is appearing:
https://openqa.suse.de/tests/13858154#step/firstrun/21

Also in latest build (2.290) is showing up too:
https://openqa.suse.de/tests/13858155#step/firstrun/21

Not sure what has changed, as the screen wasn't present in previous 2.257 builds:
https://openqa.suse.de/tests/13742363#step/firstrun/21

Attached you will find the `save_y2logs` for both runs, although I'm affraid I cannot get the failed ones for being an old run.
Comment 6 Pablo Herranz Ramírez 2024-03-25 10:41:48 UTC
Created attachment 873779 [details]
YaST2 logs for build 2.290
Comment 7 Radoslav Tzvetkov 2024-04-02 10:09:49 UTC
Please indicate the current expectation for fixing the bug using the Target Milestone field. What do we believe is possible? 

In the cases where we do not plan to deliver or cannot guess (!?) please do not enter anything, but you can comment if you wish to provide more details.
Comment 8 Radoslav Tzvetkov 2024-04-03 12:08:15 UTC
Lubos can you give any ETA here?
Comment 9 Lubos Kocman 2024-04-04 12:35:46 UTC
I suppose this is a forgotten step in the https://jira.suse.com/browse/PED-1380

The tool is implemented by YaST so moving to YaST team. 

We only *really* need this with GM though. We don't publish earlier images.
Comment 10 Stefan Hundhammer 2024-04-04 12:39:10 UTC
The policy for those license has always been to show them only once if they are word-by-word identical. Has this now changed?

If not, did anybody check if the allegedly missing license is indeed different from a previous one that the user already confirmed?
Comment 11 Stefan Hundhammer 2024-04-04 12:58:16 UTC
In the failed case, I see a Beta license here (in the firstboot workflow, as expected):

https://openqa.suse.de/tests/13626581#step/firstrun/9

We can clearly see that this is a Beta license. As Josef wrote in comment #2, the other license that is reported as missing here, is almost certainly also a Beta license, word by word identical to this one. In that case, the user won't be prompted for it a second time. This is actually a feature.

How about the latest test? Was that also a Beta license? Since the product is not released yet, very likely yes.
Comment 12 Stefan Hundhammer 2024-04-04 13:04:52 UTC
Please check in the installed product at

  /usr/share/licenses/product

I have one subdirectory base/ there. If there are multiple products installed, there might be multiple subdirectories for each one.
Comment 13 Stefan Hundhammer 2024-04-04 13:10:51 UTC
From the last y2logs:

10:05:04 <1> [Ruby] modules/ProductLicense.rb
  (block in AllLicensesAccepted):1657 
  License eula_/usr/share/licenses/product/base/
  accepted: true
Comment 14 Stefan Hundhammer 2024-04-04 13:26:58 UTC
> 10:05:00 <1> [Ruby] modules/ProductLicense.rb(DisplayLicenseDialogWithTitle):687 Displayable languages: ["", "cs", "de", "es", "fr", "it", "pt_BR", "ru"], wanted: 
> 10:05:00 <1> [Ruby] modules/ProductLicense.rb(WhichLicenceFile):948 Using license file: /usr/share/licenses/product/base//license.txt
> 10:05:01 <1> [Ruby] modules/ProductLicense.rb(block in HandleLicenseDialogRet):578 User ret: next
> 10:05:01 <1> [Ruby] modules/ProductLicense.rb(block in AllLicensesAccepted):1657 License eula_/usr/share/licenses/product/base/ accepted: false
> 10:05:01 <1> [ui] YPushButton.cc(setFunctionKey):202 Guessing button role YOKButton for YPushButton "OK" at 0x7f0af00b2860 from function key F10
> 10:05:03 <1> [Ruby] modules/ProductLicense.rb(block in HandleLicenseDialogRet):578 User ret: eula_/usr/share/licenses/product/base/
> 10:05:04 <1> [Ruby] modules/ProductLicense.rb(block in HandleLicenseDialogRet):578 User ret: next
> 10:05:04 <1> [Ruby] modules/ProductLicense.rb(block in AllLicensesAccepted):1657 License eula_/usr/share/licenses/product/base/ accepted: true
> 10:05:04 <1> [Ruby] modules/ProductLicense.rb(block in HandleLicenseDialogRet):603 All licenses have been accepted.
Comment 15 Stefan Hundhammer 2024-04-04 13:29:37 UTC
45 seconds later:

> 10:05:51 <1> [Ruby] modules/ProductLicense.rb(WhichLicenceFile):948 Using license file: /tmp/extension-eula-20240325-707-19xyasa/license.txt
> 10:05:51 <1> [Ruby] modules/ProductLicense.rb(WhichLicenceFile):948 Using license file: /tmp/extension-eula-20240325-707-19xyasa/license.txt
> 10:05:51 <1> [Ruby] modules/ProductLicense.rb(update_license_location):780 Updating license URL: http://openqa.suse.de/assets/repo/SLE-15-SP6-Product-WE-POOL-x86_64-Build67.1-Media1.license/license.txt
> 10:05:53 <1> [Ruby] modules/ProductLicense.rb(block in HandleLicenseDialogRet):578 User ret: next
> 10:05:53 <1> [Ruby] modules/ProductLicense.rb(block in AllLicensesAccepted):1657 License eula_SUSE Linux Enterprise Workstation Extension 15 SP6 x86_64 (BETA) extension EULA accepted: false
> 10:05:53 <1> [ui] YPushButton.cc(setFunctionKey):202 Guessing button role YOKButton for YPushButton "Yes" at 0x7f0af00b4080 from function key F10
> 10:05:53 <1> [ui] YPushButton.cc(setFunctionKey):202 Guessing button role YCancelButton for YPushButton "No" at 0x7f0af00b7c50 from function key F9
> 10:05:55 <1> [Ruby] modules/ProductLicense.rb(block in HandleLicenseDialogRet):578 User ret: eula_SUSE Linux Enterprise Workstation Extension 15 SP6 x86_64 (BETA) extension EULA
> 10:05:55 <1> [Ruby] modules/ProductLicense.rb(block in HandleLicenseDialogRet):578 User ret: next
> 10:05:55 <1> [Ruby] modules/ProductLicense.rb(block in AllLicensesAccepted):1657 License eula_SUSE Linux Enterprise Workstation Extension 15 SP6 x86_64 (BETA) extension EULA accepted: true
> 10:05:55 <1> [Ruby] modules/ProductLicense.rb(block in HandleLicenseDialogRet):603 All licenses have been accepted.
Comment 16 Stefan Hundhammer 2024-04-04 13:38:45 UTC
And that license here that was used by that extension was this one (as shown in the URL from the third line of the y2log snippet in comment #15):

https://openqa.suse.de/assets/repo/SLE-15-SP6-Product-WE-POOL-x86_64-Build67.1-Media1.license/license.txt

>. SUSE(R) End User License Agreement for Beta Software
>. 
>. PLEASE READ THIS BETA AGREEMENT CAREFULLY.  BY INSTALLING, 
>. DOWNLOADING OR OTHERWISE USING THE SOFTWARE, YOU AGREE TO THE TERMS 
>. OF THIS BETA AGREEMENT AND ANY SUPPLEMENTAL SUSE LICENSE AGREEMENT 
>. INCLUDED WITH THE SOFTWARE.  IF YOU DO NOT AGREE WITH THESE TERMS, 
>. DO NOT DOWNLOAD, INSTALL OR USE THE SOFTWARE.  THE SOFTWARE MAY NOT 
>. BE SOLD, TRANSFERRED, OR FURTHER DISTRIBUTED WITHOUT PRIOR WRITTEN 
>. AUTHORIZATION FROM SUSE.
>. 
>. This SUSE End User License Agreement for Beta Software ("Beta 
>. Agreement") together with any Supplemental SUSE License Agreement 
>. included with the Software constitutes a legal agreement between You 
>. (an entity or a person) and SUSE LLC ("SUSE").
>. ...
>. ...


...which is the exact same as our usual Beta license; which the user already confirmed.

Maybe try modifying that text in your test setup at least a little bit for each different product; otherwise you'll raise a false alarm again and again.
Comment 17 Lukas Ocilka 2024-04-04 13:45:49 UTC
See bug #305503 for details
Comment 18 Pablo Herranz Ramírez 2024-04-08 08:18:27 UTC
From the QE point of view, we will need some clarification on WHEN to expect the SLEWE license or not. We do not demand to add it, remove it or change it, just to know the conditions under which it will appear to be prepared for it.

The test is automated and the screen was not showing here, which caused the test to fail:
Build 2.257 --> https://openqa.suse.de/tests/13742364

But it started to show up from this build and on:
Build 2.289 --> https://openqa.suse.de/tests/13839329
Comment 19 Stefan Hundhammer 2024-04-23 08:47:04 UTC
Well, that *is* clarified, as I explained above: Licenses are displayed unless the user already confirmed that exact same (word-by-word) license before.

Since you have your own specific test setup, you could simply add one line with the exact product name to each of the licenses; then they would be different, which would make sure that they are not suppressed as "user confirmed it before".