Editing host in 1.8.0&1.8.1 after upgrade gives "Warning! undefined method `uniq' for nil:NilClass"

When I try editing a host post upgrade from 1.7 I get the following error:
NoMethodError
*undefined method uniq' for nil:NilClass* app/controllers/hosts_controller.rb:94:inedit'
app/controllers/concerns/application_shared.rb:13:in set_timezone' app/models/concerns/foreman/thread_session.rb:32:inclear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

Anyone got any ideas why this is occurring?

Matt

Installed via rpm on a Centos 6 machine. Note, it was originally a 1.6
system that was upgraded to 1.6 so its possible it is due to the db field
missing or something.

··· On Thursday, May 21, 2015 at 2:03:36 PM UTC+10, Matthew Wilmott wrote: > > When I try editing a host post upgrade from 1.7 I get the following error: > *NoMethodError* > *undefined method `uniq' for nil:NilClass* > app/controllers/hosts_controller.rb:94:in `edit' > app/controllers/concerns/application_shared.rb:13:in `set_timezone' > app/models/concerns/foreman/thread_session.rb:32:in `clear_thread' > lib/middleware/catch_json_parse_errors.rb:9:in `call' > > Anyone got any ideas why this is occurring? > > Matt >

Hi Matthew,

It's a bit hard to debug with just that information, can you post a bit
more of the log?

Does this happen with hosts that were there before the upgrade, or does
this happen with new hosts as well? I suspect it might have to do with
a failure (sorry) on the migration of interfaces from the 1.7 model to
1.8 (it changed significantly).

Let us know, also on #theforeman on IRC we can try debugging this live,
I'm there mostly during European/US east coast business hours, but
there's other people all day round.

··· On 05/20, Matthew Wilmott wrote: > Installed via rpm on a Centos 6 machine. Note, it was originally a 1.6 > system that was upgraded to 1.6 so its possible it is due to the db field > missing or something. > > On Thursday, May 21, 2015 at 2:03:36 PM UTC+10, Matthew Wilmott wrote: > > > > When I try editing a host post upgrade from 1.7 I get the following error: > > *NoMethodError* > > *undefined method `uniq' for nil:NilClass* > > app/controllers/hosts_controller.rb:94:in `edit' > > app/controllers/concerns/application_shared.rb:13:in `set_timezone' > > app/models/concerns/foreman/thread_session.rb:32:in `clear_thread' > > lib/middleware/catch_json_parse_errors.rb:9:in `call' > > > > Anyone got any ideas why this is occurring? > > > > Matt > > > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Daniel Lobato Garcia

@eLobatoss
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato

You'll probably need to enable debugging to get more information:

http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging

··· On 21/05/15 08:18, Daniel Lobato Garcia wrote: > It's a bit hard to debug with just that information, can you post a bit > more of the log?


Dominic Cleal
Red Hat Engineering

Ok thanks for the info, I've fixed it once I had debugging enabled.
Apologies for not doing so earlier, didnt have time to dive into it
yesterday.

So the issue was related to the Salt plugin, removing the
rpm, ruby193-rubygem-foreman_salt.noarch 0:2.1.0-1.el6 fixed the issue.
Also I had to remove the mco gem, ruby193-rubygem-foreman-mco after first
update as well as it prevented even overview page to load.

This was the debug trace for the original issue,

Started GET "/hosts/foreman.url/edit" for ip.address at 2015-05-22 08:52:45
+1000
2015-05-22 08:52:45 [I] Processing by HostsController#edit as HTML
2015-05-22 08:52:45 [I] Parameters: {"id"=>"foreman.url"}
2015-05-22 08:52:45 [D] User Load (0.2ms) SELECT users.* FROM users
WHERE users.id = 15 LIMIT 1
2015-05-22 08:52:45 [D] Setting current user thread-local variable to
mwilmott
2015-05-22 08:52:45 [D] Usergroup Load (0.1ms) SELECT usergroups.*
FROM usergroups INNER JOIN cached_usergroup_members ON
usergroups.id = cached_usergroup_members.usergroup_id WHERE
cached_usergroup_members.user_id = 15 ORDER BY usergroups.name
2015-05-22 08:52:45 [D] (0.1ms) SELECT COUNT() FROM taxonomies WHERE
taxonomies.type IN ('Organization')
2015-05-22 08:52:45 [D] Setting current organization thread-local variable
to none
2015-05-22 08:52:45 [D] (0.1ms) SELECT COUNT(
) FROM taxonomies WHERE
taxonomies.type IN ('Location')
2015-05-22 08:52:45 [D] Setting current location thread-local variable to
none
2015-05-22 08:52:45 [D] AuthSource Load (0.1ms) SELECT auth_sources.*
FROM auth_sources WHERE auth_sources.id = 2 LIMIT 1
2015-05-22 08:52:45 [D] (0.1ms) SELECT id FROM taxonomies WHERE
taxonomies.type IN ('Location') LIMIT 1
2015-05-22 08:52:45 [D] (0.1ms) SELECT id FROM taxonomies WHERE
taxonomies.type IN ('Organization') LIMIT 1
2015-05-22 08:52:45 [D] Host::Managed Load (0.1ms) SELECT hosts.* FROM
hosts WHERE hosts.type IN ('Host::Managed') AND hosts.name =
'foreman.url' LIMIT 1
2015-05-22 08:52:45 [D] Organization Load (0.1ms) SELECT taxonomies.*
FROM taxonomies WHERE taxonomies.type IN ('Organization') AND
taxonomies.id = 2 ORDER BY title LIMIT 1
2015-05-22 08:52:45 [D] Location Load (0.1ms) SELECT taxonomies.* FROM
taxonomies WHERE taxonomies.type IN ('Location') AND
taxonomies.id = 1 ORDER BY title LIMIT 1
2015-05-22 08:52:45 [D] Hostgroup Load (0.1ms) SELECT hostgroups.*
FROM hostgroups WHERE hostgroups.id = 4 ORDER BY hostgroups.title
LIMIT 1
2015-05-22 08:52:45 [D] Hostgroup Load (0.1ms) SELECT hostgroups.*
FROM hostgroups WHERE hostgroups.id IN (2, 3) ORDER BY (case when
hostgroups.ancestry is null then 0 else 1 end), hostgroups.ancestry
2015-05-22 08:52:45 [D] (0.1ms) SELECT salt_modules.id FROM
salt_modules INNER JOIN hostgroup_salt_modules ON salt_modules.id =
hostgroup_salt_modules.salt_module_id WHERE
hostgroup_salt_modules.hostgroup_id = 2 ORDER BY salt_modules.name
2015-05-22 08:52:45 [D] (0.1ms) SELECT salt_modules.id FROM
salt_modules INNER JOIN hostgroup_salt_modules ON salt_modules.id =
hostgroup_salt_modules.salt_module_id WHERE
hostgroup_salt_modules.hostgroup_id = 3 ORDER BY salt_modules.name
2015-05-22 08:52:45 [W] Operation FAILED: undefined method uniq' for nil:NilClass 2015-05-22 08:52:45 [D] /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:31:ininherited_salt_module_ids'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:26:in
inherited_salt_modules' /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:19:inall_salt_modules'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/controllers/foreman_salt/concerns/hosts_controller_extensions.rb:29:in
load_vars_for_ajax_with_salt_modules' /usr/share/foreman/app/controllers/hosts_controller.rb:94:inedit'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in
send_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:inprocess_action'

