Project

General

Profile

Actions

Bug #10285

closed

setBuild Rails route is HTTP PUT and not GET

Added by Ben Bettridge about 9 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hey guys,

Picked this bug up today when trying to rebuild a machine:

Started GET "/hosts/intdaflcap01.switch.internal/setBuild" for 10.1.0.1 at 2015-04-28 15:07:31 +1000

ActionController::RoutingError (No route matches [GET] "/hosts/intdaflcap01.switch.internal/setBuild"):
  /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'

And checking /usr/share/foreman/config/routes.rb I see:

...
        get 'review_before_build'
        put 'setBuild'
...

Changing the lines in routes.rb to read:

...
        get 'review_before_build'
        get 'setBuild'
...

Fixes the issue. I did a quick grep of the codebase to ensure that it's not breaking anything elsewhere, and haven't experienced any issues since making the patch.

Actions

Also available in: Atom PDF