Bug 1498924 - [RFE] When using a lazy-sync kickstart, prevent or show error when trying to provision a new host with that medium
Summary: [RFE] When using a lazy-sync kickstart, prevent or show error when trying to ...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.3.0
Hardware: x86_64
OS: Linux
high vote
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: jcallaha
Depends On:
TreeView+ depends on / blocked
Reported: 2017-10-05 14:48 UTC by Billy Holmes
Modified: 2019-08-12 14:06 UTC (History)
10 users (show)

Fixed In Version: tfm-rubygem-katello-,foreman-proxy-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:

Attachments (Terms of Use)
on_demand kickstart repo (90.54 KB, image/png)
2018-02-07 18:00 UTC, jcallaha
no flags Details
verification screenshot 1 (42.25 KB, image/png)
2018-02-07 18:01 UTC, jcallaha
no flags Details
verification screenshot 2 (30.66 KB, image/png)
2018-02-07 18:01 UTC, jcallaha
no flags Details
verification screenshot 3 (4.22 KB, image/png)
2018-02-07 18:02 UTC, jcallaha
no flags Details
verification screenshot 4 (47.46 KB, image/png)
2018-02-07 18:02 UTC, jcallaha
no flags Details

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 22292 0 Normal Closed Make wget timeout configurable with smart proxy 2020-10-14 18:38:32 UTC
Foreman Issue Tracker 22318 0 Normal Closed Prefetch vmlinuz and initrd on sync 2020-10-14 18:38:32 UTC

Description Billy Holmes 2017-10-05 14:48:44 UTC
Description of problem:

When tying to provision / create a new host using that medium, the boot files that are created will be zero-length if they haven't been downloaded, yet. The host boot process will fail as zero-length files are invalid for boot.

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


How reproducible:

Steps to Reproduce:
1. turn on on-demand downloading for kickstart repo
2. sync kickstart repo
3. create new host
4. select kickstart repo as medium
5. list files in /var/lib/tftpboot/boot

Actual results:

[root@sat1 ~]# ls -l /var/lib/tftpboot/boot/
total 0
-rw-r--r--. 1 foreman-proxy foreman-proxy 0 Oct  4 23:56 RedHat-7.4-x86_64-initrd.img
-rw-r--r--. 1 foreman-proxy foreman-proxy 0 Oct  4 23:56 RedHat-7.4-x86_64-vmlinuz

Expected results:

[ERROR] You're not able to provision hosts with a kickstart that is configured for lazy-sync, please change to immediate sync.

Additional info:

After changing to immediate sync and creating host (and after removing files in tftpboot/boot)

[root@sat1 ~]# ls -l /var/lib/tftpboot/boot/
total 54340
-rw-r--r--. 1 foreman-proxy foreman-proxy 49763300 Oct  5 10:27 RedHat-7.4-x86_64-initrd.img
-rw-r--r--. 1 foreman-proxy foreman-proxy  5875184 Oct  5 10:27 RedHat-7.4-x86_64-vmlinuz

Comment 4 Kedar Bidarkar 2018-01-12 19:27:56 UTC
Tested with Sat6.3.0-snap32.0 

Provisioned a RHEL7 Host with on-demand/lazy-sync and provisioning/PXE_boot of the Host was successful.

I had faced this issue under these conditions earlier and would be a good thing to ensure, that we are not hitting this issue under these conditions.

1) If the manifest which is imported being used elsewhere, there is a chance of the manifest getting expired, after a certain period.

2) So, if one tries to Provision a Host after the manifest is expired, one wouldn't be able to download content from cdn.redhat.com, here it being initrd/vmlinuz files.

3) IT usually takes few hrs to days before the manifest gets expired, though me not an expert in this area.

Let me see how it goes after keeping this setup running for few days ( without importing the manifest anywhere else ) and then trying to provision a new host once again.

[root@qe-sat6-setup boot]# ll RedHat*
-rw-r--r--. 1 foreman-proxy foreman-proxy 49763300 Jul 11  2017 RedHat-7.4-x86_64-initrd.img
-rw-r--r--. 1 foreman-proxy foreman-proxy  5875184 Jul  6  2017 RedHat-7.4-x86_64-vmlinuz

Comment 6 Partha Aji 2018-01-16 22:14:52 UTC
Connecting redmine issue http://projects.theforeman.org/issues/22292 from this bug

Comment 7 Partha Aji 2018-01-18 22:21:11 UTC
Connecting redmine issue http://projects.theforeman.org/issues/22318 from this bug

Comment 8 Satellite Program 2018-01-24 17:08:18 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/22318 has been resolved.

Comment 12 jcallaha 2018-02-07 18:00:18 UTC
Verified in Satellite 6.3 Snap 35.

I had no issues when provisioning a RHEL 7.4 Server host using an on_demand kickstart repo. See attached images for verification.

Comment 13 jcallaha 2018-02-07 18:00:53 UTC
Created attachment 1392815 [details]
on_demand kickstart repo

Comment 14 jcallaha 2018-02-07 18:01:24 UTC
Created attachment 1392816 [details]
verification screenshot 1

Comment 15 jcallaha 2018-02-07 18:01:57 UTC
Created attachment 1392817 [details]
verification screenshot 2

Comment 16 jcallaha 2018-02-07 18:02:22 UTC
Created attachment 1392818 [details]
verification screenshot 3

Comment 17 jcallaha 2018-02-07 18:02:45 UTC
Created attachment 1392819 [details]
verification screenshot 4

Comment 18 Satellite Program 2018-02-21 16:54:17 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, 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-2018:0336

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