Project

General

Profile

Actions

Bug #20397

closed

ActionController::UrlGenerationError in HostsController#play_roles when playing role on a host

Added by Marek Hulán over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

2017-07-25T09:13:13 e0b7eed7 [app] [I] Completed 500 Internal Server Error in 9ms (ActiveRecord: 1.5ms)
2017-07-25T09:13:13 e0b7eed7 [app] [F] 
 | ActionController::UrlGenerationError (No route matches {:action=>"show", :controller=>"hosts", :id=>nil} missing required keys: [:id]):
 |   config/initializers/routing_hash_for.rb:11:in `block (2 levels) in define_url_helper'
 |   /home/ares/Projekty/Zdrojaky/foreman_ansible/app/controllers/foreman_ansible/concerns/hosts_controller_extensions.rb:14:in `rescue in play_roles'
 |   /home/ares/Projekty/Zdrojaky/foreman_ansible/app/controllers/foreman_ansible/concerns/hosts_controller_extensions.rb:9:in `play_roles'
 |   app/controllers/concerns/application_shared.rb:15:in `set_timezone'
 |   app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 |   app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 |   lib/middleware/catch_json_parse_errors.rb:8:in `call'
 |   lib/middleware/tagged_logging.rb:18:in `call'

This is caused by the wrongly defined permission override so when we try to find_resource it fails on unknown permission for play_roles action. I'm not sure when this started to be a problem since the code is there for more than a year, but it's clear it could not have worked correctly.

Actions #1

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_ansible/pull/92 added
Actions #2

Updated by Marek Hulán over 6 years ago

Btw the reproduced was just trying to play roles on a specific host. My Foreman and foreman_ansible versions are develop/master checkouts.

Actions #3

Updated by Anonymous over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF