[Katello 2.3] How can I use Katello for Foreman Discovery?

I installed Katello 2.3 on CentOS 7 with the tftp option (and a capsule in
another network that has tftp on it on CentOS 6.5).

I can provision a build from scratch in either network using either the
Katello server or its tftp capsule just fine.

I wanted to get discovery working and I noticed that even without
installing katello with any options, it had the discovered hosts menu
available, but booting a host did not lead to discovery, only an unable to
fetch tftp definition error.

So I thought I could solve this by running 'katello-installer
–foreman-plugin-discovery-install-images true'.

The run seemed to go ok, and if I look in /var/lib/tftpboot on both the
katello server or the capsule, I see the fdi-image directory has appeared
in the boot subdirectory.

However, even though it has apparently copied the image, booting a server
still does not lead to either the discovery menu or the "local" menu. It
still says unable to fetch definition.

I'm a little confused because the Foreman documentation describes how to
setup the capsule manually, but I thought Katello took care of everything
?

Is there still some setup to perform? The Katello docs do not seem very
clear on this.

I should note that I don't have Katello managing dhcp so our standalone
dhcp server was just feeding every client the following options :

next-server 10.3.3.3;
filename "pxelinux.0";

Do I need to change that to make it compatible with discovery? It was
working fine with standard katello provisioning.

I have tried rebuilding the default pxe template in the hopes that work
would, but clicking the 'Build PXE Default' button gives the following
error :

There was an error creating the PXE Default file:
katello-tftp-casuleserver.mydomain.net: ERF12-9243
[ProxyAPI::ProxyException]: Unable to create default TFTP boot menu
([RestClient::BadRequest]: 400 Bad Request) for proxy
https://katello-tftp-capsuleserver.mydomain.net:9090/tftp

I have checked and there is no firewall running on that server that would
be blocking port 9090.

Hello,

> Is there still some setup to perform? The Katello docs do not seem very
> clear on this.

it does not matter if you use Katello or not. For Discovery, you still
need to perform the Discovery installation as described here:

http://theforeman.org/plugins/foreman_discovery/4.1/

katello-installer should work with all the commands described (and if
near future katello-installer will be "merged" into foreman-installer).
If not, you can still use manual installation instructions described
there.

You are apparently missing step 3.1.1 which needs to be done in order to
change the menu.

> I have tried rebuilding the default pxe template in the hopes that work
> would, but clicking the 'Build PXE Default' button gives the following
> error :
>
> There was an error creating the PXE Default file:
> katello-tftp-casuleserver.mydomain.net: ERF12-9243
> [ProxyAPI::ProxyException]: Unable to create default TFTP boot menu
> ([RestClient::BadRequest]: 400 Bad Request) for proxy
> https://katello-tftp-capsuleserver.mydomain.net:9090/tftp
>
> I have checked and there is no firewall running on that server that would
> be blocking port 9090.

Check the proxy.log on the Proxy, this should work normally. Is the TFTP
module enabled? No permission issues?

··· -- Later, Lukas #lzap Zapletal

Strangely enough, this just started working an hour or two later. No
further changes were made.

··· On Monday, January 11, 2016 at 12:36:34 AM UTC-8, Lukas Zapletal wrote: > > Hello, > > > Is there still some setup to perform? The Katello docs do not seem very > > clear on this. > > it does not matter if you use Katello or not. For Discovery, you still > need to perform the Discovery installation as described here: > > http://theforeman.org/plugins/foreman_discovery/4.1/ > > katello-installer should work with all the commands described (and if > near future katello-installer will be "merged" into foreman-installer). > If not, you can still use manual installation instructions described > there. > > You are apparently missing step 3.1.1 which needs to be done in order to > change the menu. > > > I have tried rebuilding the default pxe template in the hopes that work > > would, but clicking the 'Build PXE Default' button gives the following > > error : > > > > There was an error creating the PXE Default file: > > katello-tftp-casuleserver.mydomain.net: ERF12-9243 > > [ProxyAPI::ProxyException]: Unable to create default TFTP boot menu > > ([RestClient::BadRequest]: 400 Bad Request) for proxy > > https://katello-tftp-capsuleserver.mydomain.net:9090/tftp > > > > I have checked and there is no firewall running on that server that > would > > be blocking port 9090. > > Check the proxy.log on the Proxy, this should work normally. Is the TFTP > module enabled? No permission issues? > > -- > Later, > Lukas #lzap Zapletal >