Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1495634 - hammer bootdisk host fails when default gateway in subnet definition is not set
Summary: hammer bootdisk host fails when default gateway in subnet definition is not set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Bootdisk Plugin
Version: 6.2.11
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.4.0
Assignee: Lukas Zapletal
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-26 11:20 UTC by daniel
Modified: 2023-09-07 18:57 UTC (History)
9 users (show)

Fixed In Version: foreman_bootdisk-10.0.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:33:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21106 0 None None None 2017-09-26 11:30:44 UTC
Red Hat Knowledge Base (Solution) 3195432 0 None None None 2017-09-28 11:13:29 UTC

Description daniel 2017-09-26 11:20:49 UTC
Description of problem:

Trying to create a boot disk via 

# hammer bootdisk host ...

fails if subnet has no default gateway set although this is flagged optional in UI (Optional: Gateway for this subnet)


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

How reproducible:


Steps to Reproduce:
1. create subnet without a default gateway as well as hostgroup:
2. create the host via hammer
3. create host bootdisk and see it fails with: 
"Failed to download host disk image:
  ERF42-2759 [Foreman::Exception]: Subnet (static-no-gw-vlan105.coe.muc.redhat.com (172.24.105.0/24)) has no gateway defined"


Actual results:
"Failed to download host disk image:
  ERF42-2759 [Foreman::Exception]: Subnet (static-no-gw-vlan105.coe.muc.redhat.com (172.24.105.0/24)) has no gateway defined"

Expected results:
boot image should be created even though there is not default gateway for the net 

Additional info:
Customer environments no necessarily do have a default gateway, i.e. think about a network just providing services in the background. Those do not need any default GW as it is sufficient the reach all services or be reached by services within the same network.

Comment 3 daniel 2017-09-26 12:28:38 UTC
Same happens when trying to download host image via UI:

~~~
Error: Failed to render boot disk template: ERF42-2759 [Foreman::Exception]: Subnet (static-no-gw-vlan105.example.com (172.24.105.0/24)) has no gateway defined
~~~

Comment 6 Lukas Zapletal 2017-10-09 12:24:55 UTC
Hello,

valid bug, thanks for report. I will fix, but workaround is easy - just modify the bootdisk template to avoid this error message, it is just one line:

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

Then re-download the image and it will work.

Comment 8 Lukas Zapletal 2017-12-13 09:17:22 UTC
This is actually fixed in 10.0.1, rebase needed tho.

Comment 12 Lukas Zapletal 2018-04-09 09:33:59 UTC
The bug was fixed upstream, Satellite NEXT.

Comment 13 Lukas Zapletal 2018-04-09 09:35:29 UTC
For googlers, this is just a template change, this can be fixed with any Foreman or Satellite version just by editing Bootdisk - host disk template in Templates:

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

Comment 14 Nikhil Kathole 2018-06-20 07:10:18 UTC
VERIFIED

Version tested:
Satellite 6.4 snap 8

# rpm -qa | grep bootdisk
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3.3-3.el7sat.noarch
tfm-rubygem-foreman_bootdisk-12.0.0-1.el7sat.noarch

Successfully able to create bootdisk when default gateway is not set in subnet.

Comment 16 Bryan Kearney 2018-10-16 19:33:01 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:2927


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