Bug 1857146

Summary: Unable to build a host bootdisk image due to missing dosfstools package - Failed to format the ESP image via mkfs.msdos
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: PackagingAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: aruzicka, lzap, pcreech, zhunting
Target Milestone: 6.8.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_bootdisk-17.0.2-2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 13:04:18 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 Roman Plevka 2020-07-15 09:03:18 UTC
Description of problem:
I'm getting the error (see subject) whenever I try to provision a host via VMware compute resource (vmware 6.7) using a bootdisk method.

the exact same procedure and setup works on 6.7.2.

Version-Release number of selected component (if applicable):
satellite 6.8.0 snap 8


Steps to Reproduce:
1. sync rhel7.8 kickstart repo
2. add a vmware compute resource
3. [optional] define a hostgroup, use the library env and default org content view
4. use "create host" dialog to provision a host, [choose hostgroup], select correct cluster and choose appropriate storage.
5. choose "boot disk" based provisioning

Actual results:
Failed to generate ISO image for instance craig-knott.vms.sat.rdu2.redhat.com: ERF42-5995 [Foreman::Exception]: Failed to format the ESP image via mkfs.msdos

Expected results:
iso generated successfully and uploaded to vmware - host properly provisioned

Additional info:

Comment 1 Roman Plevka 2020-07-15 09:19:00 UTC
some additional info about OS:

# cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.8 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.8"
PRETTY_NAME="Employee SKU"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.8:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.8
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.8"
Red Hat Enterprise Linux Server release 7.8 (Maipo)
Red Hat Enterprise Linux Server release 7.8 (Maipo)

[root@dhcp-3-187 ~]# mkfs.
mkfs.btrfs   mkfs.cramfs  mkfs.ext2    mkfs.ext3    mkfs.ext4    mkfs.minix   mkfs.xfs     




