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.
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 ~~~
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.
This is actually fixed in 10.0.1, rebase needed tho.
The bug was fixed upstream, Satellite NEXT.
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
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.
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