··· On Thursday, May 21, 2015 at 5:47:20 PM UTC+10, Dominic Cleal wrote: > > On 21/05/15 08:18, Daniel Lobato Garcia wrote: > > It's a bit hard to debug with just that information, can you post a bit > > more of the log? > > You'll probably need to enable debugging to get more information: > > > http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging > > -- > Dominic Cleal > Red Hat Engineering >

Oh and to clarify, it was occurring for all hosts not just recently added
hosts, although that's probably now obvious from the trace.

The only other issue we are seeing now are network snippets, in particular,
network.centos appear to refer to a missing attribute. After install, the
snippets read, interface.network.mask which failed until we updated them to
interface.subnet.mask. I'm not certain that is an issue with the rpm or
just a legacy thing regarding our templates…

Matt

··· On Friday, May 22, 2015 at 9:06:56 AM UTC+10, Matthew Wilmott wrote: > > Ok thanks for the info, I've fixed it once I had debugging enabled. > Apologies for not doing so earlier, didnt have time to dive into it > yesterday. > > So the issue was related to the Salt plugin, removing the > rpm, ruby193-rubygem-foreman_salt.noarch 0:2.1.0-1.el6 fixed the issue. > Also I had to remove the mco gem, ruby193-rubygem-foreman-mco after first > update as well as it prevented even overview page to load. > > This was the debug trace for the original issue, > > Started GET "/hosts/foreman.url/edit" for ip.address at 2015-05-22 > 08:52:45 +1000 > 2015-05-22 08:52:45 [I] Processing by HostsController#edit as HTML > 2015-05-22 08:52:45 [I] Parameters: {"id"=>"foreman.url"} > 2015-05-22 08:52:45 [D] User Load (0.2ms) SELECT `users`.* FROM `users` > WHERE `users`.`id` = 15 LIMIT 1 > 2015-05-22 08:52:45 [D] Setting current user thread-local variable to > mwilmott > 2015-05-22 08:52:45 [D] Usergroup Load (0.1ms) SELECT `usergroups`.* > FROM `usergroups` INNER JOIN `cached_usergroup_members` ON > `usergroups`.`id` = `cached_usergroup_members`.`usergroup_id` WHERE > `cached_usergroup_members`.`user_id` = 15 ORDER BY usergroups.name > 2015-05-22 08:52:45 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` > WHERE `taxonomies`.`type` IN ('Organization') > 2015-05-22 08:52:45 [D] Setting current organization thread-local variable > to none > 2015-05-22 08:52:45 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` > WHERE `taxonomies`.`type` IN ('Location') > 2015-05-22 08:52:45 [D] Setting current location thread-local variable to > none > 2015-05-22 08:52:45 [D] AuthSource Load (0.1ms) SELECT `auth_sources`.* > FROM `auth_sources` WHERE `auth_sources`.`id` = 2 LIMIT 1 > 2015-05-22 08:52:45 [D] (0.1ms) SELECT id FROM `taxonomies` WHERE > `taxonomies`.`type` IN ('Location') LIMIT 1 > 2015-05-22 08:52:45 [D] (0.1ms) SELECT id FROM `taxonomies` WHERE > `taxonomies`.`type` IN ('Organization') LIMIT 1 > 2015-05-22 08:52:45 [D] Host::Managed Load (0.1ms) SELECT `hosts`.* > FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`name` = > 'foreman.url' LIMIT 1 > 2015-05-22 08:52:45 [D] Organization Load (0.1ms) SELECT `taxonomies`.* > FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Organization') AND > `taxonomies`.`id` = 2 ORDER BY title LIMIT 1 > 2015-05-22 08:52:45 [D] Location Load (0.1ms) SELECT `taxonomies`.* > FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') AND > `taxonomies`.`id` = 1 ORDER BY title LIMIT 1 > 2015-05-22 08:52:45 [D] Hostgroup Load (0.1ms) SELECT `hostgroups`.* > FROM `hostgroups` WHERE `hostgroups`.`id` = 4 ORDER BY hostgroups.title > LIMIT 1 > 2015-05-22 08:52:45 [D] Hostgroup Load (0.1ms) SELECT `hostgroups`.* > FROM `hostgroups` WHERE `hostgroups`.`id` IN (2, 3) ORDER BY (case when > hostgroups.ancestry is null then 0 else 1 end), hostgroups.ancestry > 2015-05-22 08:52:45 [D] (0.1ms) SELECT `salt_modules`.id FROM > `salt_modules` INNER JOIN `hostgroup_salt_modules` ON `salt_modules`.`id` = > `hostgroup_salt_modules`.`salt_module_id` WHERE > `hostgroup_salt_modules`.`hostgroup_id` = 2 ORDER BY salt_modules.name > 2015-05-22 08:52:45 [D] (0.1ms) SELECT `salt_modules`.id FROM > `salt_modules` INNER JOIN `hostgroup_salt_modules` ON `salt_modules`.`id` = > `hostgroup_salt_modules`.`salt_module_id` WHERE > `hostgroup_salt_modules`.`hostgroup_id` = 3 ORDER BY salt_modules.name > 2015-05-22 08:52:45 [W] Operation FAILED: undefined method `uniq' for > nil:NilClass > 2015-05-22 08:52:45 [D] > /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:31:in > `inherited_salt_module_ids' > /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:26:in > `inherited_salt_modules' > /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:19:in > `all_salt_modules' > /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/controllers/foreman_salt/concerns/hosts_controller_extensions.rb:29:in > `load_vars_for_ajax_with_salt_modules' > /usr/share/foreman/app/controllers/hosts_controller.rb:94:in `edit' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in > `send_action' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in > `process_action' > > > > On Thursday, May 21, 2015 at 5:47:20 PM UTC+10, Dominic Cleal wrote: >> >> On 21/05/15 08:18, Daniel Lobato Garcia wrote: >> > It's a bit hard to debug with just that information, can you post a bit >> > more of the log? >> >> You'll probably need to enable debugging to get more information: >> >> >> http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging >> >> -- >> Dominic Cleal >> Red Hat Engineering >> >

So I've updated the foreman instance to 1.8.2 and that worked fine so I
thought i'd revisit the Salt plugin again to see if I could get it running.

Upon installing the ruby193-rubygem-foreman_salt-2.1.0-1.el6.noarch, Im
faced with the same error upon editing a host. I've attached the stacktrace
below, the assumption here is a migration or similar has failed, can
someone point us in the right direction to resolve this? I've tried
rerunning the foreman-rake migrate and seed tasks to no positive affect
although there are no issues outputted (can clearly see the Salt seed task
running without issue)

Thanks
Matt

Here is the latest stack trace:

2015-06-19 12:10:08 [I]

Started GET "/hosts/hostname/edit" for ip.add.re.ss at 2015-06-19 12:10:08
+1000
2015-06-19 12:10:08 [I] Processing by HostsController#edit as HTML
2015-06-19 12:10:08 [I] Parameters: {"id"=>"hostname"}
2015-06-19 12:10:08 [D] User Load (0.1ms) SELECT users.* FROM users
WHERE users.id = 15 LIMIT 1
2015-06-19 12:10:08 [D] Setting current user thread-local variable to
mwilmott
2015-06-19 12:10:08 [D] Usergroup Load (0.1ms) SELECT usergroups.*
FROM usergroups INNER JOIN cached_usergroup_members ON
usergroups.id = cached_usergroup_members.usergroup_id WHERE
cached_usergroup_members.user_id = 15 ORDER BY usergroups.name
2015-06-19 12:10:08 [D] (0.1ms) SELECT COUNT() FROM taxonomies WHERE
taxonomies.type IN ('Organization')
2015-06-19 12:10:08 [D] Setting current organization thread-local variable
to none
2015-06-19 12:10:08 [D] (0.1ms) SELECT COUNT(
) FROM taxonomies WHERE
taxonomies.type IN ('Location')
2015-06-19 12:10:08 [D] Setting current location thread-local variable to
none
2015-06-19 12:10:08 [D] AuthSource Load (0.1ms) SELECT auth_sources.*
FROM auth_sources WHERE auth_sources.id = 2 LIMIT 1
2015-06-19 12:10:08 [D] (0.1ms) SELECT id FROM taxonomies WHERE
taxonomies.type IN ('Location') LIMIT 1
2015-06-19 12:10:08 [D] (0.1ms) SELECT id FROM taxonomies WHERE
taxonomies.type IN ('Organization') LIMIT 1
2015-06-19 12:10:08 [D] Host::Managed Load (0.5ms) SELECT hosts.* FROM
hosts WHERE hosts.type IN ('Host::Managed') AND hosts.name =
'hostname' LIMIT 1
2015-06-19 12:10:08 [D] Organization Load (0.1ms) SELECT taxonomies.*
FROM taxonomies WHERE taxonomies.type IN ('Organization') AND
taxonomies.id = 2 ORDER BY title LIMIT 1
2015-06-19 12:10:08 [D] Location Load (0.1ms) SELECT taxonomies.* FROM
taxonomies WHERE taxonomies.type IN ('Location') AND
taxonomies.id = 1 ORDER BY title LIMIT 1
2015-06-19 12:10:08 [D] Hostgroup Load (0.1ms) SELECT hostgroups.*
FROM hostgroups WHERE hostgroups.id = 11 ORDER BY hostgroups.title
LIMIT 1
2015-06-19 12:10:08 [D] Hostgroup Load (0.1ms) SELECT hostgroups.*
FROM hostgroups WHERE hostgroups.id IN (2, 3) ORDER BY (case when
hostgroups.ancestry is null then 0 else 1 end), hostgroups.ancestry
2015-06-19 12:10:08 [D] (0.1ms) SELECT salt_modules.id FROM
salt_modules INNER JOIN hostgroup_salt_modules ON salt_modules.id =
hostgroup_salt_modules.salt_module_id WHERE
hostgroup_salt_modules.hostgroup_id = 2 ORDER BY salt_modules.name
2015-06-19 12:10:08 [D] (0.1ms) SELECT salt_modules.id FROM
salt_modules INNER JOIN hostgroup_salt_modules ON salt_modules.id =
hostgroup_salt_modules.salt_module_id WHERE
hostgroup_salt_modules.hostgroup_id = 3 ORDER BY salt_modules.name
2015-06-19 12:10:08 [W] Operation FAILED: undefined method uniq' for nil:NilClass 2015-06-19 12:10:08 [D] /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:31:ininherited_salt_module_ids'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:26:in
inherited_salt_modules' /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:19:inall_salt_modules'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/controllers/foreman_salt/concerns/hosts_controller_extensions.rb:29:in
load_vars_for_ajax_with_salt_modules' /usr/share/foreman/app/controllers/hosts_controller.rb:94:inedit'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in
send_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:inprocess_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:inblock in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:660:in
block (4 levels) in _run__4511053015225450787__process_action__2131573909871548317__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:inblock in _conditional_callback_around_8483'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
around' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in_callback_around_2707'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_8483' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:626:inblock (3 levels) in
_run__4511053015225450787__process_action__2131573909871548317__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_8482' /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:inset_timezone'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_8482' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:625:inblock (2 levels) in
_run__4511053015225450787__process_action__2131573909871548317__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_8481' /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:inclear_thread'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_8481' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:448:inblock in
_run__4511053015225450787__process_action__2131573909871548317__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_8480' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:inaround'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
_callback_around_13' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in_conditional_callback_around_8480'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in
_run__4511053015225450787__process_action__2131573909871548317__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
_run_process_action_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:inrun_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:inprocess_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in
block in process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:inblock in instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in
instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:ininstrument'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:inprocess_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:inprocess'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:indispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in
dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:inblock in action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:indispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:inblock in call'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
each' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in
call' /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:incontext'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in
block in call' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in_run__1183240788089887311__call__541468574888452291__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in_run_call_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:incall_app'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:inforward'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in
fetch' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:inlookup'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in
call!' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in
method_missing' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in
block in call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:ineach'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
call' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:inprocess_request'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in
accept_and_process_next_request' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:inmain_loop'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in
`block (3 levels) in start_threads'
2015-06-19 12:10:08 [I] Rendered common/500.html.erb within
layouts/application (12.9ms)
2015-06-19 12:10:08 [I] Rendered layouts/base.html.erb (2.8ms)
2015-06-19 12:10:08 [I] Completed 500 Internal Server Error in 117ms
(Views: 20.8ms | ActiveRecord: 5.7ms)

  • show quoted text -
