No, it is failing again. It looks like it is not related with linux
permissions. I post my configuration, so maybe anybody could help me. This
is my storage pool:
virsh # pool-info baseimages
Name: baseimages
UUID: ec526631-8997-4be8-9a18-d60d12634bda
State: running
Persistent: yes
Autostart: yes
Capacity: 98.31 GiB
Allocation: 1.53 GiB
Available: 96.78 GiB
virsh #
virsh # pool-dumpxml baseimages
<pool type='fs'>
<name>baseimages</name>
<uuid>ec526631-8997-4be8-9a18-d60d12634bda</uuid>
<capacity unit='bytes'>105555197952</capacity>
<allocation unit='bytes'>1638027264</allocation>
<available unit='bytes'>103917170688</available>
<source>
<device path='/dev/vg0/libvirt-storage'/>
<format type='auto'/>
</source>
<target>
<path>/home/baseimages</path>
<permissions>
<mode>0777</mode>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</pool>
virsh #
I already tried to delete the pool, create it again and even refresh. But
when I try to provision a new host, foreman fails with the following
message:
2016-06-18T14:41:22 [app] [I] Started POST "/hosts" for 192.168.0.156 at
2016-06-18 14:41:22 +0200
2016-06-18T14:41:22 [app] [I] Processing by HostsController#create as /
2016-06-18T14:41:22 [app] [I] Parameters: {"utf8"=>"✓",
"authenticity_token"=>"xxxxxxxxxxxWLzUzeo=", "host"=>{"name"=>"test1",
"hostgroup_id"=>"1", "compute_resource_id"=>"2", "environment_id"=>"",
"managed"=>"true", "progress_report_id"=>"[FILTERED]",
"type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0",
"type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"test1",
"domain_id"=>"1", "subnet_id"=>"1", "ip"=>"192.168.0.45", "managed"=>"1",
"primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"",
"attached_to"=>"", "compute_attributes"=>{"type"=>"bridge",
"bridge"=>"br0", "model"=>"virtio"}}}, "compute_attributes"=>{"cpus"=>"1",
"memory"=>"805306368", "start"=>"1",
"volumes_attributes"=>{"0"=>{"_delete"=>"", "pool_name"=>"baseimages",
"capacity"=>"10G", "allocation"=>"0G", "format_type"=>"qcow2"}},
"image_id"=>"/home/baseimages/ubuntu16/xenial-server-cloudimg-amd64-disk1.img"},
"architecture_id"=>"1", "operatingsystem_id"=>"1",
"provision_method"=>"image", "build"=>"1", "medium_id"=>"7",
"ptable_id"=>"62", "disk"=>"", "root_pass"=>"[FILTERED]",
"is_owned_by"=>"3-Users", "enabled"=>"0", "comment"=>"",
"overwrite"=>"false"}, "capabilities"=>"build image",
"provider"=>"Libvirt", "bare_metal_capabilities"=>"build"}
2016-06-18T14:41:22 [app] [W] Failed to create a compute kvm03 (Libvirt)
instance test1.domain.lan: ERF42-3305 [Foreman::Exception]: Unable to find
template /home/baseimages/ubuntu16/xenial-server-cloudimg-amd64-disk1.img
>
> Foreman::Exception: ERF42-3305 [Foreman::Exception]: Unable to find
template /home/baseimages/ubuntu16/xenial-server-cloudimg-amd64-disk1.img
>
/usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:99:in
template' > /usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:204:in
create_volumes'
>
/usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:126:in
create_vm' > /usr/share/foreman/app/models/concerns/orchestration/compute.rb:76:in
setCompute'
> /usr/share/foreman/app/models/concerns/orchestration.rb:162:in execute' > /usr/share/foreman/app/models/concerns/orchestration.rb:107:in
block in
process'
> /usr/share/foreman/app/models/concerns/orchestration.rb:99:in each' > /usr/share/foreman/app/models/concerns/orchestration.rb:99:in
process'
> /usr/share/foreman/app/models/concerns/orchestration.rb:35:in on_save' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in
block in make_lambda'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:161:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:161:in
block in halting'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in
block in call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in
each' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:86:in
run_callbacks' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/callbacks.rb:302:in
create_or_update'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/persistence.rb:103:in
save' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/validations.rb:51:in
save'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/attribute_methods/dirty.rb:21:in
save' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:268:in
block (2 levels) in save'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:329:in
block in with_transaction_returning_status' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in
block in transaction'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in
within_new_transaction' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in
transaction'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:208:in
transaction' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:326:in
with_transaction_returning_status'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:268:in
block in save' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:283:in
rollback_active_record_state!'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/transactions.rb:267:in
save' > /usr/share/foreman/app/models/concerns/foreman/sti.rb:29:in
save_with_type'
> /usr/share/foreman/app/controllers/hosts_controller.rb:91:in create' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/implicit_render.rb:4:in
send_action'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/abstract_controller/base.rb:189:in
process_action' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rendering.rb:10:in
process_action'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/abstract_controller/callbacks.rb:20:in
block in process_action' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:113:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:113:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:552:in
block (2 levels) in compile'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
block (2 levels) in around' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
block (2 levels) in halting' > /usr/share/foreman/vendor/ruby/2.1.0/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in
around'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in
public_send' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in
block in make_lambda'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
block in halting'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
block in around'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
block (2 levels) in around' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
block (2 levels) in halting' > /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in
set_timezone'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in
block in make_lambda' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
block in halting' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
block in around' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
block (2 levels) in around'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
block (2 levels) in halting'
> /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in
clear_thread' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in
block in make_lambda'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
block in halting'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
block in around'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in
block (2 levels) in around' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in
block (2 levels) in halting' > /usr/share/foreman/vendor/ruby/2.1.0/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in
around'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in
public_send' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in
block in make_lambda'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in
block in halting'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in
block in around'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:86:in
run_callbacks' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/abstract_controller/callbacks.rb:19:in
process_action'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rescue.rb:29:in
process_action' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/instrumentation.rb:32:in
block in process_action'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:159:in
block in instrument' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/notifications/instrumenter.rb:20:in
instrument'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:159:in
instrument' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/instrumentation.rb:30:in
process_action'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/params_wrapper.rb:250:in
process_action' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/railties/controller_runtime.rb:18:in
process_action'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/abstract_controller/base.rb:136:in
process' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionview-4.1.14.2/lib/action_view/rendering.rb:30:in
process'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_controller/metal.rb:196:in
dispatch' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_controller/metal/rack_delegation.rb:13:in
dispatch'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_controller/metal.rb:232:in
block in action' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:80:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:80:in
dispatch' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:48:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:73:in
block in call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:59:in
each'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:59:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:690:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/apipie-rails-0.3.6/lib/apipie/static_dispatcher.rb:65:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/apipie-rails-0.3.6/lib/apipie/extractor/recorder.rb:132:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/apipie-rails-0.3.6/lib/apipie/middleware/checksum_in_headers.rb:27:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/rack-1.5.5/lib/rack/etag.rb:23:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/rack-1.5.5/lib/rack/conditionalget.rb:35:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/rack-1.5.5/lib/rack/head.rb:11:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/params_parser.rb:27:in
call' > /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/flash.rb:254:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:225:in
context'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:220:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/cookies.rb:562:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/query_cache.rb:36:in
call' > /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in
call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/callbacks.rb:29:in
`block in call'
>
/usr/share/foreman/vendor/ruby/2.1.0/gems/a