Bug #11360
closed
Added by Charles Burton over 9 years ago.
Updated over 9 years ago.
Description
I keep getting an error when I try to import the existing salt states into foreman. I have it working, I can see the smart proxy but when I attempt to get the states foreman gives me this error:
ERF12-4701 [ProxyAPI::ProxyException]: Unable to fetch Salt states list ([ProxyAPI::ProxyException]: ERF12-7301 [ProxyAPI::ProxyException]: Unable to fetch Salt environments list ([RestCli...) for proxy https://salt-foreman.wx.noaa.gov:8443/salt/
My foreman.yaml in /etc/salt looks like this:
---
:proto: https
:host: salt-foreman.wx.noaa.gov
:port: 8443
:ssl_ca: "/var/lib/puppet/ssl/certs/ca.pem"
:ssl_cert: "/var/lib/puppet/ssl/certs/salt-foreman.wx.noaa.gov.pem"
:ssl_key: "/var/lib/puppet/ssl/private_keys/salt-foreman.wx.noaa.gov.pem"
:timeout: 10
:salt: /usr/bin/salt
:upload_grains: true
- Related to Support #11433: problems with salt-integration in foreman - problems with salt-api added
I noticed that this was solved in the other thread. That error appears to be different than the one that I'm seeing. Here's a little more info:
production.log:
Started GET "/salt/salt_modules/import?proxy=1-salt-foreman-wx-noaa-gov" for 137.75.200.190 at 2015-08-20 11:16:56 -0400
2015-08-20 11:16:57 [I] Processing by ForemanSalt::SaltModulesController#import as HTML
2015-08-20 11:16:57 [I] Parameters: {"proxy"=>"1-salt-foreman-wx-noaa-gov"}
2015-08-20 11:16:57 [W] Operation FAILED: ERF12-4701 [ProxyAPI::ProxyException]: Unable to fetch Salt states list ([ProxyAPI::ProxyException]: ERF12-7301 [ProxyAPI::ProxyException]: Unable to fetch Salt environments list ([RestCli...) for proxy https://salt-foreman.wx.noaa.gov:8443/salt/
I noted that they fixed it with edits to the sudoers file, I've added the entries detailed in the wiki and my secure log shows no problems with logins. This is on CentOS 7.1.
Additionally, I tested SeLinux as well and it's not receiving any denials from that either.
Charles Burton wrote:
Additionally, I tested SeLinux as well and it's not receiving any denials from that either.
Im also having the same issue. :/
I just noticed that I failed to mention which version of foreman I'm using. I'm using foreman 1.8.2 with foreman-proxy-salt 2.0.
I upgraded to foreman 1.9 and I'm still getting the same behaviour.
I think the error might be related to something wrong with foreman-node. When I run foreman-node manually I get this:
|
| Started GET "/salt/node/salt-minion1.wx.noaa.gov?format=yml" for 137.75.232.199 at 2015-08-24 15:39:50 -0400
2015-08-24 15:39:50 [app] [I] Processing by ForemanSalt::MinionsController#node as YML
2015-08-24 15:39:50 [app] [I] Parameters: {"id"=>"salt-minion1.wx.noaa.gov"}
2015-08-24 15:39:50 [app] [W] Failed to generate external nodes for salt-minion1.wx.noaa.gov with PGError: ERROR: column reference "name" is ambiguous
| LINE 1: SELECT name FROM "salt_modules" INNER JOIN "salt_module_envi...
| ^
| : SELECT name FROM "salt_modules" INNER JOIN "salt_module_environments" ON "salt_module_environments"."salt_module_id" = "salt_modules"."id" INNER JOIN "salt_environments" ON "salt_environments"."id" = "salt_module_environments"."salt_environment_id" WHERE "salt_module_environments"."salt_environment_id" = 1 AND "salt_modules"."id" IN (2) ORDER BY salt_modules.name
I rebuilt foreman with version 1.9 and salt 3.0. The imports work now using salt-api.
- Status changed from New to Need more information
Is everything working OK for you now?
Mostly, yes. I'm trying to figure out how to use more than one environment using hostgroups but other than that everything appears to be working correctly now.
Just to fill in a little more. I updated to 1.9.0 and migrated over to using the salt-api, that seems to work very well for importing states and environments.
As a heads up, the newest version of salt version 2015.8 has issues with foreman and state imports as well. If you have something like this:
base:
- /srv/salt/base/states
and in that states directory you have a state file like this:
test/init.sls
It removes it from foreman.
- Status changed from Need more information to Closed
I haven't seen that with 2015.8, but that should be a separate issue please if you still see it, thanks.
Closing this one.
Also available in: Atom
PDF