Bug #17728
closedIncorrect provision URL generated
Description
In 1.13.2 foreman_url('provision') is returning a URL with port 8000 included even though nothing listens on that port by default in this version. For example:
http://my.host.org:8000/unattended/provision?token=83ecd7a9-6e73-4914-9b22-06dac9d73110
The FDI ISO was used to discover the host, then the provision information filled out via the web UI.
Possibly related to issue #11869.
Updated by Dominic Cleal over 8 years ago
- Category set to Unattended installations
- Status changed from New to Need more information
1. What's the value of unattended_url
in Administer > Settings > Provisioning?
2. Do any of your smart proxies (particularly TFTP ones) have the Templates feature?
Updated by Jason Nance over 8 years ago
unattended_url
says: http://my.host.org
Yes, the "templates" feature is enabled on my smart proxy. I only have a single all-in-one server with the following features:
Templates, Pulp, TFTP, Puppet, Puppet CA, Realm, Logs, Dynflow, Openscap, and SSH
Updated by Dominic Cleal over 8 years ago
- Status changed from Need more information to Feedback
The provisioning URL is probably resolving to the smart proxy's template URL then, defined in /etc/foreman-proxy/settings.d/templates.yml. I recommend switching the feature off on the smart proxy, there's little point in it, particularly on one installation.
Else ensure the smart proxy is configured to listen on that port (8000) in /etc/foreman-proxy/settings.yml.
Updated by Jason Nance over 8 years ago
Is this feature different from the templates plugin which syncs provisioning templates?
Can you point me to info on how to disable a feature?
Thanks.
Updated by Jason Nance over 8 years ago
I set :enabled: false
in /etc/foreman-proxy/settings.d/templates.yml
and restarted stuff and the port changed to 9090 in foreman_url('provision')
.
This box is a fresh install of 1.13.2 w/ Puppet 4. If I compare this to a 1.13.2 host that is using Puppet 3 and was updated from 1.12 there is no port (it uses http/80).
Is it expected that there are these kinds of differences (without user customization)?
Updated by Jason Nance over 8 years ago
I should have also noted that the provisioning fails with https/9090 because the certificate isn't trusted.
Updated by Dominic Cleal over 8 years ago
- Status changed from Feedback to Resolved
Is this feature different from the templates plugin which syncs provisioning templates?
Yes.
Is it expected that there are these kinds of differences (without user customization)?
No, the templates feature is always disabled by default in Foreman. It must have been enabled, probably via the installer. HTTPS isn't intended to be used for unattended URLs, it should be an HTTP URL.
Updated by Jason Nance over 8 years ago
Thanks for the info, Dominic, but I'm failing to see how this is resolved.
With :enabled: false
in /etc/foreman-proxy/settings.d/templates.yml
, foreman_url('provision')
is now returning:
https://my.host.org:9090/unattended/provision?token=83ecd7a9-6e73-4914-9b22-06dac9d73110
Note the https
- I should been more clear about that.
Also, this issue is happening on a fresh install. If this is not the intended behavior (templates getting enabled or this https/9090) isn't that an installer bug?
Updated by Dominic Cleal over 8 years ago
Jason Nance wrote:
Thanks for the info, Dominic, but I'm failing to see how this is resolved.
With
:enabled: false
in/etc/foreman-proxy/settings.d/templates.yml
,foreman_url('provision')
is now returning:
Is the Templates feature showing as active on the smart proxy in Foreman? If so, click the Refresh Features button.
Also, this issue is happening on a fresh install. If this is not the intended behavior (templates getting enabled or this https/9090) isn't that an installer bug?
Seems unlikely to me, but if so, please file a bug for the installer with the contents of your answer file and reproducer.
Updated by Jason Nance over 8 years ago
Is the Templates feature showing as active on the smart proxy in Foreman? If so, click the Refresh Features button.
Thank you very much, that was the problem. Is there somewhere in the docs that discusses how this works (how to enable/disable features)? I have to admit that this process is making me feel awfully foolish.
Updated by Dominic Cleal over 8 years ago
There's a bit under https://theforeman.org/manuals/1.13/index.html#4.3.2SmartProxySettings but it doesn't explain how to refresh Foreman's feature list/