Bug 1848291

Summary: Download kernel/initram for kexec asynchronously
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: Discovery ImageAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: egolov, lzap, pcreech, rabajaj, rplevka, sadas
Target Milestone: 6.8.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-smart_proxy_discovery_image-1.2.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 13:03:20 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 Lukas Zapletal 2020-06-18 07:40:32 UTC
It does not get downloaded on slow networks, therefore the kexec HTTPS call timeouts, subsequent calls are raising errors on exclusive FLOCK failure. This change downloads it in a separate thread. Side effect: all kexec calls now return immediately with success (even when the URL was wrong and the host will never download anything and kexec).

TRIAGE: Small fix, big customer. Requesting 6.8.

REL-ENG: Please pull smart_proxy_discovery_image-1.2.0 from upstream repo.

QA: Regression testing for kexec workflow.

Comment 1 Bryan Kearney 2020-06-18 12:04:16 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30149 has been resolved.

Comment 2 Roman Plevka 2020-06-29 15:26:35 UTC
VERIFIED
on sat6.8.0 snap6

# hammer -u admin -p changeme sync-plan info --id 1
ID:                 1
Name:               foo
Start Date:         2020/06/29 16:18:00
Interval:           hourly
Enabled:            yes
Cron Expression:    
Recurring Logic ID: 1
Description:        
Created at:         2020/06/29 15:18:53
Updated at:         2020/06/29 15:18:53
Next Sync:          2020/06/29 16:18:00
Products:           
 1) ID:   1
    Name: foo

Comment 4 Roman Plevka 2020-09-11 15:07:07 UTC
FAILED QA
on snap14

smart proxy is unable to perform kexec.
It is trying to access the wrong host IP.

the discovered host uses a temporary IP, and while provisioning it, a part of the orchestration creates a dhcp reservation with a new address.
The kexec part tries to use the new IP.

It looks like the facts hash is empty in the kexec method.
The behavior is the same as reported here: https://projects.theforeman.org/issues/30478#change-139614

Comment 5 Lukas Zapletal 2020-09-11 15:14:23 UTC
Can you discover kexec host and then check if fact named discovery_bootip (not bootif but bootIP) is present please?

Comment 7 Lukas Zapletal 2020-09-14 12:58:36 UTC
Two patches are actually needed to fix this one, one in core one in discovery.

Comment 9 Roman Plevka 2020-09-15 14:08:00 UTC
re-tested the updated commit and both scenarios now work fine:

https://github.com/theforeman/foreman_discovery/pull/506#issuecomment-692736382

Comment 10 Roman Plevka 2020-09-16 14:34:11 UTC
Since the kexec workflow issue is not related to this bug, i'm going to file a standalone BZ for it:
https://bugzilla.redhat.com/show_bug.cgi?id=1879571

Since i was able to verify the kexec workflow using its patch, i can now put this BZ to VERIFIED.

Comment 13 errata-xmlrpc 2020-10-27 13:03:20 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 (Important: Satellite 6.8 release), 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-2020:4366