Bug 2166317
| Summary: | initial-setup registration using activation_key fails with message 'Environment with ID "" could not be found' | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Jan Stavel <jstavel> | ||||
| Component: | subscription-manager | Assignee: | Pino Toscano <ptoscano> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 8.8 | CC: | ptoscano, redakkan, zpetrace | ||||
| Target Milestone: | rc | Keywords: | Regression, Triaged | ||||
| Target Release: | 8.8 | Flags: | pm-rhel:
mirror+
|
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | subscription-manager-1.28.36-1.el8 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2023-05-16 09:07:12 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 Stavel
2023-02-01 13:33:24 UTC
Hmm interesting, I don't think we did any changes related to environments recently.
Since you are running initial-setup from a console, can you please enable the debug of the HTTP traffic of subscription-manager?
# env SUBMAN_DEBUG_PRINT_REQUEST=1 \
SUBMAN_DEBUG_PRINT_REQUEST_HEADER=1 \
SUBMAN_DEBUG_PRINT_REQUEST_BODY=1 \
SUBMAN_DEBUG_PRINT_RESPONSE=1 \
/usr/libexec/initial-setup/initial-setup-graphical &> sub-man.log
(note it is a single command, it is wrapped for readability).
Then please send the resulting "sub-man.log" as it is, so we can check what's going on.
> "environments": [{"id": ""}]
We send an empty environment when registering, and after a bit of code inspection I'm not sure how it gets there.
I see you are registering to stage; can you please try the same with Hosted?
Also: my guess here is that this is a regression due to the multi-environment work that was added in RHEL 8.6 and in RHEL 9.x. Can you please check with: - RHEL 8.6 -- it will fail in the same way - RHEL 8.4 -- it should work fine I have verified no error appeared for RHEL-8.4.0-RC-1.3 the same error as above appeared for RHEL-8.6.0-RC-1.1 Indeed is a regression due to the multi-environments work, and how "if foo" behaves in Python with strings and lists. I have verified that the application works well: - it prints an error message instead of 'Oops' on the bar and getting stuck. I have mixed two bugs together - sorry for confusing audience. This bug has nothing with 'Oops' on a top bar. The fix I have verified solves a problem with a message 'Environment with ID "" could not be found'. This message does not appear after I apply the last appended fix. Verification done on SUBMAN version:
[zpetracek@localhost ~]$ subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 4.2.15-1
subscription management rules: 5.43
subscription-manager: 1.28.36-2.el8
verification PASSED, I'll add an attachment after successful registration using activationkey with auto attach enabled. Additional info:
[zpetracek@localhost ~]$ subscription-manager identity
system identity: 2abc26ed-5dfb-452d-bc73-62d03ec16035
name: localhost.localdomain
org name: 16767941
org ID: 16767941
[zpetracek@localhost ~]$ subscription-manager list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux for x86_64 Beta
Product ID: 486
Version: 8.8 Beta
Arch: x86_64
Status: Subscribed
Status Details:
Starts: 02/09/2023
Ends: 02/24/2023
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 (subscription-manager bug fix and enhancement update), 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/RHBA-2023:2984 |