Foreman-node Returning Mostly Empty YAML from Salt Minions

Hi,

Running foreman 1.11 and saltstack 2015.5.8. I'm having trouble getting
grains data into Foreman and it seems like it stems from foreman-node. When
I run foreman-node myhost1 it returns more or less empty YAML:

··· --- classes: [] parameters: puppetmaster: '' root_pw: foreman_subnets: [] foreman_interfaces: - mac: ip: type: Interface name: myhost1.domain1.com attrs: {} virtual: false link: true identifier: managed: true primary: true provision: true subnet: environment: base

Is there any way to pass a debug option to the foreman-node application to
get more information about why grains data is showing up empty? For what
it’s worth, the grains cache on the salt master does show plenty of valid
grains data for this client. salt-run cache.grains for this minion has all
the data I would expect.

Thanks!

You might want to start with Foreman's log at
/var/log/foreman/production.log. You'd probably see a facts upload
(containing the grains) and another to retrieve the YAML. Logs may
indicate if it's failing, or hostnames don't match what you'd expect.

··· On 13/05/16 03:00, newmanium wrote: > Hi, > > Running foreman 1.11 and saltstack 2015.5.8. I'm having trouble getting > grains data into Foreman and it seems like it stems from foreman-node. > When I run foreman-node myhost1 it returns more or less empty YAML: > > > --- > classes: [] > parameters: > puppetmaster: '' > root_pw: > foreman_subnets: [] > foreman_interfaces: > - mac: > ip: > type: Interface > name: myhost1.domain1.com > attrs: {} > virtual: false > link: true > identifier: > managed: true > primary: true > provision: true > subnet: > environment: base > > Is there any way to pass a debug option to the foreman-node application > to get more information about why grains data is showing up empty? For > what it's worth, the grains cache on the salt master does show plenty of > valid grains data for this client. salt-run cache.grains for this minion > has all the data I would expect.


Dominic Cleal
dominic@cleal.org

I'm getting a warning "Validation failed: Name has already been taken", but
I would think that's expected since, yes, the host does already exist in
Foreman. It's just missing facts, missing the salt_master: item in the
YAML, and doesn't appear with the Salt-related buttons in GUI.

2016-05-13T11:49:13 [app] [I] Started POST "/api/hosts/facts" for
10.2.4.215 at 2016-05-13 11:49:13 -0500
2016-05-13T11:49:13 [app] [I] Processing by Api::V2::HostsController#facts
as JSON
2016-05-13T11:49:13 [app] [I] Parameters:
{"name"=>"mymaster1.domain1.com", "facts"=>"[FILTERED]", "apiv"=>"v2",
:host=>{"name"=>"mymaster1.domain1.com"}}
2016-05-13T11:49:13 [app] [W] Action failed
> ActiveRecord::RecordInvalid: Validation failed: Name has already been
taken
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/validations.rb:57:in
save!' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/attribute_methods/dirty.rb:29:insave!'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:273:in
block in save!' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:329:inblock in with_transaction_returning_status'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in
block in transaction' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:209:inwithin_new_transaction'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in
transaction' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:208:intransaction'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:326:in
with_transaction_returning_status' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:273:insave!'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/protected_attributes-1.1.3/lib/active_record/mass_assignment_security/validations.rb:17:in
create!' > /usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:33:inblock in add_missing_facts'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:26:in
each' > /usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:26:inadd_missing_facts'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:21:in
add_new_facts' > /usr/share/foreman/app/services/fact_importer.rb:40:inimport!'
> /usr/share/foreman/app/models/host/base.rb:148:in import_facts' > /usr/share/foreman/app/models/host/managed.rb:462:inimport_host_and_facts'
> /usr/share/foreman/app/controllers/api/v2/hosts_controller.rb:236:in
facts' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/implicit_render.rb:4:insend_action'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/base.rb:189:in
process_action' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rendering.rb:10:inprocess_action'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/callbacks.rb:20:in
block in process_action' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:113:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:113:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:552:inblock (2 levels) in compile'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
block (2 levels) in around' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
block (2 levels) in halting' > /usr/share/foreman/app/controllers/api/v2/base_controller.rb:152:indisable_json_root'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in
block in make_lambda' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
block in halting' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
block in around' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:inblock (2 levels) in around'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:inblock (2 levels) in halting'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in
around' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:inpublic_send'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in
block in make_lambda' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
block in halting' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
block in around' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:inblock (2 levels) in around'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:inblock (2 levels) in halting'
> /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in
set_timezone' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:inblock in make_lambda'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:inblock in halting'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:inblock in around'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
block (2 levels) in around' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
block (2 levels) in halting' > /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:inclear_thread'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in
block in make_lambda' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
block in halting' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
block in around' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:inblock (2 levels) in around'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:inblock (2 levels) in halting'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in
around' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:inpublic_send'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in
block in make_lambda' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
block in halting' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
block in around' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:86:inrun_callbacks'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/callbacks.rb:19:in
process_action' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rescue.rb:29:inprocess_action'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/instrumentation.rb:32:in
block in process_action' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:159:inblock in instrument'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/notifications/instrumenter.rb:20:in
instrument' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:159:ininstrument'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/instrumentation.rb:30:in
process_action' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/params_wrapper.rb:250:inprocess_action'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/railties/controller_runtime.rb:18:in
process_action' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/base.rb:136:inprocess'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionview-4.1.14.2/lib/action_view/rendering.rb:30:in
process' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal.rb:196:indispatch'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rack_delegation.rb:13:in
dispatch' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal.rb:232:inblock in action'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:80:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:80:indispatch'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:48:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/mapper.rb:45:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:73:in
block in call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:59:ineach'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:59:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:690:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/apipie-rails-0.3.6/lib/apipie/static_dispatcher.rb:65:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/apipie-rails-0.3.6/lib/apipie/extractor/recorder.rb:132:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/apipie-rails-0.3.6/lib/apipie/middleware/checksum_in_headers.rb:27:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/etag.rb:23:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/conditionalget.rb:35:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/head.rb:11:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/params_parser.rb:27:in
call' > /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/flash.rb:254:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:225:incontext'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:220:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/cookies.rb:562:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/query_cache.rb:36:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/callbacks.rb:29:in
block in call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:82:inrun_callbacks'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/callbacks.rb:27:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/remote_ip.rb:76:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/debug_exceptions.rb:17:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/show_exceptions.rb:30:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/railties-4.1.14.2/lib/rails/rack/logger.rb:38:in
call_app' > /usr/share/foreman/vendor/ruby/2.0.0/gems/railties-4.1.14.2/lib/rails/rack/logger.rb:22:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/request_id.rb:21:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/methodoverride.rb:21:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/runtime.rb:17:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/cache/strategy/local_cache_middleware.rb:26:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/static.rb:84:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/sendfile.rb:112:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/railties-4.1.14.2/lib/rails/engine.rb:514:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/railties-4.1.14.2/lib/rails/application.rb:144:incall'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/railties-4.1.14.2/lib/rails/railtie.rb:194:in
public_send' > /usr/share/foreman/vendor/ruby/2.0.0/gems/railties-4.1.14.2/lib/rails/railtie.rb:194:inmethod_missing'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:138:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/urlmap.rb:65:inblock in call'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in
each' > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/urlmap.rb:50:incall'
>
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:77:in
process_request' > /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:142:inaccept_and_process_next_request'
>
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in
main_loop' > /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:448:inblock (3 levels) in start_threads'
>
/usr/share/foreman/vendor/ruby/2.0.0/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in
call' > /usr/share/foreman/vendor/ruby/2.0.0/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:inblock in create_with_logging_context'
2016-05-13T11:49:13 [app] [I] Rendered
api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout
(0.8ms)
2016-05-13T11:49:13 [app] [I] Completed 500 Internal Server Error in 33ms
(Views: 2.0ms | ActiveRecord: 3.8ms)
2016-05-13T11:49:13 [app] [I] Started GET
"/salt/node/mymaster1.domain1.com?format=yml" for 10.2.4.215 at 2016-05-13
11:49:13 -0500
2016-05-13T11:49:13 [app] [I] Processing by
ForemanSalt::MinionsController#node as YML
2016-05-13T11:49:13 [app] [I] Parameters: {"id"=>"mymaster1.domain1.com"}
2016-05-13T11:49:13 [app] [I] Rendered text template (0.0ms)
2016-05-13T11:49:13 [app] [I] Completed 200 OK in 39ms (Views: 0.7ms |
ActiveRecord: 4.3ms)