··· On Friday, May 22, 2015 at 9:11:06 AM UTC+10, Matthew Wilmott wrote: > > Oh and to clarify, it was occurring for all hosts not just recently added > hosts, although that's probably now obvious from the trace. > > The only other issue we are seeing now are network snippets, in > particular, network.centos appear to refer to a missing attribute. After > install, the snippets read, interface.network.mask which failed until we > updated them to interface.subnet.mask. I'm not certain that is an issue > with the rpm or just a legacy thing regarding our templates.... > > Matt > > > On Friday, May 22, 2015 at 9:06:56 AM UTC+10, Matthew Wilmott wrote: >> >> Ok thanks for the info, I've fixed it once I had debugging enabled. >> Apologies for not doing so earlier, didnt have time to dive into it >> yesterday. >> >> So the issue was related to the Salt plugin, removing the >> rpm, ruby193-rubygem-foreman_salt.noarch 0:2.1.0-1.el6 fixed the issue. >> Also I had to remove the mco gem, ruby193-rubygem-foreman-mco after first >> update as well as it prevented even overview page to load. >> >> This was the debug trace for the original issue, >> >> Started GET "/hosts/foreman.url/edit" for ip.address at 2015-05-22 >> 08:52:45 +1000 >> 2015-05-22 08:52:45 [I] Processing by HostsController#edit as HTML >> 2015-05-22 08:52:45 [I] Parameters: {"id"=>"foreman.url"} >> 2015-05-22 08:52:45 [D] User Load (0.2ms) SELECT `users`.* FROM >> `users` WHERE `users`.`id` = 15 LIMIT 1 >> 2015-05-22 08:52:45 [D] Setting current user thread-local variable to >> mwilmott >> 2015-05-22 08:52:45 [D] Usergroup Load (0.1ms) SELECT `usergroups`.* >> FROM `usergroups` INNER JOIN `cached_usergroup_members` ON >> `usergroups`.`id` = `cached_usergroup_members`.`usergroup_id` WHERE >> `cached_usergroup_members`.`user_id` = 15 ORDER BY usergroups.name >> 2015-05-22 08:52:45 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` >> WHERE `taxonomies`.`type` IN ('Organization') >> 2015-05-22 08:52:45 [D] Setting current organization thread-local >> variable to none >> 2015-05-22 08:52:45 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` >> WHERE `taxonomies`.`type` IN ('Location') >> 2015-05-22 08:52:45 [D] Setting current location thread-local variable to >> none >> 2015-05-22 08:52:45 [D] AuthSource Load (0.1ms) SELECT >> `auth_sources`.* FROM `auth_sources` WHERE `auth_sources`.`id` = 2 LIMIT 1 >> 2015-05-22 08:52:45 [D] (0.1ms) SELECT id FROM `taxonomies` WHERE >> `taxonomies`.`type` IN ('Location') LIMIT 1 >> 2015-05-22 08:52:45 [D] (0.1ms) SELECT id FROM `taxonomies` WHERE >> `taxonomies`.`type` IN ('Organization') LIMIT 1 >> 2015-05-22 08:52:45 [D] Host::Managed Load (0.1ms) SELECT `hosts`.* >> FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`name` = >> 'foreman.url' LIMIT 1 >> 2015-05-22 08:52:45 [D] Organization Load (0.1ms) SELECT >> `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN >> ('Organization') AND `taxonomies`.`id` = 2 ORDER BY title LIMIT 1 >> 2015-05-22 08:52:45 [D] Location Load (0.1ms) SELECT `taxonomies`.* >> FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') AND >> `taxonomies`.`id` = 1 ORDER BY title LIMIT 1 >> 2015-05-22 08:52:45 [D] Hostgroup Load (0

Ok tracked down the issue
in /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb
line 31

self.class.sort_by_ancestry(ancestors.reject { |ancestor|
ancestor.salt_module_ids.empty? }).map(&:salt_module_ids).inject(&:+).uniq

only works when at least one salt module is defined. On a new instance that
isnt guaranteed therefore uniq fails on a nil set.

Matt

··· On Monday, June 22, 2015 at 11:35:54 AM UTC+10, Matthew Wilmott wrote: > > So I've updated the foreman instance to 1.8.2 and that worked fine so I > thought i'd revisit the Salt plugin again to see if I could get it running. > > Upon installing the ruby193-rubygem-foreman_salt-2.1.0-1.el6.noarch, Im > faced with the same error upon editing a host. I've attached the stacktrace > below, the assumption here is a migration or similar has failed, can > someone point us in the right direction to resolve this? I've tried > rerunning the foreman-rake migrate and seed tasks to no positive affect > although there are no issues outputted (can clearly see the Salt seed task > running without issue) > > Thanks > Matt > > Here is the latest stack trace: > > 2015-06-19 12:10:08 [I] > > Started GET "/hosts/hostname/edit" for ip.add.re.ss at 2015-06-19 12:10:08 > +1000 > 2015-06-19 12:10:08 [I] Processing by HostsController#edit as HTML > 2015-06-19 12:10:08 [I] Parameters: {"id"=>"hostname"} > 2015-06-19 12:10:08 [D] User Load (0.1ms) SELECT `users`.* FROM `users` > WHERE `users`.`id` = 15 LIMIT 1 > 2015-06-19 12:10:08 [D] Setting current user thread-local variable to > mwilmott > 2015-06-19 12:10:08 [D] Usergroup Load (0.1ms) SELECT `usergroups`.* > FROM `usergroups` INNER JOIN `cached_usergroup_members` ON > `usergroups`.`id` = `cached_usergroup_members`.`usergroup_id` WHERE > `cached_usergroup_members`.`user_id` = 15 ORDER BY usergroups.name > 2015-06-19 12:10:08 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` > WHERE `taxonomies`.`type` IN ('Organization') > 2015-06-19 12:10:08 [D] Setting current organization thread-local variable > to none > 2015-06-19 12:10:08 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` > WHERE `taxonomies`.`type` IN ('Location') > 2015-06-19 12:10:08 [D] Setting current location thread-local variable to > none > 2015-06-19 12:10:08 [D] AuthSource Load (0.1ms) SELECT `auth_sources`.* > FROM `auth_sources` WHERE `auth_sources`.`id` = 2 LIMIT 1 > 2015-06-19 12:10:08 [D] (0.1ms) SELECT id FROM `taxonomies` WHERE > `taxonomies`.`type` IN ('Location') LIMIT 1 > 2015-06-19 12:10:08 [D] (0.1ms) SELECT id FROM `taxonomies` WHERE > `taxonomies`.`type` IN ('Organization') LIMIT 1 > 2015-06-19 12:10:08 [D] Host::Managed Load (0.5ms) SELECT `hosts`.* > FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`name` = > 'hostname' LIMIT 1 > 2015-06-19 12:10:08 [D] Organization Load (0.1ms) SELECT `taxonomies`.* > FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Organization') AND > `taxonomies`.`id` = 2 ORDER BY title LIMIT 1 > 2015-06-19 12:10:08 [D] Location Load (0.1ms) SELECT `taxonomies`.* > FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') AND > `taxonomies`.`id` = 1 ORDER BY title LIMIT 1 > 2015-06-19 12:10:08 [D] Hostgroup Load (0.1ms) SELECT `hostgroups`.* > FROM `hostgroups` WHERE `hostgroups`.`id` = 11 ORDER BY hostgroups.title > LIMIT 1 > 2015-06-19 12:10:08 [D] Hostgroup Load (0.1ms) SELECT `hostgroups`.* > FROM `hostgroups` WHERE `hostgroups`.`id` IN (2, 3) ORDER BY (case when > hostgroups.ancestry is null then 0 else 1 end), hostgroups.ancestry > 2015-06-19 12:10:08 [D] (0.1ms) SELECT `salt_modules`.id FROM > `salt_modules` INNER JOIN `hostgroup_salt_modules` ON `salt_modules`.`id` = > `hostgroup_salt_modules`.`salt_module_id` WHERE > `hostgroup_salt_modules`.`hostgroup_id` = 2 ORDER BY salt_modules.name > 2015-06-19 12:10:08 [D] (0.1ms) SELECT `salt_modules`.id FROM > `salt_modules` INNER JOIN `hostgroup_salt_modules` ON `salt_modules`.`id` = > `hostgroup_salt_modules`.`salt_module_id` WHERE > `hostgroup_salt_modules`.`hostgroup_id` = 3 ORDER BY salt_modules.name > 2015-06-19 12:10:08 [W] Operation FAILED: undefined method `uniq' for > nil:NilClass > 2015-06-19 12:10:08 [D] > /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:31:in > `inherited_salt_module_ids' > /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:26:in > `inherited_salt_modules' > /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:19:in > `all_salt_modules' > /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/controllers/foreman_salt/concerns/hosts_controller_extensions.rb:29:in > `load_vars_for_ajax_with_salt_modules' > /usr/share/foreman/app/controllers/hosts_controller.rb:94:in `edit' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in > `send_action' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in > `process_action' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in > `process_action' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in > `block in process_action' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:660:in > `block (4 levels) in > _run__4511053015225450787__process_action__2131573909871548317__callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in > `block in _conditional_callback_around_8483' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in > `around' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in > `_callback_around_2707' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in > `_conditional_callback_around_8483' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:626:in > `block (3 levels) in > _run__4511053015225450787__process_action__2131573909871548317__callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in > `block in _conditional_callback_around_8482' > /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in > `set_timezone' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in > `_conditional_callback_around_8482' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:625:in > `block (2 levels) in > _run__4511053015225450787__process_action__2131573909871548317__callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in > `block in _conditional_callback_around_8481' > /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in > `clear_thread' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in > `_conditional_callback_around_8481' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:448:in > `block in > _run__4511053015225450787__process_action__2131573909871548317__callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in > `block in _conditional_callback_around_8480' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in > `around' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in > `_callback_around_13' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in > `_conditional_callback_around_8480' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in > `_run__4511053015225450787__process_action__2131573909871548317__callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in > `__run_callback' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in > `_run_process_action_callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in > `run_callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in > `process_action' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in > `process_action' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in > `block in process_action' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in > `block in instrument' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in > `instrument' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in > `instrument' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in > `process_action' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in > `process_action' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in > `process_action' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in > `process' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in > `process' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in > `dispatch' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in > `dispatch' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in > `block in action' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in > `dispatch' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in > `block in call' > /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in > `each' > /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in > `call' > /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in > `context' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in > `block in call' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in > `_run__1183240788089887311__call__541468574888452291__callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in > `__run_callback' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in > `_run_call_callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in > `run_callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in > `call_app' > /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in > `forward' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in > `fetch' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in > `lookup' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in > `call!' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in > `method_missing' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in > `block in call' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in > `each' > /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in > `call' > /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in > `process_request' > /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in > `accept_and_process_next_request' > /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in > `main_loop' > /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in > `block (3 levels) in start_threads' > 2015-06-19 12:10:08 [I] Rendered common/500.html.erb within > layouts/application (12.9ms) > 2015-06-19 12:10:08 [I] Rendered layouts/base.html.erb (2.8ms) > 2015-06-19 12:10:08 [I] Completed 500 Internal Server Error in 117ms > (Views: 20.8ms | ActiveRecord: 5.7ms) > - show quoted text - > > > On Friday, May 22, 2015 at 9:11:06 AM UTC+10, Matthew Wilmott wrote: >> >> Oh and to clarify, it was occurring for all hosts not just recently added >> hosts, although that's probably now obvious from the trace. >> >> The only other issue we are seeing now are network snippets, in >> particular, network.centos appear to refer to a missing attribute. After >> install, the snippets read, interface.network.mask which failed until we >> updated them to interface.subnet.mask. I'm not certain that is an issue >> with the rpm or just a legacy thing regarding our templates.... >> >> Matt >> >> >> On Friday, May 22, 2015 at 9:06:56 AM UTC+10, Matthew Wilmott wrote: >>> >>> Ok thanks for the info, I've fixed it once I had debugging enabled. >>> Apologies for not doing so earlier, didnt have time to dive into it >>> yesterday. >>> >>> So the issue was related to the Salt plugin, removing the >>> rpm, ruby193-rubygem-foreman_salt.noarch 0:2.1.0-1.el6 fixed the issue. >>> Also I had to remove the mco gem, ruby193-rubygem-foreman-mco after first >>> update as well as it prevented even overview page to load. >>> >>> This was the debug trace for the original issue, >>> >>> Started GET "/hosts/foreman.url/edit" for ip.address at 2015-05-22 >>> 08:52:45 +1000 >>> 2015-05-22 08:52:45 [I] Processing by HostsController#edit as HTML >>> 2015-05-22 08:52:45 [I] Parameters: {"id"=>"foreman.url"} >>> 2015-05-22 08:52:45 [D] User Load (0.2ms) SELECT `users`.* FROM >>> `users` WHERE `users`.`id` = 15 LIMIT 1 >>> 2015-05-22 08:52:45 [D] Setting current user thread-local variable to >>> mwilmott >>> 2015-05-22 08:52:45 [D] Usergroup Load (0.1ms) SELECT `usergroups`.* >>> FROM `usergroups` INNER JOIN `cached_usergroup_members` ON >>> `usergroups`.`id` = `cached_usergroup_members`.`usergroup_id` WHERE >>> `cached_usergroup_members`.`user_id` = 15 ORDER BY usergroups.name >>> 2015-05-22 08:52:45 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` >>> WHERE `taxonomies`.`type` IN ('Organization') >>> 2015-05-22 08:52:45 [D] Setting current organization thread-local >>> variable to none >>> 2015-05-22 08:52:45 [D] (0.1ms) S

Hello there, after running into the same error on Foreman 1.8.2 with the
salt plugin version 2.1 I asked on the foreman irc chan for a bugfix that I
can manually apply.

This gist was posted: https://gist.github.com/stbenjam/88c09a3f6b800e10765f

I applied it to our foreman instance and it fixes the problem, so I decided
to post it here for other people to find.
This will only work in Foreman 1.8 and the salt plugin version 2.1, as in
foreman 1.9 the salt plugin will switch to version 3.0 and this seems to
have been fixed already.

Cheers

··· On Monday, June 22, 2015 at 9:09:47 AM UTC+2, Matthew Wilmott wrote: > > Ok tracked down the issue > in /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb > line 31 > > self.class.sort_by_ancestry(ancestors.reject { |ancestor| > ancestor.salt_module_ids.empty? }).map(&:salt_module_ids).inject(&:+).uniq > > only works when at least one salt module is defined. On a new instance > that isnt guaranteed therefore uniq fails on a nil set. > > Matt > > > On Monday, June 22, 2015 at 11:35:54 AM UTC+10, Matthew Wilmott wrote: >> >> So I've updated the foreman instance to 1.8.2 and that worked fine so I >> thought i'd revisit the Salt plugin again to see if I could get it running. >> >> Upon installing the ruby193-rubygem-foreman_salt-2.1.0-1.el6.noarch, Im >> faced with the same error upon editing a host. I've attached the stacktrace >> below, the assumption here is a migration or similar has failed, can >> someone point us in the right direction to resolve this? I've tried >> rerunning the foreman-rake migrate and seed tasks to no positive affect >> although there are no issues outputted (can clearly see the Salt seed task >> running without issue) >> >> Thanks >> Matt >> >> Here is the latest stack trace: >> >> 2015-06-19 12:10:08 [I] >> >> Started GET "/hosts/hostname/edit" for ip.add.re.ss at 2015-06-19 >> 12:10:08 +1000 >> 2015-06-19 12:10:08 [I] Processing by HostsController#edit as HTML >> 2015-06-19 12:10:08 [I] Parameters: {"id"=>"hostname"} >> 2015-06-19 12:10:08 [D] User Load (0.1ms) SELECT `users`.* FROM >> `users` WHERE `users`.`id` = 15 LIMIT 1 >> 2015-06-19 12:10:08 [D] Setting current user thread-local variable to >> mwilmott >> 2015-06-19 12:10:08 [D] Usergroup Load (0.1ms) SELECT `usergroups`.* >> FROM `usergroups` INNER JOIN `cached_usergroup_members` ON >> `usergroups`.`id` = `cached_usergroup_members`.`usergroup_id` WHERE >> `cached_usergroup_members`.`user_id` = 15 ORDER BY usergroups.name >> 2015-06-19 12:10:08 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` >> WHERE `taxonomies`.`type` IN ('Organization') >> 2015-06-19 12:10:08 [D] Setting current organization thread-local >> variable to none >> 2015-06-19 12:10:08 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` >> WHERE `taxonomies`.`type` IN ('Location') >> 2015-06-19 12:10:08 [D] Setting current location thread-local variable to >> none >> 2015-06-19 12:10:08 [D] AuthSource Load (0.1ms) SELECT >> `auth_sources`.* FROM `auth_sources` WHERE `auth_sources`.`id` = 2 LIMIT 1 >> 2015-06-19 12:10:08 [D] (0.1ms) SELECT id FROM `taxonomies` WHERE >> `taxonomies`.`type` IN ('Location') LIMIT 1 >> 2015-06-19 12:10:08 [D] (0.1ms) SELECT id FROM `taxonomies` WHERE >> `taxonomies`.`type` IN ('Organization') LIMIT 1 >> 2015-06-19 12:10:08 [D] Host::Managed Load (0.5ms) SELECT `hosts`.* >> FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`name` = >> 'hostname' LIMIT 1 >> 2015-06-19 12:10:08 [D] Organization Load (0.1ms) SELECT >> `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN >> ('Organization') AND `taxonomies`.`id` = 2 ORDER BY title LIMIT 1 >> 2015-06-19 12:10:08 [D] Location Load (0.1ms) SELECT `taxonomies`.* >> FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') AND >> `taxonomies`.`id` = 1 ORDER BY title LIMIT 1 >> 2015-06-19 12:10:08 [D] Hostgroup Load (0.1ms) SELECT `hostgroups`.* >> FROM `hostgroups` WHERE `hostgroups`.`id` = 11 ORDER BY hostgroups.title >> LIMIT 1 >> 2015-06-19 12:10:08 [D] Hostgroup Load (0.1ms) SELECT `hostgroups`.* >> FROM `hostgroups` WHERE `hostgroups`.`id` IN (2, 3) ORDER BY (case when >> hostgroups.ancestry is null then 0 else 1 end), hostgroups.ancestry >> 2015-06-19 12:10:08 [D] (0.1ms) SELECT `salt_modules`.id FROM >> `salt_modules` INNER JOIN `hostgroup_salt_modules` ON `salt_modules`.`id` = >> `hostgroup_salt_modules`.`salt_module_id` WHERE >> `hostgroup_salt_modules`.`hostgroup_id` = 2 ORDER BY salt_modules.name >> 2015-06-19 12:10:08 [D] (0.1ms) SELECT `salt_modules`.id FROM >> `salt_modules` INNER JOIN `hostgroup_salt_modules` ON `salt_modules`.`id` = >> `hostgroup_salt_modules`.`salt_module_id` WHERE >> `hostgroup_salt_modules`.`hostgroup_id` = 3 ORDER BY salt_modules.name >> 2015-06-19 12:10:08 [W] Operation FAILED: undefined method `uniq' for >> nil:NilClass >> 2015-06-19 12:10:08 [D] >> /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:31:in >> `inherited_salt_module_ids' >> /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:26:in >> `inherited_salt_modules' >> /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:19:in >> `all_salt_modules' >> /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/controllers/foreman_salt/concerns/hosts_controller_extensions.rb:29:in >> `load_vars_for_ajax_with_salt_modules' >> /usr/share/foreman/app/controllers/hosts_controller.rb:94:in `edit' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in >> `send_action' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in >> `process_action' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in >> `process_action' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in >> `block in process_action' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:660:in >> `block (4 levels) in >> _run__4511053015225450787__process_action__2131573909871548317__callbacks' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in >> `block in _conditional_callback_around_8483' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in >> `around' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in >> `_callback_around_2707' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in >> `_conditional_callback_around_8483' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:626:in >> `block (3 levels) in >> _run__4511053015225450787__process_action__2131573909871548317__callbacks' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in >> `block in _conditional_callback_around_8482' >> /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in >> `set_timezone' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in >> `_conditional_callback_around_8482' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:625:in >> `block (2 levels) in >> _run__4511053015225450787__process_action__2131573909871548317__callbacks' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in >> `block in _conditional_callback_around_8481' >> /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in >> `clear_thread' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in >> `_conditional_callback_around_8481' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:448:in >> `block in >> _run__4511053015225450787__process_action__2131573909871548317__callbacks' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in >> `block in _conditional_callback_around_8480' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in >> `around' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in >> `_callback_around_13' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in >> `_conditional_callback_around_8480' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in >> `_run__4511053015225450787__process_action__2131573909871548317__callbacks' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in >> `__run_callback' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in >> `_run_process_action_callbacks' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in >> `run_callbacks' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in >> `process_action' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in >> `process_action' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in >> `block in process_action' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in >> `block in instrument' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in >> `instrument' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in >> `instrument' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in >> `process_action' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in >> `process_action' >> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in >> `process_action' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in >> `process' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in >> `process' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in >> `dispatch' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in >> `dispatch' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in >> `block in action' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in >> `dispatch' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in >> `block in call' >> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in >> `each' >> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in >> `call' >> /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in >> `context' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in >> `block in call' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in >> `_run__1183240788089887311__call__541468574888452291__callbacks' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in >> `__run_callback' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in >> `_run_call_callbacks' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in >> `run_callbacks' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in >> `call_app' >> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in >> `forward' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in >> `fetch' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in >> `lookup' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in >> `call!' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in >> `method_missing' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in >> `call' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in >> `block in call' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in >> `each' >> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in >> `call' >> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in >> `process_request' >> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in >> `accept_and_process_next_request' >> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in >> `main_loop' >> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in >> `block (3 levels) in start_threads' >> 2015-06-19 12:10:08 [I] Rendered common/500.html.erb within >> layouts/application (12.9ms) >> 2015-06-19 12:10:08 [I] Rendered layouts/base.html.erb (2.8ms) >> 2015-06-19 12:10:08 [I] Completed 500 Internal Server Error in 117ms >> (Views: 20.8ms | ActiveRecord: 5.7ms) >> - show quoted text - >> >> >> On Friday, May 22, 2015 at 9:11:06 AM UTC+10, Matthew Wilmott wrote: >>> >>> Oh and to clarify, it was occurring for all hosts not just recently >>> added hosts, although that's probably now obvious from the t

Thanks mate,

I ran into the bug in another environment and applied this fix again to
remediate it

··· On Friday, July 31, 2015 at 11:44:01 PM UTC+10, Rck Frk wrote: > > Hello there, after running into the same error on Foreman 1.8.2 with the > salt plugin version 2.1 I asked on the foreman irc chan for a bugfix that I > can manually apply. > > This gist was posted: > https://gist.github.com/stbenjam/88c09a3f6b800e10765f > > I applied it to our foreman instance and it fixes the problem, so I > decided to post it here for other people to find. > This will only work in Foreman 1.8 and the salt plugin version 2.1, as in > foreman 1.9 the salt plugin will switch to version 3.0 and this seems to > have been fixed already. > > Cheers > > On Monday, June 22, 2015 at 9:09:47 AM UTC+2, Matthew Wilmott wrote: >> >> Ok tracked down the issue >> in /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb >> line 31 >> >> self.class.sort_by_ancestry(ancestors.reject { |ancestor| >> ancestor.salt_module_ids.empty? }).map(&:salt_module_ids).inject(&:+).uniq >> >> only works when at least one salt module is defined. On a new instance >> that isnt guaranteed therefore uniq fails on a nil set. >> >> Matt >> >> >> On Monday, June 22, 2015 at 11:35:54 AM UTC+10, Matthew Wilmott wrote: >>> >>> So I've updated the foreman instance to 1.8.2 and that worked fine so I >>> thought i'd revisit the Salt plugin again to see if I could get it running. >>> >>> Upon installing the ruby193-rubygem-foreman_salt-2.1.0-1.el6.noarch, Im >>> faced with the same error upon editing a host. I've attached the stacktrace >>> below, the assumption here is a migration or similar has failed, can >>> someone point us in the right direction to resolve this? I've tried >>> rerunning the foreman-rake migrate and seed tasks to no positive affect >>> although there are no issues outputted (can clearly see the Salt seed task >>> running without issue) >>> >>> Thanks >>> Matt >>> >>> Here is the latest stack trace: >>> >>> 2015-06-19 12:10:08 [I] >>> >>> Started GET "/hosts/hostname/edit" for ip.add.re.ss at 2015-06-19 >>> 12:10:08 +1000 >>> 2015-06-19 12:10:08 [I] Processing by HostsController#edit as HTML >>> 2015-06-19 12:10:08 [I] Parameters: {"id"=>"hostname"} >>> 2015-06-19 12:10:08 [D] User Load (0.1ms) SELECT `users`.* FROM >>> `users` WHERE `users`.`id` = 15 LIMIT 1 >>> 2015-06-19 12:10:08 [D] Setting current user thread-local variable to >>> mwilmott >>> 2015-06-19 12:10:08 [D] Usergroup Load (0.1ms) SELECT `usergroups`.* >>> FROM `usergroups` INNER JOIN `cached_usergroup_members` ON >>> `usergroups`.`id` = `cached_usergroup_members`.`usergroup_id` WHERE >>> `cached_usergroup_members`.`user_id` = 15 ORDER BY usergroups.name >>> 2015-06-19 12:10:08 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` >>> WHERE `taxonomies`.`type` IN ('Organization') >>> 2015-06-19 12:10:08 [D] Setting current organization thread-local >>> variable to none >>> 2015-06-19 12:10:08 [D] (0.1ms) SELECT COUNT(*) FROM `taxonomies` >>> WHERE `taxonomies`.`type` IN ('Location') >>> 2015-06-19 12:10:08 [D] Setting current location thread-local variable >>> to none >>> 2015-06-19 12:10:08 [D] AuthSource Load (0.1ms) SELECT >>> `auth_sources`.* FROM `auth_sources` WHERE `auth_sources`.`id` = 2 LIMIT 1 >>> 2015-06-19 12:10:08 [D] (0.1ms) SELECT id FROM `taxonomies` WHERE >>> `taxonomies`.`type` IN ('Location') LIMIT 1 >>> 2015-06-19 12:10:08 [D] (0.1ms) SELECT id FROM `taxonomies` WHERE >>> `taxonomies`.`type` IN ('Organization') LIMIT 1 >>> 2015-06-19 12:10:08 [D] Host::Managed Load (0.5ms) SELECT `hosts`.* >>> FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`name` = >>> 'hostname' LIMIT 1 >>> 2015-06-19 12:10:08 [D] Organization Load (0.1ms) SELECT >>> `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN >>> ('Organization') AND `taxonomies`.`id` = 2 ORDER BY title LIMIT 1 >>> 2015-06-19 12:10:08 [D] Location Load (0.1ms) SELECT `taxonomies`.* >>> FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') AND >>> `taxonomies`.`id` = 1 ORDER BY title LIMIT 1 >>> 2015-06-19 12:10:08 [D] Hostgroup Load (0.1ms) SELECT `hostgroups`.* >>> FROM `hostgroups` WHERE `hostgroups`.`id` = 11 ORDER BY hostgroups.title >>> LIMIT 1 >>> 2015-06-19 12:10:08 [D] Hostgroup Load (0.1ms) SELECT `hostgroups`.* >>> FROM `hostgroups` WHERE `hostgroups`.`id` IN (2, 3) ORDER BY (case when >>> hostgroups.ancestry is null then 0 else 1 end), hostgroups.ancestry >>> 2015-06-19 12:10:08 [D] (0.1ms) SELECT `salt_modules`.id FROM >>> `salt_modules` INNER JOIN `hostgroup_salt_modules` ON `salt_modules`.`id` = >>> `hostgroup_salt_modules`.`salt_module_id` WHERE >>> `hostgroup_salt_modules`.`hostgroup_id` = 2 ORDER BY salt_modules.name >>> 2015-06-19 12:10:08 [D] (0.1ms) SELECT `salt_modules`.id FROM >>> `salt_modules` INNER JOIN `hostgroup_salt_modules` ON `salt_modules`.`id` = >>> `hostgroup_salt_modules`.`salt_module_id` WHERE >>> `hostgroup_salt_modules`.`hostgroup_id` = 3 ORDER BY salt_modules.name >>> 2015-06-19 12:10:08 [W] Operation FAILED: undefined method `uniq' for >>> nil:NilClass >>> 2015-06-19 12:10:08 [D] >>> /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:31:in >>> `inherited_salt_module_ids' >>> /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:26:in >>> `inherited_salt_modules' >>> /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/models/foreman_salt/concerns/hostgroup_extensions.rb:19:in >>> `all_salt_modules' >>> /opt/rh/ruby193/root/usr/share/gems/gems/foreman_salt-2.1.0/app/controllers/foreman_salt/concerns/hosts_controller_extensions.rb:29:in >>> `load_vars_for_ajax_with_salt_modules' >>> /usr/share/foreman/app/controllers/hosts_controller.rb:94:in `edit' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in >>> `send_action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in >>> `process_action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in >>> `process_action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in >>> `block in process_action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:660:in >>> `block (4 levels) in >>> _run__4511053015225450787__process_action__2131573909871548317__callbacks' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in >>> `block in _conditional_callback_around_8483' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in >>> `around' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in >>> `_callback_around_2707' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in >>> `_conditional_callback_around_8483' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:626:in >>> `block (3 levels) in >>> _run__4511053015225450787__process_action__2131573909871548317__callbacks' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in >>> `block in _conditional_callback_around_8482' >>> /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in >>> `set_timezone' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in >>> `_conditional_callback_around_8482' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:625:in >>> `block (2 levels) in >>> _run__4511053015225450787__process_action__2131573909871548317__callbacks' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in >>> `block in _conditional_callback_around_8481' >>> /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in >>> `clear_thread' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in >>> `_conditional_callback_around_8481' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:448:in >>> `block in >>> _run__4511053015225450787__process_action__2131573909871548317__callbacks' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in >>> `block in _conditional_callback_around_8480' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in >>> `around' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in >>> `_callback_around_13' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in >>> `_conditional_callback_around_8480' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in >>> `_run__4511053015225450787__process_action__2131573909871548317__callbacks' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in >>> `__run_callback' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in >>> `_run_process_action_callbacks' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in >>> `run_callbacks' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in >>> `process_action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in >>> `process_action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in >>> `block in process_action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in >>> `block in instrument' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in >>> `instrument' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in >>> `instrument' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in >>> `process_action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in >>> `process_action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in >>> `process_action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in >>> `process' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in >>> `process' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in >>> `dispatch' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in >>> `dispatch' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in >>> `block in action' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in >>> `dispatch' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in >>> `block in call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in >>> `each' >>> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in >>> `call' >>> /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in >>> `context' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in >>> `block in call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in >>> `_run__1183240788089887311__call__541468574888452291__callbacks' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in >>> `__run_callback' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in >>> `_run_call_callbacks' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in >>> `run_callbacks' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in >>> `call_app' >>> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in >>> `forward' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in >>> `fetch' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in >>> `lookup' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in >>> `call!' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in >>> `method_missing' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in >>> `call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in >>> `block in call' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in >>> `each' >>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in >>> `call' >>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in >>> `process_request' >>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in >>> `accept_and_process_next_request' >>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in >>> `main_loop' >>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in >>> `block (3 levels) in start_threads' >>> 2015-06-19 12:10:08 [I] Rendered common/500.html.erb within >>> layouts/application (12.9ms) >>> 2015-06-19 12:10:08 [I] Rendered layouts/base.html.erb (2.8ms) >>> 2015-06-19 12:10:08 [I] Completed 500 Internal Server Error in 117ms >>> (Views: 20.8ms | ActiveRecord: 5.7ms) >>> - show quoted text - >>> >>> >>> On Friday, May 22, 2015 at 9:11:06 AM UTC+10, Matthew Wilmott wrote: >>>> >>>> Oh and to clarify, it was occurring for all hosts not just recently >>>> added hosts, although that's probably now obvious from the trace. >>>> >>>> The only other issue we are seeing now are network snippets, in >>>> particular, network.centos appear to refer to a missing attribute. After >>>> install, the snippets read, interface.network.mask which failed until we >>>> updated them to interface.subnet.mask. I'm not certain that is an issue >>>> with the rpm or just a legacy thing regarding o