SmartProxy Install Fails with Discovery

Problem:
I am trying to setup a SmartProxy with the following command:

foreman-installer --scenario foreman-proxy-content                   
--certs-tar-file "/root/proxy.example.org-certs.tar"                  
--foreman-proxy-content-parent-fqdn "foreman.example.org"                   
--foreman-proxy-register-in-foreman "true"                   
--foreman-proxy-foreman-base-url "https://foreman.example.org"                   
--foreman-proxy-trusted-hosts "foreman.example.org"                   
--foreman-proxy-trusted-hosts "proxy.example.org"                  
--foreman-proxy-oauth-consumer-key "blah" 
--foreman-proxy-oauth-consumer-secret "blah"                   
--puppet-server-foreman-url "https:///foreman.example.org"                   
--foreman-proxy-dhcp "false"                   
--enable-foreman-proxy-plugin-discovery

However, I get the below error (taken from " foreman-proxy-content.log"):

[ERROR 2020-07-24T17:34:09 main]  Proxy proxy.example.org has failed to load one or more features (Discovery), check /var/log/foreman-proxy/proxy.log for configuration errors
[ERROR 2020-07-24T17:34:09 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:70:in `validate_features!'
[ERROR 2020-07-24T17:34:09 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:59:in `refresh_features!'
[ERROR 2020-07-24T17:34:09 main] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:48:in `features='
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:193:in `call_provider'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:507:in `set'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:570:in `sync'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:241:in `sync'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:136:in `sync_if_needed'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:90:in `block in perform_changes'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:89:in `each'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:89:in `perform_changes'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:267:in `apply'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:287:in `eval_resource'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:191:in `call'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:191:in `block (2 levels) in evaluate'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:545:in `block in thinmark'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:544:in `thinmark'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:191:in `block in evaluate'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:122:in `traverse'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:178:in `evaluate'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:240:in `block (2 levels) in apply'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:545:in `block in thinmark'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:544:in `thinmark'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in `block in apply'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:161:in `with_destination'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `apply'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `block (2 levels) in apply_catalog'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:545:in `block in thinmark'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:544:in `thinmark'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in `block in apply_catalog'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:232:in `block in benchmark'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:231:in `benchmark'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:183:in `apply_catalog'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:399:in `run_internal'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:227:in `block in run'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:314:in `override'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:210:in `run'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:343:in `apply_catalog'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:260:in `block (2 levels) in main'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:314:in `override'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:243:in `block in main'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:314:in `override'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:207:in `main'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:177:in `run_command'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `block in run'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:734:in `exit_on_fail'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `run'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:143:in `run'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute'
[ERROR 2020-07-24T17:34:09 main] /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'

[ERROR 2020-07-24T17:34:09 main]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[proxy.example.org]/features: change from ["HTTPBoot", "Logs", "Pulp Node", "Puppet", "Puppet CA", "TFTP", "Templates"] to ["Discovery", "HTTPBoot", "Logs", "Puppet", "Puppet CA", "TFTP", "Templates"] failed: Proxy proxy.example.org has failed to load one or more features (Discovery), check /var/log/foreman-proxy/proxy.log for configuration errors

If I remove --enable-foreman-proxy-plugin-discovery, the install goes fine.

Expected outcome:
I would expect for installation to finish with Discovery enabled.

Foreman and Proxy versions:
3.12

Foreman and Proxy plugin versions:
N/A

Distribution and version:
CentOS 7

Other relevant data:

I think the problem is that I need to run the below first:

foreman-installer --enable-foreman-plugin-discovery

However, that returns error message:

ERROR: Unrecognised option '--enable-foreman-plugin-discovery'

Not sure why it would be missing?

That option needs to be enabled on the foreman server.

Oh, I see. Thank you!

Do I also install the discovery image and setup PXELINUX templates on the Foreman server? Does this stuff get sync’d down to the Smart Proxy?

I’m really new to this, so sorry for all the questions.