Bug 2255276

Summary: Client system registration with Capsule fails with a error message.
Product: Red Hat Satellite Reporter: Mohit Kushwah <mkushwah>
Component: Hosts - ContentAssignee: Jeremy Lenz <jlenz>
Status: CLOSED MIGRATED QA Contact: visawant
Severity: high Docs Contact:
Priority: high    
Version: 6.15.0CC: ahumbe, iballou, jlenz, lstejska, nalfassi, rlavi, visawant, zhunting
Target Milestone: streamKeywords: MigratedToJIRA, 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:
: 2280231 (view as bug list) Environment:
Last Closed: 2024-06-06 16:39:02 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:

Description Mohit Kushwah 2023-12-19 20:13:28 UTC
Description of problem:

Registration of the client system with Capsule is successful with the below message:

~~~
The system has been registered with ID: 9c0f3d6e-e60f-4950-913b-a5cfe6b452d7
The registered system name is: client.example.com
HTTP error code 422: Validation failed: Content view environment content facets is invalid
~~~



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

Red Hat Satellite 6.15



How reproducible:

100%



Steps to Reproduce:
1. Register client system with Capsule with curl command generated on Satellite.
2.
3.



Actual results:

Client system registered but showing the below error:

~~~
The system has been registered with ID: 9c0f3d6e-e60f-4950-913b-a5cfe6b452d7
The registered system name is: client.example.com
HTTP error code 422: Validation failed: Content view environment content facets is invalid
~~~



Expected results:

The client system should register without error messages.

Comment 1 Leos Stejskal 2024-01-08 17:45:44 UTC
Hi,
we will need more information. Can you please add the following info:

* Command you used for the registration,
* DEBUG logs with the errors
* (if possible) site where we can reproduce the issue

Thank you

Comment 2 Leos Stejskal 2024-01-08 17:46:31 UTC
Also one question, is this a regression from the previous release or you can reproduce it only on 6.15?

Comment 4 Leos Stejskal 2024-01-17 13:26:14 UTC
Hi, I see that you run the command with ignore_errors=true, can I ask why? The field is there for the older versions of the subscription manager, if you use it you take full responsibility for the follow-up misbehavior in the registration process.

What's happening when you don't run it without ignore_errors?

Comment 5 nalfassi 2024-01-17 13:55:45 UTC
(In reply to Leos Stejskal from comment #4)
> Hi, I see that you run the command with ignore_errors=true, can I ask why?
> The field is there for the older versions of the subscription manager, if
> you use it you take full responsibility for the follow-up misbehavior in the
> registration process.
> 
> What's happening when you don't run it without ignore_errors?

In that case, the registration won't be complete, and it will exit after encountering the first error (HTTP error (422 - Unknown): Validation failed: Content view environment content facets are invalid).

Comment 7 Leos Stejskal 2024-01-17 14:37:24 UTC
I was able to reproduce the issue as well, with following error:

> rhsm.connection.RestlibException: HTTP error (422 - Unknown): Validation failed: Content view environment content facets is invalid

Moving to the Content component, IMO this is not related to the registration.

Comment 8 Mohit Kushwah 2024-01-18 12:37:29 UTC
Hi,

Thanks, Leos and Nofar,

I selected options to reproduce. I can see some updates that you can reproduce. Let me know if still any details are required.

Comment 9 Jeremy Lenz 2024-01-18 13:57:32 UTC
This seems related to the error we added which disallows you from assigning a host to a lifecycle environment that is not synced on the host's capsule. If the lifecycle environment is indeed not synced to the capsule, this error would be expected (but we should still try to expose better wording so that you know that this is what the issue is.)

Comment 11 Jeremy Lenz 2024-01-18 14:52:14 UTC
Hi Mohit,

Does this issue happen (a) only when the host's lifecycle environment is not synced to the Capsule at time of registration?

Or (b) does it ever happen even when the host's lifecycle environment is properly synced?

Comment 12 Mohit Kushwah 2024-01-22 04:51:48 UTC
Hi Jeremy,

Thanks for checking.

It is (a)
I only observed this issue only when the host's lifecycle environment is not synced to the Capsule at time of registration.


Regards,
Mohit Kushwah

Comment 13 Jeremy Lenz 2024-01-22 14:54:31 UTC
Changed title per https://bugzilla.redhat.com/show_bug.cgi?id=2255276#c5

Comment 16 Ian Ballou 2024-05-06 17:05:07 UTC
This commit might fix the issue: https://github.com/Katello/katello/commit/a1c864acdde85deaff5b22e131086cff5e3ffb4a

Comment 19 Eric Helms 2024-06-06 16:39:02 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.