Bug 1215203

Summary: [Build 20230910-1] openQA test fails in 'suseconnect -d' for update from sles 15-sp5
Product: [openSUSE] PUBLIC SUSE Linux Enterprise Server 15 SP5 Reporter: Zaoliang Luo <zluo>
Component: RegistrationAssignee: SCC Bugs <scc-bugs>
Status: NEW --- QA Contact: Hernan Schmidt <hschmidt>
Severity: Normal    
Priority: P3 - Medium CC: jpupava, tschmidt, zluo
Version: unspecifiedFlags: tschmidt: needinfo? (zluo)
Target Milestone: ---   
Hardware: x86-64   
OS: SLES 15   
URL: https://openqa.suse.de/tests/12077910/modules/suseconnect/steps/43
Whiteboard:
Found By: openQA Services Priority:
Business Priority: Blocker: Yes
Marketing QA Status: --- IT Deployment: ---
Attachments: SUSEConnect -d

Description Zaoliang Luo 2023-09-11 10:49:40 UTC
it seems that 'SUSEConnect -d' doesn't work if sle-we or sle-legacy not activated before on sle-15-sp5. it throws out Error code 422.

To compare with sle 15-sp6 I could reproduce this issue only one time:

--

zaoliang@localhost:~> sudo SUSEConnect -d
Deregistering system from registration proxy http://all-16.1.proxy.scc.suse.de

Deactivating sle-module-legacy 15.6 x86_64 ...
Error: Registration server returned 'Legacy Module is not yet activated on the system.' (422)

--
So please check this issue on scc server. What is the real reason for 422.
I think deregistering should work regardless extension got activated or not on a system.
 
## Observation

openQA test in scenario sle-15-SP5-Server-DVD-Updates-x86_64-mau-registration-stack@64bit fails in
[suseconnect](https://openqa.suse.de/tests/12077910/modules/suseconnect/steps/43)

## Test suite description
Testsuite maintained at https://gitlab.suse.de/qa-maintenance/qam-openqa-yml. Run console tests against aggregated test repo


## Reproducible

Fails since (at least) Build [20230910-1](https://openqa.suse.de/tests/12073758)


## Expected result

Last good: [20230909-1](https://openqa.suse.de/tests/12067108) (or more recent)


## Further details

Always latest result in this scenario: [latest](https://openqa.suse.de/tests/latest?arch=x86_64&distri=sle&flavor=Server-DVD-Updates&machine=64bit&test=mau-registration-stack&version=15-SP5)
Comment 1 Thomas Schmidt 2023-09-18 08:29:30 UTC
It seems your system has a package 'sle-module-legacy-release' installed, but did not activate this product with SCC, and by that is out of sync. 

Do you know why that package is installed?
Comment 2 Zaoliang Luo 2023-09-18 15:02:56 UTC
(In reply to Thomas Schmidt from comment #1)
> It seems your system has a package 'sle-module-legacy-release' installed,
> but did not activate this product with SCC, and by that is out of sync. 
> 
> Do you know why that package is installed?

Sorry, I am not sure about this package. It is a maintenance update scenarios.
Comment 3 Thomas Schmidt 2023-09-18 15:38:05 UTC
Please remove sle-module-legacy-release and sle-we-release then before de-registration.
Comment 4 Jozef Pupava 2023-10-05 13:25:21 UTC
Created attachment 869937 [details]
SUSEConnect -d

Today the registration is always failing on sle-module-server-applications, despite I did fresh registration before.
Comment 5 Thomas Schmidt 2023-10-05 16:40:53 UTC
Can I log in to this system? It seems to be in an inconsistent state.
Comment 6 Jozef Pupava 2023-10-23 10:55:56 UTC
(In reply to Thomas Schmidt from comment #5)
> Can I log in to this system? It seems to be in an inconsistent state.

Thomas, I'm trying to reproduce this issue, sometimes the registration is for some reason messed up. I will write to you when I have system with this inconsistent state.