I have the salt-master on debug level logging, and all it shows during this
fo

> From: "newmanium" <kevinjnewman@gmail.com>
> To: "Foreman users" <foreman-users@googlegroups.com>
> Cc: dominic@cleal.org
> Sent: Friday, May 13, 2016 1:01:41 PM
> Subject: Re: [foreman-users] foreman-node Returning Mostly Empty YAML from Salt Minions
>
> I'm getting a warning "Validation failed: Name has already been taken", but
> I would think that's expected since, yes, the host does already exist in
> Foreman. It's just missing facts, missing the salt_master: item in the
> YAML, and doesn't appear with the Salt-related buttons in GUI.

There's a fix here for this error, just replace the line mentioned:
Bug #14689: ActiveRecord::RecordInvalid: Validation failed: Name has already been taken - Salt - Foreman

It'll make the next release for foreman_salt.

For the missing salt_master item in the ENC, this is tied to there actually
being a Salt master set on the host when you edit the host - is it?

··· ----- Original Message -----

2016-05-13T11:49:13 [app] [I] Started POST “/api/hosts/facts” for
10.2.4.215 at 2016-05-13 11:49:13 -0500
2016-05-13T11:49:13 [app] [I] Processing by Api::V2::HostsController#facts
as JSON
2016-05-13T11:49:13 [app] [I] Parameters:
{“name”=>“mymaster1.domain1.com”, “facts”=>"[FILTERED]", “apiv”=>“v2”,
:host=>{“name”=>“mymaster1.domain1.com”}}
2016-05-13T11:49:13 [app] [W] Action failed

ActiveRecord::RecordInvalid: Validation failed: Name has already been
taken

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/validations.rb:57:in
`save!’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/attribute_methods/dirty.rb:29:in
`save!’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:273:in
`block in save!’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:329:in
`block in with_transaction_returning_status’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in
`block in transaction’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in
`within_new_transaction’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in
`transaction’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:208:in
`transaction’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:326:in
`with_transaction_returning_status’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:273:in
`save!’

/usr/share/foreman/vendor/ruby/2.0.0/gems/protected_attributes-1.1.3/lib/active_record/mass_assignment_security/validations.rb:17:in
`create!’

/usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:33:in
`block in add_missing_facts’

/usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:26:in
`each’

/usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:26:in
`add_missing_facts’

/usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:21:in
`add_new_facts’

/usr/share/foreman/app/services/fact_importer.rb:40:in import!' /usr/share/foreman/app/models/host/base.rb:148:inimport_facts’
/usr/share/foreman/app/models/host/managed.rb:462:in
import_host_and_facts' /usr/share/foreman/app/controllers/api/v2/hosts_controller.rb:236:infacts’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/implicit_render.rb:4:in
`send_action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/base.rb:189:in
`process_action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rendering.rb:10:in
`process_action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/callbacks.rb:20:in
`block in process_action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:113:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:113:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:552:in
`block (2 levels) in compile’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
`block (2 levels) in around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
`block (2 levels) in halting’

/usr/share/foreman/app/controllers/api/v2/base_controller.rb:152:in
`disable_json_root’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in
`block in make_lambda’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
`block in halting’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
`block in around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
`block (2 levels) in around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
`block (2 levels) in halting’

