Bug 1286571 - Reboot/kexec error should rollback
Reboot/kexec error should rollback
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Discovery Plugin (Show other bugs)
Unspecified Unspecified
unspecified Severity low (vote)
: Unspecified
: --
Assigned To: Lukas Zapletal
Katello QA List
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2015-11-30 04:25 EST by Sachin Ghai
Modified: 2017-01-09 07:00 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-01-05 10:58:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 12327 None None None 2016-04-22 11:13 EDT

  None (edit)
Description Sachin Ghai 2015-11-30 04:25:25 EST
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/
2015-11-30 04:09:05 [I] Add DNS A record for mac52540098967a.idmqe.lab.eng.bos.redhat.com/
2015-11-30 04:09:05 [I] Add DNS PTR record for
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:

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 04:27 EST
Created attachment 1100396 [details]
complete exception thrown in production.log
Comment 2 Sachin Ghai 2015-11-30 04:42:06 EST
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 05:23:18 EST
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 10:58:20 EST
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.