Bug 1659042 - Bootdisk does not validate media leading to Medium cannot be blank error during bootdisk provision method
Summary: Bootdisk does not validate media leading to Medium cannot be blank error duri...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Bootdisk Plugin
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Released
Assignee: Lukas Zapletal
QA Contact: Jan Hutař
URL:
Whiteboard:
: 1663524 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-13 12:47 UTC by Lukas Zapletal
Modified: 2019-10-07 17:20 UTC (History)
11 users (show)

Fixed In Version: foreman-1.20.1.9-1,tfm-rubygem-foreman_bootdisk-14.0.0.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:39:36 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:39:46 UTC
Foreman Issue Tracker 14797 None None None 2019-01-21 09:07:27 UTC
Foreman Issue Tracker 25680 None None None 2018-12-13 13:19:32 UTC
Red Hat Knowledge Base (Solution) 2832391 None None [Satellite 6] Registering new host fails with error "Validation failed: Location can't be blank." 2019-03-04 15:11:08 UTC
Red Hat Knowledge Base (Solution) 3774291 None None None 2019-03-04 15:23:18 UTC

Description Lukas Zapletal 2018-12-13 12:47:51 UTC
I was trying to create a host using newly added bootdisk provisioning method from UI. I associated all required fields and simply selected the "Boot disk based" provisioning method. All other fields on "operating system" tab were appeared same as for "network based".

Under "Media selection" -> "Synced contents" was selected and Kickstart media was auto populated. The moment I submitted the create host form, UI raised error on Media under "operating system" tab: 

Media can't be blank

Symptoms the same as in https://bugzilla.redhat.com/show_bug.cgi?id=1513327

Regression, 6.3 was fixed in BZ 1513327 but upstream was not yet properly fixed.

This is a bootdisk blocker for 6.4

Comment 4 Lukas Zapletal 2019-01-07 14:02:20 UTC
*** Bug 1663524 has been marked as a duplicate of this bug. ***

Comment 6 Lukas Zapletal 2019-01-11 14:35:40 UTC
The PRs are just about to be merged. As a workaround apply this:

https://github.com/theforeman/foreman/pull/6331/files

and this for bootdisk:

https://github.com/theforeman/foreman_bootdisk/pull/73/files

That will do it.

Comment 9 Bryan Kearney 2019-01-21 09:02:15 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25680 has been resolved.

Comment 15 Jan Hutař 2019-02-25 21:31:11 UTC
Some generic info about Boot disk based provisioning method I got from lzap (thanks!):

- this was provided by community (thanks!)
- this currently works only on VmWare compute resource
- you do not need to download boot disk yourself, this happens automatically when host is created in Satellite (boot disk gets uploaded to VmWare and attached as bootable CD to the VM)
- initial discussion was here: https://community.theforeman.org/t/rfc-uefi-http-booting/8723/12

Comment 18 Lukas Zapletal 2019-04-23 11:14:06 UTC
This is a Technlogy Preview feature and this particular issue (or similar symptoms) persisted in Satellite 6.3 to 6.5. It will be fixed in Satellite 6.6. Workaround is possible, just comment out one particular line:

From f4a051a53d76d635b85a202f8d17da57bd7c4b7a Mon Sep 17 00:00:00 2001
From: Lukas Zapletal <lzap+git@redhat.com>
Date: Thu, 11 Jan 2018 12:47:46 +0100
Subject: [PATCH] BZ #1513327 - media is not validated

---
 app/models/concerns/foreman_bootdisk/host_ext.rb | 5 -----
 1 files changed, 0 insertion(+), 1 deletions(-)

diff --git a/app/models/concerns/foreman_bootdisk/host_ext.rb b/app/models/concerns/foreman_bootdisk/host_ext.rb
index 94ac3bd..e1f9bac 100644
--- a/app/models/concerns/foreman_bootdisk/host_ext.rb
+++ b/app/models/concerns/foreman_bootdisk/host_ext.rb
@@ -4,7 +4,6 @@ module ForemanBootdisk::HostExt
   extend ActiveSupport::Concern
 
   included do
-    alias_method_chain :validate_media?, :bootdisk
     alias_method_chain :can_be_built?, :bootdisk
   end
 
@@ -37,10 +36,6 @@ module ForemanBootdisk::HostExt
     /i.86|x86[_-]64/ =~ architecture.name
   end
-- 
2.18.1

Please report back if it helps, we might be able to do this simple change for 6.4.

Also reported as https://bugzilla.redhat.com/show_bug.cgi?id=1513327

Comment 21 errata-xmlrpc 2019-05-14 12:39:36 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-2019:1222


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