fog / fog-proxmox

Fog module for Proxmox VE Platform
GNU General Public License v3.0
31 stars 14 forks source link

Compute profile creation fails: Oops, we're sorry but something went wrong undefined method `[]' for nil:NilClass #36

Closed RedChops closed 5 years ago

RedChops commented 5 years ago

Describe the bug After filling out the details of the compute profile and pressing submit, the page reloads and does not reflect any of the changes. Pressing cancel takes me back to the list of available hosts and shows that the profile was saved. Clicking on that profile again gives me the message mentioned in the bug title. The stack trace seems to suggest an error with the controller, but I get this error no matter what drive controller I select.

To Reproduce Steps to reproduce the behavior:

  1. Go to Compute Profiles
  2. Create Compute Profile
  3. Select Compute resource and fill out the profile details, submit
  4. Go back to the list of Resources and click on the resource where the profile was created

Expected behavior The details I filled in should be displayed to me. (This profile also gives the same error when trying to create a host using it)

Versions fog-proxmox: 0.5.1 foreman_fog_proxmox: 0.5.1 foreman: 1.18.2

Stack trace

2018-09-26T11:23:25 [W|app|494b4] Action failed                                                                                                                                   
ActionView::Template::Error: undefined method `[]' for nil:NilClass                                                                                                               
/opt/rh/rh-ruby24/root/usr/local/share/gems/gems/fog-proxmox-0.5.1/lib/fog/proxmox/helpers/disk_helper.rb:42:in `extract_controller'                                              
/opt/rh/rh-ruby24/root/usr/local/share/gems/gems/fog-proxmox-0.5.1/lib/fog/compute/proxmox/models/disk.rb:52:in `controller'                                                      
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/tags/base.rb:40:in `public_send'                                                      
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/tags/base.rb:40:in `value'                                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/tags/collection_select.rb:16:in `block in render'                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/tags/collection_select.rb:16:in `fetch'                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/tags/collection_select.rb:16:in `render'                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_options_helper.rb:202:in `collection_select'                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_options_helper.rb:829:in `collection_select'                                     
/usr/share/foreman/app/helpers/form_helper.rb:131:in `block in select_f'                                                                                                          
/usr/share/foreman/app/helpers/form_helper.rb:392:in `block (3 levels) in field'                                                                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `capture'                                                     
/usr/share/foreman/app/helpers/form_helper.rb:388:in `block (2 levels) in field'                                                                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `capture'                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/tag_helper.rb:272:in `content_tag'                                                    
/usr/share/foreman/app/helpers/form_helper.rb:386:in `block in field'                                                                                                             
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `capture'                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/tag_helper.rb:272:in `content_tag'                                                    
/usr/share/foreman/app/helpers/form_helper.rb:385:in `field'                                                                                                                      
/usr/share/foreman/app/helpers/form_helper.rb:128:in `select_f'                                                                                                                   
/opt/rh/rh-ruby24/root/usr/local/share/gems/gems/foreman_fog_proxmox-0.5.1/app/views/compute_resources_vms/form/proxmox/server/_volume.html.erb:23:in `block in _da01a40301fde5997
40c4a4a17a97d7a'                                                                                                                                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `capture'                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_tag_helper.rb:576:in `field_set_tag'                                             
/opt/rh/rh-ruby24/root/usr/local/share/gems/gems/foreman_fog_proxmox-0.5.1/app/views/compute_resources_vms/form/proxmox/server/_volume.html.erb:20:in `_da01a40301fde599740c4a4a17
a97d7a'                                                                                                                                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'                                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:155:in `render'                                                                   
/opt/rh/rh-ruby24/root/usr/local/share/gems/gems/deface-1.3.0/lib/deface/action_view_extensions.rb:41:in `render'                                                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:342:in `block in render_partial'                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:331:in `render_partial'                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:310:in `render'                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:47:in `render_partial'                                                   
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:21:in `render'                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/rendering_helper.rb:32:in `render'                                                    
/usr/share/foreman/app/views/compute_resources_vms/form/_volumes.html.erb:43:in `block (2 levels) in _94df2116a348f152822ac4e8a0870a23'                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `capture'                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_helper.rb:2330:in `block in fields_for_nested_model'                             
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `capture'                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_helper.rb:1012:in `fields_for'                                                   
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_helper.rb:2329:in `fields_for_nested_model'                                      
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_helper.rb:2315:in `block in fields_for_with_nested_attributes'                   
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-core-1.45.0/lib/fog/core/collection.rb:18:in `each'                                                                              
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-core-1.45.0/lib/fog/core/collection.rb:18:in `each'                                                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_helper.rb:2309:in `fields_for_with_nested_attributes'                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_helper.rb:1954:in `fields_for'                                                   
/usr/share/foreman/app/views/compute_resources_vms/form/_volumes.html.erb:42:in `block in _94df2116a348f152822ac4e8a0870a23'                                                      
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `capture'                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_tag_helper.rb:576:in `field_set_tag'                                             
/usr/share/foreman/app/views/compute_resources_vms/form/_volumes.html.erb:3:in `_94df2116a348f152822ac4e8a0870a23'                                                                
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'                                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:155:in `render'                                                                   
/opt/rh/rh-ruby24/root/usr/local/share/gems/gems/deface-1.3.0/lib/deface/action_view_extensions.rb:41:in `render'                                                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:342:in `block in render_partial'                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:331:in `render_partial'                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:310:in `render'                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:47:in `render_partial'                                                   
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:21:in `render'                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/rendering_helper.rb:32:in `render'                                                    
/usr/share/foreman/app/views/compute_attributes/_compute_form.html.erb:9:in `_95255f5930dc06435d61bed1c764441e'                                                                   
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'                                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:155:in `render'                                                                   
/opt/rh/rh-ruby24/root/usr/local/share/gems/gems/deface-1.3.0/lib/deface/action_view_extensions.rb:41:in `render'                                                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:342:in `block in render_partial'                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:331:in `render_partial'                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:310:in `render'                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:47:in `render_partial'                                                   
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:21:in `render'                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/rendering_helper.rb:32:in `render'                                                    
/usr/share/foreman/app/views/compute_attributes/_form.html.erb:8:in `block (2 levels) in _ca64e61649f35d768886d806042c303d'                                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `capture'                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_helper.rb:1012:in `fields_for'                                                   
/usr/share/foreman/app/views/compute_attributes/_form.html.erb:7:in `block in _ca64e61649f35d768886d806042c303d'                                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `block in capture'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/capture_helper.rb:39:in `capture'                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/form_helper.rb:450:in `form_for'                                                      
/usr/share/foreman/app/helpers/form_helper.rb:296:in `form_for'                                                                                                                   
/usr/share/foreman/app/views/compute_attributes/_form.html.erb:1:in `_ca64e61649f35d768886d806042c303d'                                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'                                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:155:in `render'                                                                   
/opt/rh/rh-ruby24/root/usr/local/share/gems/gems/deface-1.3.0/lib/deface/action_view_extensions.rb:41:in `render'                                                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:342:in `block in render_partial'                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:331:in `render_partial'                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:310:in `render'                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:47:in `render_partial'                                                   
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/helpers/rendering_helper.rb:35:in `render'                                                    
/usr/share/foreman/app/views/compute_attributes/edit.html.erb:23:in `_879efb483aec00300356f9f836458c80'                                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'                                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:155:in `render'                                                                   
/opt/rh/rh-ruby24/root/usr/local/share/gems/gems/deface-1.3.0/lib/deface/action_view_extensions.rb:41:in `render'                                                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:52:in `block (2 levels) in render_template'                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:51:in `block in render_template'                                
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'                                      
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:50:in `render_template'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:14:in `render'                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:42:in `render_template'                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:23:in `render'                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/rendering.rb:103:in `_render_template'                                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/streaming.rb:217:in `_render_template'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/rendering.rb:83:in `render_to_body'                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/rendering.rb:52:in `render_to_body'                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/renderers.rb:141:in `render_to_body'                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/abstract_controller/rendering.rb:24:in `render'                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/rendering.rb:36:in `render'                                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'                             
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'                                               
/opt/rh/rh-ruby24/root/usr/share/ruby/benchmark.rb:308:in `realtime'                                                                                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/core_ext/benchmark.rb:12:in `ms'                                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/instrumentation.rb:44:in `block in render'                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'                                   
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/railties/controller_runtime.rb:29:in `cleanup_view_runtime'                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/instrumentation.rb:43:in `render'                                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/implicit_render.rb:33:in `default_render'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/basic_implicit_render.rb:4:in `block in send_action'                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/basic_implicit_render.rb:4:in `tap'                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:186:in `process_action'                                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/rendering.rb:30:in `process_action'                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action'                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:108:in `block in run_callbacks'                                            
/usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'                                                                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'                                            
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'                                                                                             
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'                                            
/usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'                                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'                                            
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.7.0/lib/audited/sweeper.rb:14:in `around'                                                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'                                            
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.7.0/lib/audited/sweeper.rb:14:in `around'                                                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:135:in `run_callbacks'                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:19:in `process_action'                                                   
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/rescue.rb:20:in `process_action'                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'                                
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/instrumentation.rb:30:in `process_action'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/params_wrapper.rb:252:in `process_action'                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/railties/controller_runtime.rb:22:in `process_action'                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:124:in `process'                                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/rendering.rb:30:in `process'                                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal.rb:189:in `dispatch'                                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal.rb:253:in `dispatch'                                                              
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:31:in `serve'                                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:50:in `block in serve'                                                  
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:33:in `each'                                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:33:in `serve'                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:844:in `call'                                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'                                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'                                                        
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.9/lib/apipie/static_dispatcher.rb:65:in `call'                                                                      
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.9/lib/apipie/extractor/recorder.rb:136:in `call'                                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'                                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'                                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'                                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'                                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'                                                        
/usr/share/foreman/lib/middleware/telemetry.rb:9:in `call'                                                                                                                        
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.9/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'                                                         
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:8:in `call'                                                                                                          
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/etag.rb:25:in `call'                                                                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/conditional_get.rb:25:in `call'                                                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/head.rb:12:in `call'                                                                                       
/usr/share/foreman/lib/middleware/logging_context.rb:23:in `call'                                                                                                                 
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232:in `context'                                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226:in `call'                                                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/cookies.rb:613:in `call'                                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'                                             
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:97:in `run_callbacks'                                                      
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/callbacks.rb:24:in `call'                                                      
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'                                                
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.6/lib/rails/rack/logger.rb:36:in `call_app'                                                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.6/lib/rails/rack/logger.rb:26:in `call'                                                                           
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'                                                         
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'                                                      
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/request_id.rb:25:in `call'                                                     
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/lib/katello/prevent_json_parsing.rb:12:in `call'                                                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call'                                                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call'                                                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'                                   
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/executor.rb:12:in `call'                                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'                                                        
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'                                                                                  
/opt/theforeman/tfm/root/usr/share/gems/gems/secure_headers-5.0.5/lib/secure_headers/middleware.rb:13:in `call'                                                                   
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:522:in `call'                                                                               
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.6/lib/rails/railtie.rb:185:in `public_send'                                                                       
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.6/lib/rails/railtie.rb:185:in `method_missing'                                                                    
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/urlmap.rb:68:in `block in call'                                                                            
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `each'                                                                                     
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `call'                                                                                     
/usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'                                                                                   
/usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'                                                                 
/usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'                                                                                       
/usr/share/passenger/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'                                                                              
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'                                        
tristanrobert commented 5 years ago

