Bug #4375
closedKickstart provisioning is on a loop when using compute profiles with ovirt Compute Resource.
Description
I've got this issue on /var/log/foreman/production.log
Started GET "/unattended/built?token=54aac0b7-a760-49f6-b528-328c963a067d" for 10.23.45.36 at 2014-02-18 10:24:07 +0100 Processing by UnattendedController#built as */* Parameters: {"token"=>"54aac0b7-a760-49f6-b528-328c963a067d"} Found testgchamoul.lab.services.ingenico.com unattended: testgchamoul.lab.services.ingenico.com is Built! Update Compute instance for testgchamoul.lab.services.ingenico.com Failed to update a compute sysrhevm01 (oVirt) instance testgchamoul.lab.services.ingenico.com: Network interface is already in use./opt/rh/ruby193/root/u sr/share/gems/gems/rbovirt-0.0.21/lib/rbovirt.rb:148:in `handle_fault' /opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.21/lib/rbovirt.rb:91:in `rescue in http_post' /opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.21/lib/rbovirt.rb:88:in `http_post' /opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.21/lib/client/vm_api.rb:54:in `add_interface' /opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/ovirt/requests/compute/add_interface.rb:9:in `add_interface' /opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/ovirt/models/compute/server.rb:57:in `add_interface' /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:258:in `block in update_interfaces' /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:256:in `each' /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:256:in `update_interfaces' /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:144:in `save_vm' /usr/share/foreman/app/models/concerns/orchestration/compute.rb:147:in `setComputeUpdate' /usr/share/foreman/app/models/concerns/orchestration.rb:148:in `execute' /usr/share/foreman/app/models/concerns/orchestration.rb:88:in `block in process' /usr/share/foreman/app/models/concerns/orchestration.rb:80:in `each' /usr/share/foreman/app/models/concerns/orchestration.rb:80:in `process' /usr/share/foreman/app/models/concerns/orchestration.rb:18:in `on_save' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:638:in `_run__2747178915725724864__save__3710355647622919080 __callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `create_or_update' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:84:in `save' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:50:in `save' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:22:in `save' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block (2 levels) in save' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block in save' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:252:in `rollback_active_record_state!' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:240:in `save' /usr/share/foreman/app/models/concerns/foreman/sti.rb:29:in `save_with_type' /usr/share/foreman/app/models/host/managed.rb:202:in `built' /usr/share/foreman/app/controllers/unattended_controller.rb:39:in `built' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:560:in `block (3 levels) in _run__2725404715817051424__proce ss_action__2262777391058119822__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_5484' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_813' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_5484' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:526:in `block (2 levels) in _run__2725404715817051424__proce ss_action__2262777391058119822__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_5483' /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in `clear_thread' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_5483' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:415:in `block in _run__2725404715817051424__process_action__ 2262777391058119822__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_5482' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_13' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_5482' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run__2725404715817051424__process_action__226277739 1058119822__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in `process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in `process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in `dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in `block in action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.0.23/lib/apipie/static_dispatcher.rb:56:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in `call' /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `_run__3099084619475464420__call__3710355647622919080 __callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in `call_app' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads' Rolling back due to a problem: [Compute resource update for testgchamoul.lab.services.ingenico.com 7 failed [#<Host::Managed id: 197, name: "testgchamoul.lab.services.ingenico.com", ip: "10.23.45.36", last_compile: nil, last_freshcheck: nil, last_report: "2014-02-18 09:23:55", updated_at: "20 14-02-18 09:24:06", source_file_id: nil, created_at: "2014-02-18 09:09:18", mac: "52:54:00:56:00:02", root_pass: nil, serial: nil, puppet_status: 6, doma in_id: 1, architecture_id: 1, operatingsystem_id: 1, environment_id: 21, subnet_id: 1, ptable_id: 1, medium_id: 5, build: false, comment: "", disk: "", i nstalled_at: "2014-02-18 09:24:07", model_id: nil, hostgroup_id: 1, owner_id: nil, owner_type: nil, enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: "3a994cb4-9974-42d1-b6f3-497658a3e228", compute_resource_id: 8, puppet_proxy_id: 1, certname: nil, image_id: nil, organization_id: nil, location_id: nil, type: "Host::Managed", compute_profile_id: 3>, :setComputeUpdate]] Completed 409 Conflict in 3487ms (ActiveRecord: 20.9ms)
Foreman release used:
foreman-1.4.0-1.el6.noarch
foreman-ovirt-1.4.0-1.el6.noarch
foreman-proxy-1.4.0-1.el6.noarch
foreman-compute-1.4.0-1.el6.noarch
foreman-vmware-1.4.0-1.el6.noarch
foreman-selinux-1.4.0-1.el6.noarch
foreman-installer-1.4.0-1.el6.noarch
foreman-libvirt-1.4.0-1.el6.noarch
foreman-postgresql-1.4.0-1.el6.noarch
foreman-release-1.4.0-1.el6.noarch
When I am not using compute profiles for a new host, it works like a charm !
Updated by Dominic Cleal almost 11 years ago
- Related to Bug #4173: oVirt: Failed to set Build: undefined method `symbolize_keys' for nil:NilClass added
Updated by Dominic Cleal almost 11 years ago
- Related to Feature #3178: add ability to apply a virtual hardware template at hostgroup level added
Updated by Dominic Cleal almost 11 years ago
- Category set to Compute resources
- Translation missing: en.field_release deleted (
2)
The fix for #4173 makes the compute resource orchestration update code check for missing compute_attributes and says no update to the VM is required if compute_attributes are missing. When you assign a compute profile though, there's a before_validator on Host::Managed which fills in compute_attributes from the profile, so the CR update code fires based on the contents of the compute profile.
Updated by Dominic Cleal almost 11 years ago
The before_validation should probably only run on new_record?
.
Updated by Dominic Cleal over 10 years ago
- Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1112169
Updated by Dominic Cleal over 10 years ago
As a workaround, edit app/models/compute_resources/foreman/model/ovirt.rb and change supports_update? to false.
Updated by Toni Mattila over 10 years ago
Dominic Cleal wrote:
As a workaround, edit app/models/compute_resources/foreman/model/ovirt.rb and change supports_update? to false.
I can confirm that workaround fixes the provisioning issue for 1.5.1 and oVirt 3.4.2.
Updated by Dominic Cleal over 10 years ago
- Has duplicate Bug #6464: ovirt build never finishes, can't be canceled manually added
Updated by Dominic Cleal over 10 years ago
- Has duplicate Bug #6895: foreman updates ovirt host setting incorrectly added
Updated by Joop van de Wege over 10 years ago
The above mentioned fix works with foreman-1.5.2 and oVirt-3.4.3 too.
Updated by Dominic Cleal over 10 years ago
- Category changed from Compute resources to Compute resources - oVirt
- Target version set to 1.7.5
Updated by Anonymous over 10 years ago
- Target version changed from 1.7.5 to 1.7.4
Updated by Anonymous over 10 years ago
- Status changed from New to Assigned
- Assignee set to Anonymous
Updated by Anonymous over 10 years ago
- Status changed from Assigned to Closed
Appears to be working correctly in current develop:HEAD. Fix suggested by Dominic was done in 10ac97b0 (on 20/03/14).
Updated by Dominic Cleal over 10 years ago
Dmitri Dolguikh wrote:
Appears to be working correctly in current develop:HEAD. Fix suggested by Dominic was done in 10ac97b0 (on 20/03/14).
Hm, I'm not convinced.. that commit (ticket #4250) went into Foreman 1.5.1 and some of the reports both in comments above and marked as duplicates have been since then (Mon May 12 16:16:36 2014 is the actual commit date).
Maybe the cause is elsewhere, though I don't see it right now.
Updated by Dominic Cleal over 10 years ago
- Status changed from Closed to Assigned
Updated by The Foreman Bot over 10 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/1741 added
- Pull request deleted (
)
Updated by Dominic Cleal over 10 years ago
- Translation missing: en.field_release set to 10
Updated by Anonymous over 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset b6ad9fc945c43fb35bf8f6ecfa429b37c4b40819.