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 1286571 - Reboot/kexec error should rollback
Summary: Reboot/kexec error should rollback
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Plugin
Version: 6.1.5
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-30 09:25 UTC by Sachin Ghai
Modified: 2017-01-09 12:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-05 15:58:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
complete exception thrown in production.log (15.58 KB, text/plain)
2015-11-30 09:27 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 12327 0 None None None 2016-04-22 15:13:41 UTC

Description Sachin Ghai 2015-11-30 09:25:25 UTC
Description of problem:
I was trying auto-provisioning manually. I discovered a pxe-less host with dhcp. Host was discovered successfully and then I defined a discovery-rule but accidentally I associated incorrect hostgroup to that rule which is associated to a different subnet. As soon as I selected the "auto-provision" from provision dropdown, I got notification rule is applied. And host was removed removed from discovered host page and moved to 'All host' page.

However when I checked the logs and found following error:

----
2015-11-30 04:09:05 [I] Processing by DiscoveredHostsController#auto_provision as HTML
2015-11-30 04:09:05 [I]   Parameters: {"authenticity_token"=>"71UIz3gXvym7Vohl7d//nLh8Nuqs8uZ3uwyRcMSynNU=", "id"=>"mac52540098967a"}
2015-11-30 04:09:05 [I] Match found for host mac52540098967a (26) rule rule1 (1)
2015-11-30 04:09:05 [I] Create DHCP reservation for mac52540098967a.idmqe.lab.eng.bos.redhat.com-52:54:00:98:96:7a/192.168.100.23
2015-11-30 04:09:05 [I] Add DNS A record for mac52540098967a.idmqe.lab.eng.bos.redhat.com/192.168.100.23
2015-11-30 04:09:05 [I] Add DNS PTR record for 192.168.100.23/mac52540098967a.idmqe.lab.eng.bos.redhat.com
2015-11-30 04:09:05 [I] Add the TFTP configuration for mac52540098967a.idmqe.lab.eng.bos.redhat.com
2015-11-30 04:09:11 [I] Fetching required TFTP boot files for mac52540098967a.idmqe.lab.eng.bos.redhat.com
2015-11-30 04:09:11 [I] Redirected to https://cloud-qe-15.idmqe.lab.eng.bos.redhat.com/discovered_hosts
2015-11-30 04:09:11 [W] Unable to kexec mac52540098967a:
2015-11-30 04:09:11 [W] /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
/opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.29/lib/restclient_ext/request.rb:50:in `block in transmit'
/opt/rh/ruby193/root/usr/share/ruby/net/http.rb:746:in `start'
/opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.29/lib/restclient_ext/request.rb:44:in `transmit'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:76:in `put'

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


How reproducible:
always

Steps to Reproduce:
1. discover host via pxe-less
2. define a discovery rule and associated a hostgroup which has subnet associated from a different network than discovered host
3. auto-provision

Actual results:
1. Rule was applied
2. Host entry removed from discovered host page 
3. No error on webUI
4. Got a generic error from production.log:
2015-11-30 04:09:11 [W] Unable to kexec mac52540098967a:



Expected results:

1. I think at first place user should get an error on webUI as soon as discovery rule was applied.

2. host entry shouldn't be removed from discovered host page,

3. its would be nice if user gets a proper error in production.log instead of generic warning type message as below:

like: 2015-11-30 04:09:11 [W] Unable to kexec mac52540098967a:


Additional info:

Comment 1 Sachin Ghai 2015-11-30 09:27:28 UTC
Created attachment 1100396 [details]
complete exception thrown in production.log

Comment 2 Sachin Ghai 2015-11-30 09:42:06 UTC
forgot the reproducible version:  Sat 6.1.5 compose2(Satellite-6.1.0-RHEL-7-20151125.0)

discovery image: foreman-discovery-image-3.0.5-2.iso

Comment 4 Lukas Zapletal 2015-11-30 10:23:18 UTC
By default, we do not consider error during reboot request as reason to do full provisioning rollback (due to fact that host can be rebooted manually). With kexec introduction, it might make more sense to fail. We can perhaps create a global setting "rollback_on_reboot" for this.

Taking this off the errata, not a blocker, nice to have feature.

Comment 5 Bryan Kearney 2017-01-05 15:58:20 UTC
This is an older bug which has been reported upstream. We are not going to track this bug downstream. When the upstream issue is resolved, the next build will contain the fix. Thank you.


Note You need to log in before you can comment on or make changes to this bug.