Production log (tl;dr - not much extra info in there):

    2020-07-15T05:12:19 [I|app|8813fe00] Adding Compute instance for trent-latting.[redacted].com
    2020-07-15T05:12:21 [I|app|f219106e] Started GET "/tasks/10876685-06a7-4017-a353-e6a317a17836" for 127.0.0.1 at 2020-07-15 05:12:21 -0400
    2020-07-15T05:12:21 [I|app|f219106e] Processing by TasksController#show as */*
    2020-07-15T05:12:21 [I|app|f219106e]   Parameters: {"id"=>"10876685-06a7-4017-a353-e6a317a17836"}
    2020-07-15T05:12:21 [I|app|f219106e]   Rendered tasks/_list.html.erb (Duration: 5.9ms | Allocations: 6838)
    2020-07-15T05:12:21 [I|app|f219106e] Completed 200 OK in 13ms (Views: 6.6ms | ActiveRecord: 0.9ms | Allocations: 8573)
    2020-07-15T05:12:21 [I|app|33631c72] Started GET "/notification_recipients" for 127.0.0.1 at 2020-07-15 05:12:21 -0400
    2020-07-15T05:12:21 [I|app|33631c72] Processing by NotificationRecipientsController#index as JSON
    2020-07-15T05:12:21 [I|app|33631c72] Completed 200 OK in 8ms (Views: 0.2ms | ActiveRecord: 0.9ms | Allocations: 2156) 
    2020-07-15T05:12:21 [I|app|8813fe00] Generating ISO image for trent-latting.[redacted].com
    2020-07-15T05:12:21 [W|app|8813fe00] Failed to generate ISO image for instance trent-latting.[redacted].com: ERF42-5995 [Foreman::Exception]: Failed to format the ESP image via mkfs.msdos 
    2020-07-15T05:12:21 [W|app|8813fe00] Rolling back due to a problem: [#<Orchestration::Task:0x00007f78549032a0 @name="Generating ISO image for trent-latting.[redacted].com", @id="Generating ISO image for trent-latting.[redacted].com", @status="failed", @priority=5, @action=[#<Host::Managed id: nil, name: "trent-latting.[redacted].com", last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: [FILTERED], architecture_id: 1, operatingsystem_id: 1, environment_id: 1, ptable_id: 116, medium_id: nil, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: 1, owner_id: 4, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: "500d43a0-e490-188f-3b97-aad62b00c98b", compute_resource_id: 1, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 1, location_id: 2, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: "bootdisk", grub_pass: "$6$eFGr6Vhu7qbMiwQB$fGngxh.BdzyVRnFo06WjLomW3FoxCz...", discovery_rule_id: nil, global_status: 0, lookup_value_matcher: [FILTERED], openscap_proxy_id: nil, pxe_loader: "PXELinux BIOS", initiated_at: nil, build_errors: nil>, :setGenerateIsoImage], @created=1594804339.5269032, @timestamp=2020-07-15 09:12:21 UTC>]
    2020-07-15T05:12:21 [I|app|8813fe00] Removing Compute instance for trent-latting.[redacted].com
    2020-07-15T05:12:21 [I|app|8813fe00] Processed 3 tasks from queue 'Host::Managed Main', completed 0/11
    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Set up compute instance trent-latting.[redacted].com' *rollbacked*
    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Query instance details for trent-latting.[redacted].com' *rollbacked*
    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Generating ISO image for trent-latting.[redacted].com' *failed*
    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Upload ISO image to datastore for trent-latting.[redacted].com' *canceled*
    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Deploy TFTP PXELinux config for trent-latting.[redacted].com' *canceled*    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Deploy TFTP PXEGrub2 config for trent-latting.[redacted].com' *canceled*
    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Deploy TFTP PXEGrub config for trent-latting.[redacted].com' *canceled*
    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Deploy TFTP iPXE config for trent-latting.[redacted].com' *canceled*
    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Fetch TFTP boot files for trent-latting.[redacted].com' *canceled*
    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Power up compute instance trent-latting.[redacted].com' *canceled*
    2020-07-15T05:12:21 [E|app|8813fe00] Task 'Attach ISO image to CDROM drive for trent-latting.[redacted].com' *canceled*
    2020-07-15T05:12:21 [E|app|8813fe00] Failed to save: Failed to generate ISO image for instance trent-latting.[redacted].com: ERF42-5995 [Foreman::Exception]: Failed to format the ESP image via mkfs.msdos
    2020-07-15T05:12:21 [I|app|8813fe00]   Rendering hosts/new.html.erb within layouts/application
    2020-07-15T05:12:21 [I|app|8813fe00]   Rendered hosts/_progress.html.erb (Duration: 5.7ms | Allocations: 7458)

Comment 2 Lukas Zapletal 2020-07-15 11:09:07 UTC
Roman, can you confirm that installing of a package fixes the issue? Then I will make this a packaging BZ and fix the dependency.

Comment 3 Roman Plevka 2020-07-15 11:16:00 UTC
(In reply to Lukas Zapletal from comment #2)
> Roman, can you confirm that installing of a package fixes the issue? Then I
> will make this a packaging BZ and fix the dependency.

Installing the package certainly helps, but there's one more bug blocking the building of the image:
https://bugzilla.redhat.com/show_bug.cgi?id=1857184

Comment 4 Lukas Zapletal 2020-07-15 11:37:55 UTC
https://github.com/theforeman/foreman-packaging/pull/5542


Dependency added in the RPM.

Comment 6 Lukas Pramuk 2020-09-21 16:27:27 UTC
VERIFIED.

@Satellite 6.8.0 Snap16
tfm-rubygem-foreman_bootdisk-17.0.2-2.fm2_1.el7sat.noarch

1) Have a default Satellite installation and run the commands:

# rpm -qR tfm-rubygem-foreman_bootdisk | grep dos
dosfstools

# mkfs.msdos
mkfs.fat 3.0.20 (12 Jun 2013)
No device specified!
...

>>> tfm-rubygem-foreman_bootdisk now requires dosfstools so mkfs.msdos command is present by default

(the reason one hit the bug is that he didn't install foreman-discovery-image rpm yet, foreman-discovery-image pulls in missing dosfstools )

Comment 9 errata-xmlrpc 2020-10-27 13:04:18 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