Project

General

Profile

Actions

Bug #16025

closed

Import subnets from proxy returns 500

Added by Daniel Lobato Garcia over 8 years ago. Updated over 6 years ago.

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

Description

Currently trying to import IPv4 subnets is broken, as the view calls `.to_s` which in turn calls `.name` on subnets that are not yet created.
We should not call `.to_s` and just use the `.network_address` representation which is always available at that stage when importing subnets.


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #5785: Override class parameter by subnet no longer works since 1.5ClosedOri Rabin05/19/2014Actions
Related to Foreman - Feature #3917: Add strong_parameters to foremanClosedDominic Cleal12/19/2013Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

  • Related to Bug #5785: Override class parameter by subnet no longer works since 1.5 added
Actions #2

Updated by Dominic Cleal over 8 years ago

  • Status changed from New to Assigned
  • Translation missing: en.field_release set to 160
Actions #3

Updated by Daniel Lobato Garcia over 8 years ago

  • Status changed from Assigned to New
  • Translation missing: en.field_release deleted (160)

There seem to be some problems submitting the form as well due to strong_params, I'll fix that in this ticket too

Actions #4

Updated by Dominic Cleal over 8 years ago

  • Status changed from New to Assigned
  • Translation missing: en.field_release set to 160
Actions #5

Updated by The Foreman Bot over 8 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3716 added
Actions #6

Updated by Daniel Lobato Garcia over 8 years ago

  • Target version set to 1.7.1
Actions #7

Updated by Daniel Lobato Garcia over 8 years ago

  • Target version changed from 1.7.1 to 1.6.2
Actions #8

Updated by Dominic Cleal over 8 years ago

14:51:20 rails.1   |  | ActionView::Template::Error (undefined method `gsub' for nil:NilClass):
14:51:20 rails.1   |  |      6:   <% display_all = !minimal?(@subnets) %>
14:51:20 rails.1   |  |      7:   <div class="accordion" id='accordion1'>
14:51:20 rails.1   |  |      8:   <% @subnets.each do |subnet| %>
14:51:20 rails.1   |  |      9:     <% id = 'subnet_fields_'+subnet.to_s.gsub('/','_').gsub('.','_') %>
14:51:20 rails.1   |  |     10:     <div class="accordion-group">
14:51:20 rails.1   |  |     11:       <div class="accordion-heading" >
14:51:20 rails.1   |  |     12:         <a class="accordion-toggle" data-toggle="collapse" data-parent='#accordion1' href="<%= '#'+id %>" data-original-title='review' rel='twipsy' > <%= subnet %> </a>
14:51:20 rails.1   |  |   app/views/subnets/import.html.erb:9:in `block (2 levels) in _app_views_subnets_import_html_erb__4256384505841870065_70124028260720'
14:51:20 rails.1   |  |   app/views/subnets/import.html.erb:8:in `each'
14:51:20 rails.1   |  |   app/views/subnets/import.html.erb:8:in `block in _app_views_subnets_import_html_erb__4256384505841870065_70124028260720'
14:51:20 rails.1   |  |   app/helpers/form_helper.rb:257:in `form_for'
14:51:20 rails.1   |  |   app/views/subnets/import.html.erb:5:in `_app_views_subnets_import_html_erb__4256384505841870065_70124028260720'
14:51:20 rails.1   |  |   app/controllers/concerns/application_shared.rb:14:in `set_timezone'
14:51:20 rails.1   |  |   app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
14:51:20 rails.1   |  |   lib/middleware/catch_json_parse_errors.rb:9:in `call'
14:51:20 rails.1   |  |   lib/middleware/tagged_logging.rb:18:in `call'
Actions #9

Updated by Dominic Cleal over 8 years ago

  • Related to Feature #3917: Add strong_parameters to foreman added
Actions #10

Updated by Daniel Lobato Garcia over 8 years ago

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

Also available in: Atom PDF