Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1985318

Summary: Introduce a valid solution to fix the error "Katello::Errors::CandlepinError: Environment with id XXXX could not be found" in Satellite 6
Product: Red Hat Satellite Reporter: James Jeffers <jjeffers>
Component: Content ViewsAssignee: Jonathon Turel <jturel>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: medium Docs Contact:
Priority: high    
Version: 6.8.0CC: ahumbe, jturel, mmccune, thadzhie, zhunting
Target Milestone: 6.9.5Keywords: PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.18.1.35-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1951878 Environment:
Last Closed: 2021-08-31 12:04:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Bryan Kearney 2021-07-27 16:05:39 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33019 has been resolved.

Comment 7 Lai 2021-08-05 18:22:59 UTC
Steps to retest:

1. Create a new LCE
2. Create a custom product with custom repo and sync
3. Create a cv and add the repo from step 2
4. Tail candlepin.log
5. Publish cv from 3 and do a promote
6. Confirm that new environment was created in log
7. Delete environment from rails console: Katello::Resources::Candlepin::Environment.destroy('<environment id from candlepin.log>')
8. Publish cv again and promote and see the environment is recreated in candlepin.log
9. Delete the environment again from Rails console (the new lce created from step 1)
10. Delete the LCE that you created in step 1 from UI as well.
11. Ensure that no error appear in candlepin.log


Expected result:
6) Should be able to see new environment being created in log
8) Should be able to see environment is created in log
11) Should not see any errors being raised in log

Actual:
6) Able to see new environment being created in log
8) Able to see environment being recreated in log
org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/environments/a281582d8bb77cb49caf517541472e74
11) There was no errors appearing in log after deleting environments on both rake console and the webUI

Verified in 6.9.5_01 with tfm-rubygem-katello-3.18.1.36-1.el7sat.noarch

Comment 12 errata-xmlrpc 2021-08-31 12:04:00 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 (Satellite 6.9.5 Async Bug Fix 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-2021:3387