Bug 2006827

Summary: Run 'subscription-manager clean' when force=true
Product: Red Hat Satellite Reporter: Leos Stejskal <lstejska>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: lstejska, zhunting
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-2.5.2.12-1,foreman-2.5.2.13-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:13:51 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: 1995279    

Description Leos Stejskal 2021-09-22 13:45:16 UTC
Description of problem:
Registration of CentOS 8 & RHEL 8 hosts that are already subscribed to another instance (or to cloud) fails with following error:
```
Unregistering from: satellite.example.com
Unable to verify server's identity: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:897)
```

Version-Release number of selected component (if applicable):
6.10

How reproducible:
* CentOS 8 and RHEL 8 only that are already subscribed somewhere else

Steps to Reproduce:
1. Try to register already subscribed CentOS 8 / RHEL 8 machine


Actual results:
Registration fails with error:
```
Unregistering from: satellite.example.com
Unable to verify server's identity: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:897)
```

Expected results:
Machine successfully registered.

Additional info:
Registration template should run `subscription-manager clean` command when `--force` parameter is `true`

Comment 1 Leos Stejskal 2021-09-22 13:47:12 UTC
Created redmine issue https://projects.theforeman.org/issues/33540 from this bug

Comment 8 errata-xmlrpc 2021-11-16 14:13:51 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 (Moderate: Satellite 6.10 Release), 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/RHSA-2021:4702