Unable to create hosts discovery on Katello/Foreman 1.17

Problem:
I’ve installed a fresh installation of Katello 3.6/Foreman 1.7. When I try to PXE boot it works. However when I try to click on “Foreman Discovery Image” it does nothing.

By default where do I get the vminuz0 and initrd0.img

Here is the default configuration file:

# pwd
/var/lib/tftpboot/pxelinux.cfg
# cat default
LABEL discovery
  MENU LABEL Foreman Discovery Image
  KERNEL boot/fdi-image/vmlinuz0
  APPEND initrd=boot/fdi-image/initrd0.img rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nomodeset proxy.url=https://10.0.210.20 proxy.type=foreman
  IPAPPEND 2
#

Expected outcome:
To show up in Discovery Host in Foreman apps.

Foreman and Proxy versions:
Where can I verify?

Foreman and Proxy plugin versions:
Where can I verify?

Other relevant data:
With Foreman 1.17.1 why I do not see “Discovery Host” under tab Hosts?

Please Advice.
Thanks

you can check if discovery image is present on Foreman server

/var/lib/tftpboot/boot/
└── fdi-image
    ├── initrd0.img
    ├── README
    ├── SHA256SUM
    └── vmlinuz0
1 directory, 4 files

Hey, what @hartmel said. You need to have FDI installed on your Foreman or Smart Proxy server. Check our manual, it’s all there:

https://theforeman.org/plugins/foreman_discovery/11.0/index.html

Where do you try to click on? Please be more specific.

Hi Izap,
I try to execute the command but I’m getting error messages. Can you please advice? What I should do next. Thanks

# foreman-installer \
  --enable-foreman-proxy-plugin-discovery \
  --foreman-proxy-plugin-discovery-install-images=true \
  --foreman-proxy-plugin-discovery-source-url=http://downloads.theforeman.org/discovery/releases/3.4/
-----------------------------------------------------------------------------------------------

Error:

[root@virtbox1-foreman ~]# foreman-installer \
>   --enable-foreman-proxy-plugin-discovery \
>   --foreman-proxy-plugin-discovery-install-images=true \
>   --foreman-proxy-plugin-discovery-source-url=http://downloads.theforeman.org/discovery/releases/3.4/
 Execution of '/usr/bin/yum -d 0 -e 0 -y install tfm-rubygem-foreman_discovery' returned 1: No Presto metadata available for foreman-plugins


Error downloading packages:
  tfm-rubygem-foreman_discovery-11.0.0-1.fm1_17.el7.noarch: [Errno 256] No more mirrors to try.
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/execution.rb:235:in `execute'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider.rb:101:in `execute'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/yum.rb:197:in `install'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/package.rb:88:in `block (3 levels) in <module:Puppet>'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:487:in `set'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:561:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:236:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in `sync_if_needed'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:80:in `perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:233:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:249:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/share/gems/gems/kafo-2.1.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:348:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
 /Stage[main]/Foreman::Plugin::Discovery/Foreman::Plugin[discovery]/Package[tfm-rubygem-foreman_discovery]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install tfm-rubygem-foreman_discovery' returned 1: No Presto metadata available for foreman-plugins


Error downloading packages:
  tfm-rubygem-foreman_discovery-11.0.0-1.fm1_17.el7.noarch: [Errno 256] No more mirrors to try.
 /Stage[main]/Foreman_proxy::Plugin::Discovery/Foreman_proxy::Remote_file[/var/lib/tftpboot/boot/fdi-image-latest.tar]/File[/var/lib/tftpboot/boot/fdi-image-latest.tar]: Could not evaluate: Could not retrieve file metadata for http://downloads.theforeman.org/discovery/releases/3.4/fdi-image-latest.tar: getaddrinfo: Name or service not known
/opt/puppetlabs/puppet/lib/ruby/2.1.0/net/http.rb:879:in `initialize'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/net/http.rb:879:in `open'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/net/http.rb:879:in `block in connect'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/timeout.rb:90:in `block in timeout'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/timeout.rb:100:in `call'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/timeout.rb:100:in `timeout'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/net/http.rb:878:in `connect'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/net/http.rb:852:in `start'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/net/http.rb:1375:in `request'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/net/http.rb:1154:in `head'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/http_proxy.rb:182:in `block in request_with_redirects'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/http_proxy.rb:174:in `upto'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/http_proxy.rb:174:in `request_with_redirects'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/generic_http.rb:14:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/file_metadata/http.rb:14:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/file_metadata/selector.rb:15:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:194:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/source.rb:194:in `block in metadata'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/source.rb:185:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/source.rb:185:in `metadata'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/source.rb:137:in `copy_source_values'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:766:in `retrieve'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1098:in `retrieve_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:300:in `from_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:233:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:249:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/share/gems/gems/kafo-2.1.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:348:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
 /Stage[main]/Foreman_proxy::Plugin::Discovery/Foreman_proxy::Plugin[discovery]/Package[rubygem-smart_proxy_discovery]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install rubygem-smart_proxy_discovery' returned 1: Error downloading packages:
  rubygem-rest-client-1.6.7-4.el7.noarch: [Errno 256] No more mirrors to try.
  rubygem-mime-types-1.19-3.el7.noarch: [Errno 256] No more mirrors to try.
  rubygem-smart_proxy_discovery-1.0.4-1.el7.noarch: [Errno 256] No more mirrors to try.
  rubygem-netrc-0.7.7-3.el7.noarch: [Errno 256] No more mirrors to try.
Installing             Done                                               [100%] [........................................]
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-installer/katello.log
[root@virtbox1-foreman ~]#

Clean yum metadata, try to install the package manually first by yum and resolve yum issues (like connection issue or something like that).