Bug 1717006
| Summary: | `subscription-manager register --force ...` complains "HTTP error (422 - Unknown): Please unregister or remove hosts which match this host before registering: ..." | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Jan Hutař <jhutar> | ||||
| Component: | Registration | Assignee: | satellite6-bugs <satellite6-bugs> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Stephen Wadeley <swadeley> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.6.0 | CC: | cdonnell, jturel, pgagne, rjerrido | ||||
| Target Milestone: | Unspecified | Keywords: | Regression, Triaged | ||||
| Target Release: | Unused | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2019-07-22 21:05:58 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: | |||||||
| Attachments: |
|
||||||
|
Description
Jan Hutař
2019-06-04 14:17:04 UTC
Moving to Satellite, because when I remove the host on Satellite UI, then register it (with same command) and attempt to register it again (so it exists in Satellite), it works. Looks like Satellite is somehow blocking host deletion when it was created with hammer? Created attachment 1577148 [details]
Relevant part of production.log
I think a discussion should be had as to what the expected behavior should be here? Two options [1] Passing --force shouldn't delete a host entry [2] Passing --force should delete or reuse a host entry. The behavior (as I understand), used to be [2], and now we made an explicit change (see comments #8 & #9) to change it to [1]. So this isn't a regression. However, we can deliver the error message more cleanly than a traceback. Hey Jan & Rich, The '--force' flag in subscription-manager is interesting in that it doesn't actually send force=true/false to the satellite server. Only subscription-manager itself cares about --force and it's used to check whether the client already has a valid identity cert *locally* which indicates it was not unregistered properly and/or fully before another register attempt was made. Just wanted to clarify on what the flag actually does. Rich, you're right that we've moved from [2] to [1] but it doesn't necessarily hinge on --force based on the above explanation. As far as the stack trace - that's from the rhsm.log so I think it's OK and only the error message itself is shown when using subman. I don't think this is a bug, but let me know if I missed anything or can clarify more. Thanks In docs, it says simply: # subscription-manager register --help | grep force --force register the system even if it is already registered # rpm -q subscription-manager subscription-manager-1.21.10-3.el7_6.x86_64 Jan, I agree that the documentation for the flag is a little ambiguous & could be improved. Something like 'attempt to register the system even if it already has a local identity certificate' Hello Re comment 14 Bug 1731109 - Fix man page & help for --force option *** Bug 1730883 has been marked as a duplicate of this bug. *** This bugzilla was opened first; however, there is another bugzilla was raised and has had some additional investigation associated with it. Since that bug has an updated redmine, I am going to close this one as a duplicate. If there are any concerns, please feel free to reopen with appropriate details. *** This bug has been marked as a duplicate of bug 1730146 *** |