Bug #21092
open
Error unexpected QEMU URI path should get handled
Added by Ondřej Pražák almost 7 years ago.
Updated almost 7 years ago.
Category:
Compute resources - libvirt
|
Description
Description of problem: We were trying to provision a host. We created libvirt compute resource, providing invalid url and thus while trying compute profile it shows error as "Error making a connection to libvirt URI qemu+tcp:/hostname/system: Call to virConnectOpen failed: internal error: unexpected QEMU URI path,, try qemu:///system".
How reproducible: always
Steps to Reproduce:
1. Navigate to Infrastructure -> compute resources
2. Create libvirt compute resource providing invalid url
3. Try to create compute profile for same libvirt compute resource
Actual results:
Production.log shows 500 internal server error and page shows "Error making a connection to libvirt URI qemu+tcp:/hostname/system: Call to virConnectOpen failed: internal error: unexpected QEMU URI path,, try qemu:///system"
Expected results:
Error should get handled.
Files
2017-09-25T12:47:15 3c62ee4f [app] [I] Started GET "/compute_profiles/8-fake_compute_profile/compute_resources/9-test_test/compute_attributes/new" for ::1 at 2017-09-25 12:47:15 +0000
2017-09-25T12:47:15 3c62ee4f [app] [I] Processing by ComputeAttributesController#new as */*
2017-09-25T12:47:15 3c62ee4f [app] [I] Parameters: {"compute_profile_id"=>"8-fake_compute_profile", "compute_resource_id"=>"9-test_test"}
2017-09-25T12:47:15 3c62ee4f [app] [I] Current user: admin (administrator)
2017-09-25T12:47:15 3c62ee4f [app] [D] Setting current user thread-local variable to admin
2017-09-25T12:47:15 3c62ee4f [app] [D] Setting current organization thread-local variable to OrdinaryOrg
2017-09-25T12:47:15 3c62ee4f [app] [D] Setting current location thread-local variable to none
2017-09-25T12:47:15 3c62ee4f [app] [I] Rendered compute_resources_vms/form/libvirt/_base.html.erb (3.0ms)
2017-09-25T12:47:15 3c62ee4f [app] [I] Rendered compute_attributes/_compute_form.html.erb (5.5ms)
2017-09-25T12:47:15 3c62ee4f [app] [I] Rendered compute_attributes/_form.html.erb (24.5ms)
2017-09-25T12:47:15 3c62ee4f [app] [I] Rendered compute_attributes/new.html.erb (37.9ms)
2017-09-25T12:47:15 3c62ee4f [app] [I] Completed 500 Internal Server Error in 55ms (ActiveRecord: 7.8ms)
2017-09-25T12:47:15 3c62ee4f [app] [F]
| ActionView::Template::Error (Error making a connection to libvirt URI qemu+tcp:/var/log:
| Call to virConnectOpen failed: unable to connect to server at 'localhost:16509': Connection refused):
| 2:
| 3: <%= text_f f, :name, :label => _('Name'), :label_size => "col-md-2", :disabled => !new_vm if show_vm_name? %>
| 4:
| 5: <%= counter_f f, :cpus, :disabled => !new_vm, :label => _('CPUs'), :label_size => 'col-md-2', :'data-soft-max' => compute_resource.max_cpu_count %>
| 6:
| 7: <%= byte_size_f f, :memory, :disabled => !new_vm, :label => _('Memory'), :label_size => "col-md-2", :'data-soft-max' => compute_resource.max_memory %>
| 8:
| app/models/compute_resources/foreman/model/libvirt.rb:205:in `client'
| app/models/compute_resources/foreman/model/libvirt.rb:182:in `hypervisor'
| app/models/compute_resources/foreman/model/libvirt.rb:58:in `max_cpu_count'
| app/views/compute_resources_vms/form/libvirt/_base.html.erb:5:in `_bfdc178c57045003a3ff20ce7f173c6f'
| app/views/compute_attributes/_compute_form.html.erb:2:in `_4c53fc100df8052fcb2baf047567e5b3'
| app/views/compute_attributes/_form.html.erb:9:in `block (2 levels) in _1ed2ea5f3ec89f02aaa125fbdda554c4'
| app/views/compute_attributes/_form.html.erb:8:in `block in _1ed2ea5f3ec89f02aaa125fbdda554c4'
| app/helpers/form_helper.rb:291:in `form_for'
| app/views/compute_attributes/_form.html.erb:2:in `_1ed2ea5f3ec89f02aaa125fbdda554c4'
| app/views/compute_attributes/new.html.erb:3:in `_2787b504bd2930fd0ed034c85079c026'
| 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'
| /home/vagrant/projects/katello/lib/katello/params_parser_wrapper.rb:12:in `call'
| lib/middleware/catch_json_parse_errors.rb:8:in `call'
| lib/middleware/session_safe_logging.rb:17:in `call'
| lib/middleware/tagged_logging.rb:18:in `call'
Also available in: Atom
PDF