Httpboot provisoning files missing

Hi :slight_smile:

Problem:
When i build a host with Grub2 UEFI HTTP boot selected, there are no files provisionend under /var/lib/tftpboot/httpboot. So if the host boots grub2, he wont find the files for the http(s)boot.

Expected outcome:
vmlinuz and initrd files in tftboot/httpboot/ like in tftboot/boot/

Foreman and Proxy versions:
Foreman: 2.0.0-0.9.rc2.el7
Proxy: 2.0.0-0.3.rc2.el7

Foreman and Proxy plugin versions:
HTTPboot: 2.0.0-rc3
TFTP: 2.0.0-rc3

Distribution and version:
RHEL 7.7

Other relevant data:
I enabled httpboot like mentionend here.

  • enabled httpboot in /etc/foreman-proxy/settings.d/http.yml
  • enabled http and https in /etc/foreman-proxy/settings.yml (default values)
  • restarted the proxy
  • then HTTPboot is listed under Active Features in the webUI
  • Proxy is set in the subnet and the subnet is selected in the Host Group
  • foreman-proxy has read/write access to the whole folder tftboot

When i restart the proxy, the log says that httpboot and tftp got initialized successfully.
Then i click build for a host but foreman just builds the files for grub2/ and boot/. In the logs are no errors regarding httpboot, the log level is set to Debug.

Proxy startup:

2020-03-26T11:54:36  [D] 'tftp' settings: 'enabled': true, 'tftp_connect_timeout': 10 (default), 'tftp_dns_timeout': 10 (default), 'tftp_read_timeout': 60 (default), 'tftproot': /var/lib/tftpboot (default)
2020-03-26T11:54:36  [D] 'tftp' ports: 'http': true, 'https': true
...
2020-03-26T11:54:36  [D] 'httpboot' settings: 'enabled': https, 'http_port': , 'https_port': 8443, 'root_dir': /var/lib/tftpboot (default)
2020-03-26T11:54:36  [D] 'httpboot' ports: 'http': false, 'https': true
...
2020-03-26T11:54:36  [I] Successfully initialized 'foreman_proxy'
2020-03-26T11:54:36  [I] Successfully initialized 'facts' 
2020-03-26T11:54:36  [I] Successfully initialized 'tftp'
...
2020-03-26T11:54:36  [I] Successfully initialized 'httpboot'

Any help is appreciated!
Thanks

Hello,

URL /httpboot maps to /var/lib/tftpboot directly so TFTP and HTTP files are shared. When you provision a host, these files should be available in the boot/ subdirectory making them available via /httpboot/boot/kernel etc.

Okay, so if a host tries to boot via http it gets the files provisonend from the foreman proxy or over an apache? Currently i have no apache linked with the tftp directory.

If i try to boot a host over http (grub2) it just says it cant find the boot files and that i should load the kernel first. Over tftp it works fine. With IPXE http the system just hung up and did nothing after loading the NBP successfully.
Do i have to set up the apache to provision the files or does the foreman-proxy?

Smart proxy servers file from that folder itself, so HTTP clients are actually connecting to the 8000 port. Listing is disabled but you can try this with wget or curl. Out of my head: http://proxy:8000/httpboot/pxelinux.cfg/default if I remember one path correctly

Screenshot/photo please?

This occurs after the host loaded Grub2 and the option “Kickstart default PXEGrub2 HTTP Boot” was chosen in the Grub menu.
The loaded grub.cfg looks like this:

# This file was deployed via 'Kickstart default PXEGrub2' template
set default=0
set timeout=10

menuentry 'Kickstart default PXEGrub2' {
  linuxefi boot/fedora-31-*some-id*-vmlinuz ks=https://*server*/unattended/provision?token=*token* modprobe.blacklist=qla2xx,qla4xxx,lpfc network ksdevice=bootif ks.device=bootif BOOTIF=*mac* kssendmac ks.sendmac inst.ks.sendmac BOOTIF=01-$net_default_mac
  initrdefi boot/fedora-31-*some-id*-initrd.img
}

menuentry 'Kickstart default PXEGrub2 HTTP Boot' {
  linuxefi /httpboot/boot/fedora-31-*some-id*-vmlinuz ks=https://*server*/unattended/provision?token=*token* modprobe.blacklist=qla2xx,qla4xxx,lpfc network ksdevice=bootif ks.device=bootif BOOTIF=*mac* kssendmac ks.sendmac inst.ks.sendmac BOOTIF=01-$net_default_mac
  initrdefi /httpboot/boot/fedora-31-*some-id*-initrd.img
}

The vmlinuz and initrd files are there and in the right directory.

Does it matter if Grub2/iPxe was loaded via http or tftp?

What kind of hardware/VM is this? Is this BIOS or UEFI? Are you booting over PXE or UEFI HTTP?

Its a RHEV vm with the BIOS Type set to “Q35 with UEFI BIOS”. I’m booting over PXEv4.

What is the PXE Loader setting then?

There is a bug, when you change PXE loader for existing host TFTP files won’ŧ get changed.