Bug 1490850
Summary: | [RFE] Need a way to mark a build as failed | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Ian Tewksbury <itewksbu> |
Component: | Provisioning | Assignee: | Lukas Zapletal <lzap> |
Status: | CLOSED ERRATA | QA Contact: | Roman Plevka <rplevka> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.2.11 | CC: | bkearney, dvoss, egolov, inecas, itewksbu, lzap, mhulan, pcreech |
Target Milestone: | 6.6.0 | Keywords: | FutureFeature, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | foreman-1.22.0-0 | Doc Type: | Enhancement |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-10-22 12:46:42 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
Ian Tewksbury
2017-09-12 11:33:30 UTC
Given we supported such an API, how the kickstart template would look like? How about using the same approach as for "built"? We can add another type to foreman_url macro. Otoh I can imagine proxy could use the same API to provide more info about the provisioning progress. @Ivan, What @Marek said. Basically do some sort of error checking in the template, and then if in error state call new API to mark the build failed. An example maybe, from real world client, kickstart is attempting to install puppet, but puppet package not available because there is an entitlement issue. So kickstart could first check to see if system is entitled correctly, and/or required package is available, and if not then call mark build in error API. Right now what happens is if some issue happens during kickstart then the build just stays in building forever, or worse case, doesn't even notice an error occurred and still marks the build complete. In this case the client has had to develop a secondary script to run to make sure the kickstart actually did what it was supposed to. Created redmine issue http://projects.theforeman.org/issues/21007 from this bug Ok, so something like `foreman_url('built', 'fail', :message => "Failed installing puppet")` would do the trick, right? @Ivan, That would be amazing. Yup, I'd just user different endpoint, not built. @Marek: what do you have it mind. Let's capture it before we all forget :) I'd prefer having generic status update API endpoint, so the template would look like this > foreman_url('build_status_update', 'fail', :message => "Failed installing puppet") so it could be used from other places too, e.g. > foreman_url('build_status_update', 'post_tasks_started', :message => "Entered the %post section of a kickstart") > foreman_url('built') would still exist and would be used to flip the build flag, as part of which we'd also set the build status to success. Sounds awesome to me. Upstream bug assigned to lzap Upstream bug assigned to lzap Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21007 has been resolved. Lukas, looks like the attached foreman issue still has an open pr? Hiya all. Just checking in to see if there's been any progress on this? Got a couple of customers still anticipating this BZ to be released. Please, provide some verification steps. IS there any documentation whatsoever? Is this also supposed to handle pxe-handoff failures? Which stages are being reported? VERIFIED sat6.6.0 snap 14 - the verification steps were consulted with mhulan IRL (cancelling needinfo). - I updated the the last check to return non-zero return code in order to provoke marking the build as failed. - the whole provisioning and package installation ran properly and the non-zero return code got reported to foreman, which correctly marked the build as failure with message "installation error" - there's no notification generated for this event, but I raised a standalone RFE for this: https://bugzilla.redhat.com/show_bug.cgi?id=1738815 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, 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/RHSA-2019:3172 |