Bug 1688102 - [Kubevirt-Foreman] Deleting host and compute resource fails due to Provider not active
Summary: [Kubevirt-Foreman] Deleting host and compute resource fails due to Provider n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - CNV
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.6.0
Assignee: Moti Asayag
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-13 07:01 UTC by Vatsal Parekh
Modified: 2019-10-22 19:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 19:49:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot (12.33 KB, image/png)
2019-03-13 07:01 UTC, Vatsal Parekh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fog fog-kubevirt pull 86 0 None None None 2019-04-01 10:59:12 UTC
Github masayag foreman_kubevirt pull 48 0 None None None 2019-04-01 12:15:48 UTC

Description Vatsal Parekh 2019-03-13 07:01:16 UTC
Created attachment 1543508 [details]
screenshot

Description of problem:
The cluster for Kubevirt I was using as compute resource got expired, so I was trying to delete the old compute resource and its hosts.
But deleting the compute resource gives error to delete the host first, and deleting the host actually seems to be looking for the VM associated with that host, which its not finding, so fails. Kind of failure loops.

Production log when the delete fails
```
2019-03-13T06:49:01 [I|aud|dc3825d6] Host::Base (14) destroy event on openscap_proxy_id 
2019-03-13T06:49:01 [I|aud|dc3825d6] Host::Base (14) destroy event on ansible_role_ids []
2019-03-13T06:49:01 [I|app|dc3825d6] Removing Compute instance for lucas-ziedan.vatsal.org
2019-03-13T06:50:01 [W|app|dc3825d6] Failed to destroy a compute kubevirt (KubeVirt) instance lucas-ziedan.vatsal.org: Timed out connecting to server
RestClient::Exceptions::OpenTimeout: Timed out connecting to server
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:731:in `rescue in transmit'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:642:in `transmit'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:145:in `execute'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:52:in `execute'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/rest-client-2.0.2/lib/restclient/resource.rb:51:in `get'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/fog-kubevirt-0.2.1/lib/fog/compute/kubevirt.rb:427:in `detect_version'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/fog-kubevirt-0.2.1/lib/fog/compute/kubevirt.rb:372:in `create_client_from_token'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/fog-kubevirt-0.2.1/lib/fog/compute/kubevirt.rb:357:in `create_client'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/fog-kubevirt-0.2.1/lib/fog/compute/kubevirt.rb:445:in `kubevirt_client'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/fog-kubevirt-0.2.1/lib/fog/compute/kubevirt/requests/get_vm.rb:10:in `get_raw_vm'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/fog-kubevirt-0.2.1/lib/fog/compute/kubevirt/requests/get_server.rb:6:in `get_server'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/fog-kubevirt-0.2.1/lib/fog/compute/kubevirt/models/servers.rb:20:in `get'
/usr/share/foreman/app/models/compute_resource.rb:181:in `find_vm_by_uuid'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/foreman_kubevirt-0.1.0/app/models/foreman_kubevirt/kubevirt.rb:66:in `find_vm_by_uuid'
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/foreman_kubevirt-0.1.0/app/models/foreman_kubevirt/kubevirt.rb:199:in `destroy_vm'
/usr/share/foreman/app/models/concerns/orchestration/compute.rb:198:in `delCompute'
/usr/share/foreman/app/models/concerns/orchestration.rb:222:in `execute'
/usr/share/foreman/app/models/concerns/orchestration.rb:145:in `block in process'
/usr/share/foreman/app/models/concerns/orchestration.rb:137:in `each'
/usr/share/foreman/app/models/concerns/orchestration.rb:137:in `process'
/usr/share/foreman/app/models/concerns/orchestration.rb:60:in `on_destroy'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:236:in `block in halting_and_conditional'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:517:in `block in invoke_after'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:517:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:517:in `invoke_after'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:133:in `run_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:816:in `_run_destroy_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/callbacks.rb:323:in `destroy'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:305:in `block in destroy'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `block in transaction'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:226:in `mon_synchronize'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `transaction'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:212:in `transaction'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:385:in `with_transaction_returning_status'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:305:in `destroy'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/models/foreman_tasks/concerns/action_triggering.rb:35:in `block in destroy'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/models/foreman_tasks/concerns/action_triggering.rb:127:in `dynflow_task_wrap'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/models/foreman_tasks/concerns/action_triggering.rb:35:in `destroy'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/services/katello/registration_manager.rb:84:in `destroy_host_record'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/services/katello/registration_manager.rb:30:in `unregister_host'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/controllers/katello/concerns/hosts_controller_extensions.rb:22:in `destroy'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:194:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118: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-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.7.1/lib/audited/sweeper.rb:14:in `around'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.7.1/lib/audited/sweeper.rb:14:in `around'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:136:in `run_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `block in instrument'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `instrument'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:134:in `process'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/rendering.rb:32:in `process'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal.rb:191:in `dispatch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal.rb:252:in `dispatch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `serve'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:840:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.14/lib/apipie/static_dispatcher.rb:65:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.14/lib/apipie/extractor/recorder.rb:137:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.14/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/tempfile_reaper.rb:15:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/etag.rb:25:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/conditional_get.rb:38:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/head.rb:12:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:232:in `context'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:226:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/rack/logger.rb:38:in `call_app'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/rack/logger.rb:28:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
/usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/lib/katello/prevent_json_parsing.rb:12:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/method_override.rb:22:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/runtime.rb:22:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/secure_headers-6.0.0/lib/secure_headers/middleware.rb:13:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/engine.rb:524:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `public_send'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `method_missing'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/urlmap.rb:68:in `block in call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/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'
2019-03-13T06:50:01 [W|app|dc3825d6] Rolling back due to a problem: [#<Orchestration::Task:0x00007ff5bf551ab0 @name="Removing compute instance lucas-ziedan.vatsal.org", @id="Removing compute instance lucas-ziedan.vatsal.org", @status="failed", @priority=100, @action=[#<Host::Managed id: 14, name: "lucas-ziedan.vatsal.org", last_compile: nil, last_report: nil, updated_at: "2019-03-12 09:34:50", created_at: "2019-03-12 07:10:50", root_pass: "$5$4Y2dsAdMNhqaVD5p$2JPZ3pLJzCxAjzpJR8Trw5FGH5BLul...", architecture_id: 1, operatingsystem_id: 3, environment_id: nil, ptable_id: 102, medium_id: 1, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: 1, owner_id: 4, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: "lucas-ziedan.vatsal.org", compute_resource_id: 1, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 2, location_id: 1, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: "build", grub_pass: "$5$4Y2dsAdMNhqaVD5p$2JPZ3pLJzCxAjzpJR8Trw5FGH5BLul...", global_status: 0, lookup_value_matcher: "fqdn=lucas-ziedan.vatsal.org", pxe_loader: "PXELinux BIOS", initiated_at: nil, build_errors: nil, discovery_rule_id: nil, openscap_proxy_id: nil>, :delCompute], @created=1552459741.4802837, @timestamp=2019-03-13 06:50:01 UTC>]
2019-03-13T06:50:01 [I|app|dc3825d6] Processed 1 tasks from queue 'Host::Managed Main', completed 0/1
2019-03-13T06:50:01 [E|app|dc3825d6] Task 'Removing compute instance lucas-ziedan.vatsal.org' *failed*
2019-03-13T06:50:01 [E|app|dc3825d6] Failed to save: 
2019-03-13T06:50:02 [I|app|dc3825d6] Redirected to https://host-8-246-64.host.centralci.eng.rdu2.redhat.com/hosts
2019-03-13T06:50:02 [I|app|dc3825d6] Completed 302 Found in 60957ms (ActiveRecord: 101.9ms)
2019-03-13T06:50:02 [I|app|928e9564] Started GET "/hosts" for 10.65.223.15 at 2019-03-13 06:50:02 +0000
```

Version-Release number of selected component (if applicable):
Latest master for plugin

How reproducible:


Steps to Reproduce:
1.Try to Delete a compute resource
2.Try to delete a host on that compute resource
3.

Actual results:
Fails with error shown in above log

Expected results:
Should have mechanism to check if compute resource is not longer valid/reachable so delete host without trying to reach the VM

Additional info:

Comment 1 Vatsal Parekh 2019-03-13 07:07:04 UTC
As a workaround, I edited the compute resource with the details of the new cluster, and tried to delete the host, and it worked as expected.

Comment 4 Moti Asayag 2019-04-01 12:17:00 UTC
This fix masayag/foreman_kubevirt/pull/48 allows to delete a host from the system even when the provider isn't accessible.

Comment 5 Vatsal Parekh 2019-04-12 07:08:07 UTC
This seems working on latest nightly Foreman + plugin master

Comment 10 Lukáš Hellebrandt 2019-08-01 09:43:00 UTC
Verified with Sat 6.6 snap 13.

1. Have a Host that is a VM on a Kubevirt CR
2. iptables -A OUTPUT -p tcp --dport <kubevirt_port> -j REJECT
3. Hosts -> All hosts
4. Delete VM

=> VM deleted successfully; traceback present, saying "Failed to open TCP connection" which is expected

Comment 11 Bryan Kearney 2019-10-22 19:49:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3172


Note You need to log in before you can comment on or make changes to this bug.