Could you show the details you filled in the compute profile form?

RedChops commented 5 years ago

Might make more sense to type out my changes here rather than a very long screenshot. If I don't note it here, I left it at the default:

Type: KVM/Qemu server

Main options

Qemu Agent: [x] KVM: [x]

CPU

Cores: 4

Memory

Memory: 8589934592 Minimum memory: 1073741824 Ballooning Device: [x] (Note: What unit are these memory settings supposed to be? Given the default I assumed bytes, but I also tried megabytes)

Storage

Disk

Storage: ceph Controller: SCSI (I've tried each of the four: IDE/SATA/SCSI/VirtIO Block) Device: 0 (Also tried setting this to '1' just to be sure) Cache: No cache Size: 34359738368 (Again, given the default I assumed byte, but also tried megabyte)

tristanrobert commented 5 years ago

This issue is relative to foreman_fog_proxmox and not fog_proxmox. DiskHelper.extract_controller accepts a/(\w+)(\d+)/string id (e.g. scsi0) but it is not. Sizes must be formatted in text (e.g. 1 Gb) by foreman javascript. But it seems not to. Have you installed the plugin javascript: /usr/bin/foreman-ruby /usr/bin/bundle exec bin/rake plugin:assets:precompile[foreman_fog_proxmox]?

RedChops commented 5 years ago

Hm, I lack the foreman-ruby binary, but I do have a foreman-rake binary. After setting proper permissions in the ruby gems folder (foreman-rake su's to foreman user), running /sbin/foreman-rake plugin:assets:precompile[foreman_fog_proxpox], and restarting the foreman service, the javascript formatting you mention now works.

I'm unsure if this is related, but several settings don't seem to 'stick': If I set 4 cores under CPU, 8 Gb for memory, 1 Gb for minimum memory, and check ballooning device, the only setting out of that batch that sticks is the 8 Gb memory setting. All other settings from my above writeup do stick in the configuration.

tristanrobert commented 5 years ago

1- Do you still encounter the error?

2- Could you post another issue in foreman_fog_proxmox related to the server VM settings issue?

RedChops commented 5 years ago

Sorry yes, this issue has been resolved. With this comment I'll close the issue and open a new one in foreman_fog_proxmox.

For posterity, the tasks that fixed this for me are as follows (since they differ slightly from the instructions in the README.MD file)

  1. sudo chgrp -R foreman /opt/rh/rh-ruby24/root/usr/local/share/gems/gems
  2. sudo chmod g+w /opt/rh/rh-ruby24/root/usr/local/share/gems/gems
  3. sudo foreman-rake plugin:assets:precompile[foreman_fog_proxmox]