Problem:
I have configured puppet plugin for smart proxy, but it is not shown neither as Active nor as Failed in Foreman web-interface. However, direct request to smart proxy API says that puppet plugin is enabled:
curl -k https://foremansp.localdomain.net:8443/v2/features
…
“puppet”:{“http_enabled”:false,“https_enabled”:true,“settings”:{“puppet_url”:“https://puppet.localdomain.net:8140”,“use_provider”:[“puppet_proxy_puppet_api”]},“state”:“running”,“capabilities”:}
…
Expected outcome:
Puppet feature shown in Foreman as Active and working
Foreman and Proxy versions:
Foreman 3.6 & Proxy 3.6.1
Distribution and version:
Dockerized setup with Debian 11 (Bullseye) as base image
Other relevant data:
Hello!
I have following setup in Docker:
Container1 = Puppetserver&PuppetCA
Container2 = Foreman
Container3 = SmartProxy
I’m enabling smart proxy’s plugins one by one. So far Logs and PuppetCA plugins are configured and working fine.
Now its time to get Puppet plugin working, so I configured Puppet plugin .yml files and auth.conf for puppetserver exactly as in manual (Foreman :: Manual).
Here is smart proxy startup log (debug level):
=============================
2023-05-12T07:53:24 [W] Couldn't find settings file /usr/share/foreman-proxy/config/settings.d/facts.yml. Using default settings.
2023-05-12T07:53:24 [W] Couldn't find settings file /usr/share/foreman-proxy/config/settings.d/dns.yml. Using default settings.
2023-05-12T07:53:24 [W] Couldn't find settings file /usr/share/foreman-proxy/config/settings.d/templates.yml. Using default settings.
2023-05-12T07:53:24 [W] Couldn't find settings file /usr/share/foreman-proxy/config/settings.d/tftp.yml. Using default settings.
2023-05-12T07:53:24 [W] Couldn't find settings file /usr/share/foreman-proxy/config/settings.d/dhcp.yml. Using default settings.
2023-05-12T07:53:24 [D] 'puppetca' settings: 'enabled': true, 'puppet_version': 7.9.2, 'use_provider': ["puppetca_hostname_whitelisting", :puppetca_http_api]
2023-05-12T07:53:24 [D] 'puppetca' ports: 'http': true, 'https': true
**2023-05-12T07:53:24 [D] 'puppet' settings: 'enabled': https, 'puppet_version': 7.9.2, 'use_provider': [:puppet_proxy_puppet_api]**
2023-05-12T07:53:24 [D] 'puppet' ports: 'http': false, 'https': true
2023-05-12T07:53:24 [W] Couldn't find settings file /usr/share/foreman-proxy/config/settings.d/bmc.yml. Using default settings.
2023-05-12T07:53:24 [W] Couldn't find settings file /usr/share/foreman-proxy/config/settings.d/realm.yml. Using default settings.
2023-05-12T07:53:24 [D] 'logs' settings: 'enabled': https
2023-05-12T07:53:24 [D] 'logs' ports: 'http': false, 'https': true
2023-05-12T07:53:24 [W] Couldn't find settings file /usr/share/foreman-proxy/config/settings.d/httpboot.yml. Using default settings.
2023-05-12T07:53:24 [W] Couldn't find settings file /usr/share/foreman-proxy/config/settings.d/registration.yml. Using default settings.
2023-05-12T07:53:24 [D] Providers ['puppetca_hostname_whitelisting', 'puppetca_http_api'] are going to be configured for 'puppetca'
**2023-05-12T07:53:24 [D] Providers ['puppet_proxy_puppet_api'] are going to be configured for 'puppet'**
2023-05-12T07:53:24 [D] 'puppetca_http_api' settings: 'puppet_ssl_ca': /etc/foreman-proxy/ssl/certs/ca.pem, 'puppet_ssl_cert': /etc/foreman-proxy/ssl/certs/puppet.localdomain.net.pem, 'puppet_ssl_key': /etc/foreman-proxy/ssl/private_keys/puppet.localdomain.net.key, 'puppet_url': https://puppet.localdomain.net:8140, 'puppet_version': 7.9.2, 'use_provider': ["puppetca_hostname_whitelisting", :puppetca_http_api]
2023-05-12T07:53:24 [D] 'puppetca_hostname_whitelisting' settings: 'autosignfile': /etc/puppetlabs/puppet/autosign.conf, 'puppet_version': 7.9.2, 'use_provider': ["puppetca_hostname_whitelisting", :puppetca_http_api]
**2023-05-12T07:53:24 [D] 'puppet_proxy_puppet_api' settings: 'api_timeout': 30 (default), 'classes_retriever': apiv3, 'environments_retriever': apiv3, 'puppet_ssl_ca': /etc/foreman-proxy/ssl/certs/ca.pem, 'puppet_ssl_cert': /etc/foreman-proxy/ssl/certs/puppet.localdomain.net.pem, 'puppet_ssl_key': /etc/foreman-proxy/ssl/private_keys/puppet.localdomain.net.key, 'puppet_url': https://puppet.localdomain.net:8140, 'puppet_version': 7.9.2, 'use_provider':** [:puppet_proxy_puppet_api]
2023-05-12T07:53:24 [I] Successfully initialized 'foreman_proxy'
2023-05-12T07:53:24 [I] Successfully initialized 'puppetca_http_api'
2023-05-12T07:53:24 [I] Successfully initialized 'puppetca_hostname_whitelisting'
2023-05-12T07:53:24 [I] Successfully initialized 'puppetca'
**2023-05-12T07:53:24 [I] Successfully initialized 'puppet_proxy_puppet_api'**
**2023-05-12T07:53:24 [I] Successfully initialized 'puppet'**
2023-05-12T07:53:24 [D] Log buffer API initialized, available capacity: 2000/1000
2023-05-12T07:53:24 [I] Successfully initialized 'logs'
2023-05-12T07:53:24 [I] WEBrick 1.6.1
2023-05-12T07:53:24 [I] ruby 2.7.4 (2021-07-07) [x86_64-linux-gnu]
2023-05-12T07:53:24 [I]
Certificate:
---removed---
2023-05-12T07:53:24 [D] Rack::Handler::WEBrick is mounted on /.
2023-05-12T07:53:24 [I] WEBrick::HTTPServer#start: pid=1 port=8443
2023-05-12T07:53:24 [I] Smart proxy has launched on 2 socket(s), waiting for requests
=============================
All seems to be OK, puppet plugin initialized successfully, but:
(Dont look at 9 warnings - these are for missing yml files, see log above)
My configs:
puppet.yml:
---
# Can be true, false, or http/https to enable just one of the protocols
:enabled: https
:puppet_version: 7.9.2
puppet_proxy_puppet_api.yml:
---
# URL of the puppet master itself for API requests.
:puppet_url: <new users cant post more than 5 links>
#
# SSL certificates used to access the puppet API
:puppet_ssl_ca: /etc/foreman-proxy/ssl/certs/ca.pem
:puppet_ssl_cert: /etc/foreman-proxy/ssl/certs/puppet.localdomain.net.pem
:puppet_ssl_key: /etc/foreman-proxy/ssl/private_keys/puppet.localdomain.net.key
#
# Smart Proxy api timeout when Puppet's environment classes api is used and classes cache is disabled
:api_timeout: 30
I also tried to explicitly set provider to puppet_proxy_puppet_api and change/remove puppet_version value in puppet.yml, without any success.
Only thing i can think of this now is that maybe smart proxy supports only puppet versions 5 and 6, as mentioned in manual section 4.3, but i believe version 7 should be supported too. If so, can anyone tell me where to look next?