Project

General

Profile

Actions

Bug #33019

closed

Introduce a valid solution to fix the error "Katello::Errors::CandlepinError: Environment with id XXXX could not be found"

Added by Jonathon Turel about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
High
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

b'Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1951878 \n\n1. Proposed title of this feature request\n\nIntroduce a valid foreman-rake based solution to counter and fix the error "Katello::Errors::CandlepinError: Environment with id 5a6ac4b9ba58f37e93b155ec4eaa3e07 could not be found" \n\n\n2. What is the nature and description of the request?\n\nChange in code\\Inclusion of new code for the product is required to achieve the desired goal. \n\n\n3. Why does the customer need this? (List the business requirements here)\n\nTo avoid manual workaround and achieve a clean CV or CV version deletion without having any DB inconsistencies present.\n\n\n4. How would the customer like to achieve this? (List the functional requirements here)\n\nThe error "Katello::Errors::CandlepinError: Environment with id 5a6ac4b9ba58f37e93b155ec4eaa3e07 could not be found", usually can be seen when the Customer is trying to delete a CV and CV version and suddenly the task went to Paused state. \n\nAnd at the backend, 5a6ac4b9ba58f37e93b155ec4eaa3e07 environment-id will hopefully be missing from cp_environment and\\or cp2_environment_content table of candlepin DB due to which this error message pops up.\n\nIn 99% of the cases, we provide this solution or go on the remote session to do following :\n\n\t* Open the task\n\t* Open Dynflow COnsole\n\t* Skip the step with error related to "Environment with id 5a6ac4b9ba58f37e93b155ec4eaa3e07 could not be found"\n\t* Resume the task\n\nCustomers will not always be able to understand the instructions and we will end up connecting on a remote session to perform the same thing again.\n\nIn my opinion, we should not be doing this kind of manual hack as this leaves inconsistent information in Candlepin DB. So expectation here is to have a rake-based solution present, that can recreate the missing environment and then we can resume the task gracefully without needing to skip any steps from dynflow.\n\n\n\n5. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.\n- Create some inconsistency in Candlepin DB\n- Try to delete a CV or CV version to reproduce the error "Katello::Errors::CandlepinError: Environment with id 5a6ac4b9ba58f37e93b155ec4eaa3e07 could not be found"\n- At this stage the task will be in paused state.\n- Execute the foreman-rake command (or the solution prepared by Redhat) to fix the missing environment with id XXX in Candlepin DB\n- Resume the paused task and wait for it to get completed successfully.\n\n6. Is there already an existing RFE upstream or in Red Hat Bugzilla?\nNo.\n\n\n7. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?\n\nAs soon as possible\n\n\n8. Is the sales team involved in this request and do they have any additional input?\nNo.\n\n\n9. List any affected packages or components.\n- Katello \\ Candlepin \\ Postgres \\ Rake\n\n\n10. Would the customer be able to assist in testing this functionality if implemented?\n\nNA but Support folks can\n\n\n11. Additional information:\n\nSome additional information will be provided in the private comments'

Actions #1

Updated by Jonathon Turel about 3 years ago

  • Subject changed from b'Introduce a valid solution to fix the error "Katello::Errors::CandlepinError: Environment with id XXXX could not be found"' to Introduce a valid solution to fix the error "Katello::Errors::CandlepinError: Environment with id XXXX could not be found"
  • Target version set to Katello 4.2.0
Actions #2

Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9467 added
Actions #3

Updated by James Jeffers about 3 years ago

  • Triaged changed from No to Yes
Actions #4

Updated by The Foreman Bot about 3 years ago

  • Fixed in Releases Katello 4.3.0 added
Actions #5

Updated by Jonathon Turel about 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by Ewoud Kohl van Wijngaarden over 2 years ago

  • Has duplicate Bug #28004: katello-certs-check should set locales for $(date) commands added
Actions #7

Updated by Ewoud Kohl van Wijngaarden over 2 years ago

  • Has duplicate deleted (Bug #28004: katello-certs-check should set locales for $(date) commands)
Actions

Also available in: Atom PDF