Project

General

Profile

Actions

Bug #37969

open

Compute Profiles Forms for Libvirt resources are missing Storage and Network which causes hosts creations to fail

Added by Matthew Smith 4 months ago. Updated 30 days ago.

Status:
New
Priority:
Normal
Category:
Compute resources - libvirt
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When configuring compute profiles in versions above Foreman 3.10, the forms are missing the sections to configure the storage info and network info.

I've attached how it looks now in 3.11 and 3.12 and also the part of the form that is now missing that was in 3.10 and earlier versions.

I believe not being able to configure the storage as before is the reason for I am unable to now create a new host.

When trying to create a new host test.mnsmithuk on a KVM compute resource I get the error :
" Unable to save * Failed to create a compute kvm1.mnsmithuk (Libvirt) instance test.mnsmithuk: Call to virStorageVolCreateXML failed: this function is not supported by the connection driver: backing storage not supported for raw volumes"

The foreman log is
The production.log output is

2024-10-12T13:00:03 [I|app|a2bd41ec] Adding Compute instance for test.mnsmithuk
2024-10-12T13:00:03 [W|app|a2bd41ec] Failed to create a compute kvm1.mnsmithuk (Libvirt) instance test.mnsmithuk: Call to virStorageVolCreateXML failed: this function is not supported by the connection driver: backing storage not supported for raw volumes
a2bd41ec |
2024-10-12T13:00:03 [I|app|a2bd41ec] Backtrace for ‘Failed to create a compute kvm1.mnsmithuk (Libvirt) instance test.mnsmithuk: Call to virStorageVolCreateXML failed: this function is not supported by the connection driver: backing storage not supported for raw volumes
a2bd41ec | ’ error (Libvirt::Error): Call to virStorageVolCreateXML failed: this function is not supported by the connection driver: backing storage not supported for raw volumes
a2bd41ec | /usr/share/gems/gems/fog-libvirt-0.12.0/lib/fog/libvirt/requests/compute/create_volume.rb:6:in create_volume_xml' a2bd41ec | /usr/share/gems/gems/fog-libvirt-0.12.0/lib/fog/libvirt/requests/compute/create_volume.rb:6:in create_volume’
a2bd41ec | /usr/share/gems/gems/fog-libvirt-0.12.0/lib/fog/libvirt/models/compute/volume.rb:42:in save' a2bd41ec | /usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:315:in block in create_volumes’
a2bd41ec | /usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:309:in each' a2bd41ec | /usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:309:in create_volumes’
a2bd41ec | /usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:161:in create_vm' a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration/compute.rb:107:in setCompute’
a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration.rb:227:in execute' a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration.rb:152:in block in process’
a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration.rb:144:in each' a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration.rb:144:in process’
a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration.rb:44:in around_save_orchestration' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:137:in run_callbacks' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:824:in run_save_callbacks’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/callbacks.rb:457:in create_or_update' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/timestamp.rb:126:in create_or_update’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/persistence.rb:474:in save' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/validations.rb:47:in save’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/transactions.rb:298:in block in save' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/transactions.rb:354:in block in with_transaction_returning_status’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in block in transaction' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/transaction.rb:319:in block in within_new_transaction’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in block (2 levels) in synchronize' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in handle_interrupt’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in block in synchronize' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in handle_interrupt’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in synchronize' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/transaction.rb:317:in within_new_transaction’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in transaction' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/transactions.rb:350:in with_transaction_returning_status’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/transactions.rb:298:in save' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/suppressor.rb:44:in save’
a2bd41ec | /usr/share/foreman/app/models/concerns/foreman/sti.rb:26:in save' a2bd41ec | /usr/share/foreman/app/controllers/hosts_controller.rb:100:in create’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/basic_implicit_render.rb:6:in send_action' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/base.rb:228:in process_action’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/rendering.rb:30:in process_action' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/callbacks.rb:42:in block in process_action’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:117:in block in run_callbacks' a2bd41ec | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in set_timezone’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks' a2bd41ec | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in clear_thread’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks' a2bd41ec | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in set_topbar_sweeper_controller’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks' a2bd41ec | /usr/share/gems/gems/audited-5.6.0/lib/audited/sweeper.rb:16:in around’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks' a2bd41ec | /usr/share/gems/gems/audited-5.6.0/lib/audited/sweeper.rb:16:in around’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:137:in run_callbacks’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/callbacks.rb:41:in process_action' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/rescue.rb:22:in process_action’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:34:in block in process_action' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in block in instrument’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications/instrumenter.rb:24:in instrument' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in instrument’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:33:in process_action' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/params_wrapper.rb:249:in process_action’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/railties/controller_runtime.rb:27:in process_action' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/base.rb:165:in process’
a2bd41ec | /usr/share/gems/gems/actionview-6.1.7.8/lib/action_view/rendering.rb:39:in process' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal.rb:190:in dispatch’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal.rb:254:in dispatch' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:50:in dispatch’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:33:in serve' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:50:in block in serve’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in each' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in serve’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:842:in call' a2bd41ec | /usr/share/gems/gems/apipie-dsl-2.6.2/lib/apipie_dsl/static_dispatcher.rb:67:in call’
a2bd41ec | /usr/share/gems/gems/apipie-rails-1.3.0/lib/apipie/static_dispatcher.rb:74:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call’
a2bd41ec | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in call' a2bd41ec | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in call’
a2bd41ec | /usr/share/gems/gems/apipie-rails-1.3.0/lib/apipie/middleware/checksum_in_headers.rb:27:in call' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/tempfile_reaper.rb:15:in call’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/etag.rb:27:in call' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/conditional_get.rb:40:in call’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/head.rb:12:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/http/permissions_policy.rb:22:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/http/content_security_policy.rb:19:in call' a2bd41ec | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in call’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/session/abstract/id.rb:266:in context' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/session/abstract/id.rb:260:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/cookies.rb:697:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/callbacks.rb:27:in block in call’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:98:in run_callbacks' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/callbacks.rb:26:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/debug_exceptions.rb:29:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/show_exceptions.rb:33:in call' a2bd41ec | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/rack/logger.rb:37:in call_app’
a2bd41ec | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/rack/logger.rb:28:in call' a2bd41ec | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in call’
a2bd41ec | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/remote_ip.rb:81:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/request_id.rb:26:in call' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/method_override.rb:24:in call’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/runtime.rb:22:in call' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/executor.rb:14:in call' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/sendfile.rb:110:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/ssl.rb:77:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/host_authorization.rb:142:in call’
a2bd41ec | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in call' a2bd41ec | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/engine.rb:539:in call’
a2bd41ec | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in public_send' a2bd41ec | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in method_missing’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/urlmap.rb:74:in block in call' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/urlmap.rb:58:in each’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/urlmap.rb:58:in call' a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/configuration.rb:272:in call’
a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:100:in block in handle_request' a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:378:in with_force_shutdown’
a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:99:in handle_request' a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:464:in process_client’
a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:245:in block in run' a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:155:in block in spawn_thread’
a2bd41ec | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context’
2024-10-12T13:00:03 [W|app|a2bd41ec] Rolling back due to a problem: [#<Orchestration::Task:0x00007f01a1824e80 @name=“Set up compute instance test.mnsmithuk”, @id=“Set up compute instance test.mnsmithuk”, @status=“failed”, @priority=3, @action=[#<Host::Managed id: nil, name: “test.mnsmithuk”, last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: nil, architecture_id: 1, operatingsystem_id: 1, ptable_id: nil, medium_id: nil, build: true, comment: “”, disk: “”, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 4, owner_type: “User”, enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: 1, puppet_proxy_id: 1, certname: nil, image_id: 2, organization_id: 1, location_id: 2, type: “Host::Managed”, otp: nil, realm_id: nil, compute_profile_id: 3, provision_method: “image”, grub_pass: nil, discovery_rule_id: nil, global_status: 0, lookup_value_matcher: [FILTERED], pxe_loader: “PXELinux BIOS”, initiated_at: nil, build_errors: nil, creator_id: nil>, :setCompute], @created=1728738003.8209422, @timestamp=2024-10-12 13:00:03.892482215 UTC>]
2024-10-12T13:00:03 [I|app|a2bd41ec] Processed 1 tasks from queue ‘Host::Managed Main’, completed 0/6
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Set up compute instance test.mnsmithuk’ failed
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Query instance details for test.mnsmithuk’ canceled
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Create DHCP Settings for test.mnsmithuk’ canceled
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Create IPv4 DNS record for test.mnsmithuk’ canceled
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Create Reverse IPv4 DNS record for test.mnsmithuk’ canceled
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Power up compute instance test.mnsmithuk’ canceled
2024-10-12T13:00:03 [W|api|a2bd41ec] param host[puppetclass] has been deprecated in favor of host[puppet_attributes][puppetclass_]
2024-10-12T13:00:03 [W|api|a2bd41ec] param host[puppetclass_] has been deprecated in favor of host[puppet_attributes][puppetclass_]
2024-10-12T13:00:03 [W|api|a2bd41ec] param host[puppetclass_] has been deprecated in favor of host[puppet_attributes][puppetclass_]
2024-10-12T13:00:03 [E|app|a2bd41ec] Failed to save: Failed to create a compute kvm1.mnsmithuk (Libvirt) instance test.mnsmithuk: Call to virStorageVolCreateXML failed: this function is not supported by the connection driver: backing storage not supported for raw volumes
a2bd41ec |
2024-10-12T13:00:04 [I|app|a2bd41ec] Rendered hosts/new.html.erb within layouts/application (Duration: 620.9ms | Allocations: 159828)
2024-10-12T13:00:04 [I|app|a2bd41ec] Rendered layouts/base.html.erb (Duration: 22.7ms | Allocations: 15514)
2024-10-12T13:00:04 [I|app|a2bd41ec] Rendered layout layouts/application.html.erb (Duration: 645.6ms | Allocations: 175876)
2024-10-12T13:00:04 [I|app|a2bd41ec] Completed 200 OK in 1258ms (Views: 624.6ms | ActiveRecord: 49.6ms | Allocations: 242787)

and the kvm log shows

Oct 18 22:39:15 kvm1 virtstoraged7745: this function is not supported by the connection driver: backing storage not supported for raw volumes
Oct 18 22:39:15 kvm1 virtqemud1208: this function is not supported by the connection driver: backing storage not supported for raw volumes.

The images I’m using are qcow2 not raw which implies that foreman must be not defining the disk type correctly when interfacing with the kvm server to create the VM which is understandable if where I defined it in previous versions of Foreman is now missing from the form.

I've updated 3.11 to 3.11.4 and I get the same result. Version 3.12 is still the latest available for me at the moment but unsure if this is addressed in 3.12.1. On a side note I don't think this was a problem in 3.11RC1.


Files

43bfd7799e9faeee5e2dc3328a0eea5c7a41b746_2_690x368.png View 43bfd7799e9faeee5e2dc3328a0eea5c7a41b746_2_690x368.png 12.9 KB this section was in 3.10 but now missing Matthew Smith, 11/03/2024 01:03 PM
Screenshot 2024-11-03 at 13.02.55.png View Screenshot 2024-11-03 at 13.02.55.png 37.3 KB This is how it looks now Matthew Smith, 11/03/2024 01:03 PM
69ad2f20217a05a7e69bda7d8dcb2bf12255efdf.png View 69ad2f20217a05a7e69bda7d8dcb2bf12255efdf.png 11.6 KB This is the error when trying to create host in 3.11. and 3.12 Matthew Smith, 11/03/2024 01:07 PM
Actions #1

Updated by Matthew Smith 4 months ago

  • Assignee set to Ewoud Kohl van Wijngaarden
Actions #2

Updated by Matthew Smith 4 months ago

Matthew Smith wrote:

When configuring compute profiles in versions above Foreman 3.10, the forms are missing the sections to configure the storage info and network info.

I've attached how it looks now in 3.11 and 3.12 and also the part of the form that is now missing that was in 3.10 and earlier versions.

I believe not being able to configure the storage as before is the reason for I am unable to now create a new host.

When trying to create a new host test.mnsmithuk on a KVM compute resource I get the error :
" Unable to save * Failed to create a compute kvm1.mnsmithuk (Libvirt) instance test.mnsmithuk: Call to virStorageVolCreateXML failed: this function is not supported by the connection driver: backing storage not supported for raw volumes"

The foreman log is
The production.log output is

2024-10-12T13:00:03 [I|app|a2bd41ec] Adding Compute instance for test.mnsmithuk
2024-10-12T13:00:03 [W|app|a2bd41ec] Failed to create a compute kvm1.mnsmithuk (Libvirt) instance test.mnsmithuk: Call to virStorageVolCreateXML failed: this function is not supported by the connection driver: backing storage not supported for raw volumes
a2bd41ec |
2024-10-12T13:00:03 [I|app|a2bd41ec] Backtrace for ‘Failed to create a compute kvm1.mnsmithuk (Libvirt) instance test.mnsmithuk: Call to virStorageVolCreateXML failed: this function is not supported by the connection driver: backing storage not supported for raw volumes
a2bd41ec | ’ error (Libvirt::Error): Call to virStorageVolCreateXML failed: this function is not supported by the connection driver: backing storage not supported for raw volumes
a2bd41ec | /usr/share/gems/gems/fog-libvirt-0.12.0/lib/fog/libvirt/requests/compute/create_volume.rb:6:in create_volume_xml' a2bd41ec | /usr/share/gems/gems/fog-libvirt-0.12.0/lib/fog/libvirt/requests/compute/create_volume.rb:6:in create_volume’
a2bd41ec | /usr/share/gems/gems/fog-libvirt-0.12.0/lib/fog/libvirt/models/compute/volume.rb:42:in save' a2bd41ec | /usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:315:in block in create_volumes’
a2bd41ec | /usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:309:in each' a2bd41ec | /usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:309:in create_volumes’
a2bd41ec | /usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:161:in create_vm' a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration/compute.rb:107:in setCompute’
a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration.rb:227:in execute' a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration.rb:152:in block in process’
a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration.rb:144:in each' a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration.rb:144:in process’
a2bd41ec | /usr/share/foreman/app/models/concerns/orchestration.rb:44:in around_save_orchestration' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:137:in run_callbacks' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:824:in run_save_callbacks’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/callbacks.rb:457:in create_or_update' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/timestamp.rb:126:in create_or_update’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/persistence.rb:474:in save' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/validations.rb:47:in save’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/transactions.rb:298:in block in save' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/transactions.rb:354:in block in with_transaction_returning_status’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in block in transaction' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/transaction.rb:319:in block in within_new_transaction’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in block (2 levels) in synchronize' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in handle_interrupt’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in block in synchronize' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in handle_interrupt’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in synchronize' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/transaction.rb:317:in within_new_transaction’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in transaction' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/transactions.rb:350:in with_transaction_returning_status’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/transactions.rb:298:in save' a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/suppressor.rb:44:in save’
a2bd41ec | /usr/share/foreman/app/models/concerns/foreman/sti.rb:26:in save' a2bd41ec | /usr/share/foreman/app/controllers/hosts_controller.rb:100:in create’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/basic_implicit_render.rb:6:in send_action' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/base.rb:228:in process_action’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/rendering.rb:30:in process_action' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/callbacks.rb:42:in block in process_action’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:117:in block in run_callbacks' a2bd41ec | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in set_timezone’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks' a2bd41ec | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in clear_thread’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks' a2bd41ec | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in set_topbar_sweeper_controller’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks' a2bd41ec | /usr/share/gems/gems/audited-5.6.0/lib/audited/sweeper.rb:16:in around’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks' a2bd41ec | /usr/share/gems/gems/audited-5.6.0/lib/audited/sweeper.rb:16:in around’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in block in run_callbacks' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:137:in run_callbacks’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/callbacks.rb:41:in process_action' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/rescue.rb:22:in process_action’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:34:in block in process_action' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in block in instrument’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications/instrumenter.rb:24:in instrument' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in instrument’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:33:in process_action' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/params_wrapper.rb:249:in process_action’
a2bd41ec | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/railties/controller_runtime.rb:27:in process_action' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/base.rb:165:in process’
a2bd41ec | /usr/share/gems/gems/actionview-6.1.7.8/lib/action_view/rendering.rb:39:in process' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal.rb:190:in dispatch’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal.rb:254:in dispatch' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:50:in dispatch’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:33:in serve' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:50:in block in serve’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in each' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in serve’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:842:in call' a2bd41ec | /usr/share/gems/gems/apipie-dsl-2.6.2/lib/apipie_dsl/static_dispatcher.rb:67:in call’
a2bd41ec | /usr/share/gems/gems/apipie-rails-1.3.0/lib/apipie/static_dispatcher.rb:74:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in call’
a2bd41ec | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in call' a2bd41ec | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in call’
a2bd41ec | /usr/share/gems/gems/apipie-rails-1.3.0/lib/apipie/middleware/checksum_in_headers.rb:27:in call' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/tempfile_reaper.rb:15:in call’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/etag.rb:27:in call' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/conditional_get.rb:40:in call’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/head.rb:12:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/http/permissions_policy.rb:22:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/http/content_security_policy.rb:19:in call' a2bd41ec | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in call’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/session/abstract/id.rb:266:in context' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/session/abstract/id.rb:260:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/cookies.rb:697:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/callbacks.rb:27:in block in call’
a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:98:in run_callbacks' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/callbacks.rb:26:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/debug_exceptions.rb:29:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/show_exceptions.rb:33:in call' a2bd41ec | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/rack/logger.rb:37:in call_app’
a2bd41ec | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/rack/logger.rb:28:in call' a2bd41ec | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in call’
a2bd41ec | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/remote_ip.rb:81:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/request_id.rb:26:in call' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/method_override.rb:24:in call’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/runtime.rb:22:in call' a2bd41ec | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/executor.rb:14:in call' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/sendfile.rb:110:in call’
a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/ssl.rb:77:in call' a2bd41ec | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/host_authorization.rb:142:in call’
a2bd41ec | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in call' a2bd41ec | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/engine.rb:539:in call’
a2bd41ec | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in public_send' a2bd41ec | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in method_missing’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/urlmap.rb:74:in block in call' a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/urlmap.rb:58:in each’
a2bd41ec | /usr/share/gems/gems/rack-2.2.9/lib/rack/urlmap.rb:58:in call' a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/configuration.rb:272:in call’
a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:100:in block in handle_request' a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:378:in with_force_shutdown’
a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:99:in handle_request' a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:464:in process_client’
a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:245:in block in run' a2bd41ec | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:155:in block in spawn_thread’
a2bd41ec | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context’
2024-10-12T13:00:03 [W|app|a2bd41ec] Rolling back due to a problem: [#<Orchestration::Task:0x00007f01a1824e80 @name=“Set up compute instance test.mnsmithuk”, @id=“Set up compute instance test.mnsmithuk”, @status=“failed”, @priority=3, @action=[#<Host::Managed id: nil, name: “test.mnsmithuk”, last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: nil, architecture_id: 1, operatingsystem_id: 1, ptable_id: nil, medium_id: nil, build: true, comment: “”, disk: “”, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 4, owner_type: “User”, enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: 1, puppet_proxy_id: 1, certname: nil, image_id: 2, organization_id: 1, location_id: 2, type: “Host::Managed”, otp: nil, realm_id: nil, compute_profile_id: 3, provision_method: “image”, grub_pass: nil, discovery_rule_id: nil, global_status: 0, lookup_value_matcher: [FILTERED], pxe_loader: “PXELinux BIOS”, initiated_at: nil, build_errors: nil, creator_id: nil>, :setCompute], @created=1728738003.8209422, @timestamp=2024-10-12 13:00:03.892482215 UTC>]
2024-10-12T13:00:03 [I|app|a2bd41ec] Processed 1 tasks from queue ‘Host::Managed Main’, completed 0/6
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Set up compute instance test.mnsmithuk’ failed
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Query instance details for test.mnsmithuk’ canceled
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Create DHCP Settings for test.mnsmithuk’ canceled
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Create IPv4 DNS record for test.mnsmithuk’ canceled
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Create Reverse IPv4 DNS record for test.mnsmithuk’ canceled
2024-10-12T13:00:03 [E|app|a2bd41ec] Task ‘Power up compute instance test.mnsmithuk’ canceled
2024-10-12T13:00:03 [W|api|a2bd41ec] param host[puppetclass] has been deprecated in favor of host[puppet_attributes][puppetclass_]
2024-10-12T13:00:03 [W|api|a2bd41ec] param host[puppetclass_] has been deprecated in favor of host[puppet_attributes][puppetclass_]
2024-10-12T13:00:03 [W|api|a2bd41ec] param host[puppetclass_] has been deprecated in favor of host[puppet_attributes][puppetclass_]
2024-10-12T13:00:03 [E|app|a2bd41ec] Failed to save: Failed to create a compute kvm1.mnsmithuk (Libvirt) instance test.mnsmithuk: Call to virStorageVolCreateXML failed: this function is not supported by the connection driver: backing storage not supported for raw volumes
a2bd41ec |
2024-10-12T13:00:04 [I|app|a2bd41ec] Rendered hosts/new.html.erb within layouts/application (Duration: 620.9ms | Allocations: 159828)
2024-10-12T13:00:04 [I|app|a2bd41ec] Rendered layouts/base.html.erb (Duration: 22.7ms | Allocations: 15514)
2024-10-12T13:00:04 [I|app|a2bd41ec] Rendered layout layouts/application.html.erb (Duration: 645.6ms | Allocations: 175876)
2024-10-12T13:00:04 [I|app|a2bd41ec] Completed 200 OK in 1258ms (Views: 624.6ms | ActiveRecord: 49.6ms | Allocations: 242787)

and the kvm log shows

Oct 18 22:39:15 kvm1 virtstoraged7745: this function is not supported by the connection driver: backing storage not supported for raw volumes
Oct 18 22:39:15 kvm1 virtqemud1208: this function is not supported by the connection driver: backing storage not supported for raw volumes.

The images I’m using are qcow2 not raw which implies that foreman must be not defining the disk type correctly when interfacing with the kvm server to create the VM which is understandable if where I defined it in previous versions of Foreman is now missing from the form.

I've updated 3.11 to 3.11.4 and I get the same result. Version 3.12 is still the latest available for me at the moment but unsure if this is addressed in 3.12.1. On a side note I don't think this was a problem in 3.11RC1.

I can now confirm that rubygem-foreman_fog_proxmox-0.16.3-1 fixes the issue in Foreman 3.12. Thanks for pushing this through. Foreman 3.13rc1 has foreman_fog_proxmox-0.17.1-1 so will need to also test if this contains the fix.

Actions #3

Updated by Ewoud Kohl van Wijngaarden 30 days ago

  • Description updated (diff)
Actions

Also available in: Atom PDF