/usr/share/foreman/vendor/ruby/2.0.0/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in
`around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in
`public_send’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in
`block in make_lambda’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
`block in halting’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
`block in around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
`block (2 levels) in around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
`block (2 levels) in halting’

/usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in
`set_timezone’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in
`block in make_lambda’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
`block in halting’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
`block in around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
`block (2 levels) in around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
`block (2 levels) in halting’

/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in
`clear_thread’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in
`block in make_lambda’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
`block in halting’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
`block in around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
`block (2 levels) in around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
`block (2 levels) in halting’

/usr/share/foreman/vendor/ruby/2.0.0/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in
`around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in
`public_send’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in
`block in make_lambda’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
`block in halting’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
`block in around’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:86:in
`run_callbacks’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/callbacks.rb:19:in
`process_action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rescue.rb:29:in
`process_action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/instrumentation.rb:32:in
`block in process_action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:159:in
`block in instrument’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/notifications/instrumenter.rb:20:in
`instrument’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:159:in
`instrument’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/instrumentation.rb:30:in
`process_action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/params_wrapper.rb:250:in
`process_action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/railties/controller_runtime.rb:18:in
`process_action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/base.rb:136:in
`process’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionview-4.1.14.2/lib/action_view/rendering.rb:30:in
`process’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal.rb:196:in
`dispatch’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rack_delegation.rb:13:in
`dispatch’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal.rb:232:in
`block in action’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:80:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:80:in
`dispatch’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:48:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/mapper.rb:45:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:73:in
`block in call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:59:in
`each’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:59:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:690:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/apipie-rails-0.3.6/lib/apipie/static_dispatcher.rb:65:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/apipie-rails-0.3.6/lib/apipie/extractor/recorder.rb:132:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/apipie-rails-0.3.6/lib/apipie/middleware/checksum_in_headers.rb:27:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/etag.rb:23:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/conditionalget.rb:35:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/head.rb:11:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/params_parser.rb:27:in
`call’

/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/flash.rb:254:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:225:in
`context’

/usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:220:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/cookies.rb:562:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/query_cache.rb:36:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/callbacks.rb:29:in
`block in call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:82:in
`run_callbacks’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/callbacks.rb:27:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/remote_ip.rb:76:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/debug_exceptions.rb:17:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in
`call’

/usr/share/foreman/vendor/ruby/2.0.0/gems/railties-4.1.14.2/lib/rails/rack/logg

Yep, that worked and fixed the issue. Thanks!

··· On Friday, May 13, 2016 at 12:07:06 PM UTC-5, stephen wrote: > > > > ----- Original Message ----- > > From: "newmanium" <kevinj...@gmail.com > > > To: "Foreman users" <forema...@googlegroups.com > > > Cc: dom...@cleal.org > > Sent: Friday, May 13, 2016 1:01:41 PM > > Subject: Re: [foreman-users] foreman-node Returning Mostly Empty YAML > from Salt Minions > > > > I'm getting a warning "Validation failed: Name has already been taken", > but > > I would think that's expected since, yes, the host does already exist in > > Foreman. It's just missing facts, missing the salt_master: item in the > > YAML, and doesn't appear with the Salt-related buttons in GUI. > > > There's a fix here for this error, just replace the line mentioned: > http://projects.theforeman.org/issues/14689 > > It'll make the next release for foreman_salt. > > For the missing salt_master item in the ENC, this is tied to there > actually > being a `Salt master` set on the host when you edit the host - is it? > > > > > > > > > 2016-05-13T11:49:13 [app] [I] Started POST "/api/hosts/facts" for > > 10.2.4.215 at 2016-05-13 11:49:13 -0500 > > 2016-05-13T11:49:13 [app] [I] Processing by > Api::V2::HostsController#facts > > as JSON > > 2016-05-13T11:49:13 [app] [I] Parameters: > > {"name"=>"mymaster1.domain1.com", "facts"=>"[FILTERED]", "apiv"=>"v2", > > :host=>{"name"=>"mymaster1.domain1.com"}} > > 2016-05-13T11:49:13 [app] [W] Action failed > > > ActiveRecord::RecordInvalid: Validation failed: Name has already been > > taken > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/validations.rb:57:in > > > `save!' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/attribute_methods/dirty.rb:29:in > > > `save!' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:273:in > > > `block in save!' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:329:in > > > `block in with_transaction_returning_status' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in > > > `block in transaction' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in > > > `within_new_transaction' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in > > > `transaction' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:208:in > > > `transaction' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:326:in > > > `with_transaction_returning_status' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:273:in > > > `save!' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/protected_attributes-1.1.3/lib/active_record/mass_assignment_security/validations.rb:17:in > > > `create!' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:33:in > > > `block in add_missing_facts' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:26:in > > > `each' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:26:in > > > `add_missing_facts' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/foreman_salt-5.0.0/app/services/foreman_salt/fact_importer.rb:21:in > > > `add_new_facts' > > > /usr/share/foreman/app/services/fact_importer.rb:40:in `import!' > > > /usr/share/foreman/app/models/host/base.rb:148:in `import_facts' > > > /usr/share/foreman/app/models/host/managed.rb:462:in > > `import_host_and_facts' > > > /usr/share/foreman/app/controllers/api/v2/hosts_controller.rb:236:in > > `facts' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/implicit_render.rb:4:in > > > `send_action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/base.rb:189:in > > > `process_action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rendering.rb:10:in > > > `process_action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/callbacks.rb:20:in > > > `block in process_action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:113:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:113:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:552:in > > > `block (2 levels) in compile' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in > > > `block (2 levels) in around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in > > > `block (2 levels) in halting' > > > /usr/share/foreman/app/controllers/api/v2/base_controller.rb:152:in > > `disable_json_root' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in > > > `block in make_lambda' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in > > > `block in halting' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in > > > `block in around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in > > > `block (2 levels) in around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in > > > `block (2 levels) in halting' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in > > > `around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in > > > `public_send' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in > > > `block in make_lambda' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in > > > `block in halting' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in > > > `block in around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in > > > `block (2 levels) in around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in > > > `block (2 levels) in halting' > > > > /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in > > `set_timezone' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in > > > `block in make_lambda' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in > > > `block in halting' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in > > > `block in around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in > > > `block (2 levels) in around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in > > > `block (2 levels) in halting' > > > > /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in > > `clear_thread' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in > > > `block in make_lambda' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in > > > `block in halting' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in > > > `block in around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in > > > `block (2 levels) in around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in > > > `block (2 levels) in halting' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in > > > `around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in > > > `public_send' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in > > > `block in make_lambda' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in > > > `block in halting' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in > > > `block in around' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:86:in > > > `run_callbacks' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/callbacks.rb:19:in > > > `process_action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rescue.rb:29:in > > > `process_action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/instrumentation.rb:32:in > > > `block in process_action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:159:in > > > `block in instrument' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/notifications/instrumenter.rb:20:in > > > `instrument' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:159:in > > > `instrument' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/instrumentation.rb:30:in > > > `process_action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/params_wrapper.rb:250:in > > > `process_action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/railties/controller_runtime.rb:18:in > > > `process_action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/abstract_controller/base.rb:136:in > > > `process' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionview-4.1.14.2/lib/action_view/rendering.rb:30:in > > > `process' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal.rb:196:in > > > `dispatch' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rack_delegation.rb:13:in > > > `dispatch' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_controller/metal.rb:232:in > > > `block in action' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:80:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:80:in > > > `dispatch' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:48:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/mapper.rb:45:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:73:in > > > `block in call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:59:in > > > `each' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:59:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:690:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/apipie-rails-0.3.6/lib/apipie/static_dispatcher.rb:65:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/apipie-rails-0.3.6/lib/apipie/extractor/recorder.rb:132:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/apipie-rails-0.3.6/lib/apipie/middleware/checksum_in_headers.rb:27:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/etag.rb:23:in > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/conditionalget.rb:35:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/head.rb:11:in > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/params_parser.rb:27:in > > > `call' > > > /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/flash.rb:254:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:225:in > > > `context' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:220:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/cookies.rb:562:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/query_cache.rb:36:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/callbacks.rb:29:in > > > `block in call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:82:in > > > `run_callbacks' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/callbacks.rb:27:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/remote_ip.rb:76:in > > > `call' > > > > > > /usr/share/foreman/vendor/ruby/2.0.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/debug_exceptions.rb:17:in > > > `call' > > > > > >