Project

General

Profile

Actions

Bug #22143

closed

WebUI doesn't allow to delete a host provisioned via bootdisk from satellite, when same host has already been deleted from rhev

Added by Ivan Necas about 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Compute resources - oVirt
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1330549

Description of problem:
I accidentally deleted a host provisioned via boot disk from rhev CR and later when I tried to delete same host registered with satellite, satellite webUI raises error:

Failed to destroy a compute rhevm1.satellite.lab.eng.rdu2.redhat.com (RHEV) instance bootdiskgen2.katello-latest.satellite.lab.eng.rdu2.redhat.com: ActiveRecord::RecordNotFound

2016-04-26 08:05:45 [app] [I] Started DELETE "/hosts/bootdiskgen2.katello-latest.satellite.lab.eng.rdu2.redhat.com" for 10.65.193.53 at 2016-04-26 08:05:45 -0400
2016-04-26 08:05:45 [app] [I] Processing by HostsController#destroy as HTML
2016-04-26 08:05:45 [app] [I] Parameters: {"authenticity_token"=>"D+B+2DjOjAjlQYBvoNLLBaYz+oYHRDoqXmoSeAKx1xs=", "id"=>"bootdiskgen2.katello-latest.satellite.lab.eng.rdu2.redhat.com"}
2016-04-26 08:05:46 [app] [I] Delete the DNS A record for bootdiskgen2.katello-latest.satellite.lab.eng.rdu2.redhat.com/10.8.111.51
2016-04-26 08:05:46 [app] [I] Delete the DNS PTR record for 10.8.111.51/bootdiskgen2.katello-latest.satellite.lab.eng.rdu2.redhat.com
2016-04-26 08:05:46 [app] [I] Delete DHCP reservation for bootdiskgen2.katello-latest.satellite.lab.eng.rdu2.redhat.com-00:1a:4a:3e:a6:1d/10.8.111.51
2016-04-26 08:05:49 [app] [W] Failed to destroy a compute rhevm1.satellite.lab.eng.rdu2.redhat.com (RHEV) instance bootdiskgen2.katello-latest.satellite.lab.eng.rdu2.redhat.com: ActiveRecord::RecordNotFound | ActiveRecord::RecordNotFound: ActiveRecord::RecordNotFound | /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:26:in `rescue in find_vm_by_uuid' | /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:24:in `find_vm_by_uuid' | /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:188:in `destroy_vm' | /usr/share/foreman/app/models/concerns/orchestration/compute.rb:161:in `delCompute' | /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:43:in `on_destroy' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'

this leaves a stale entry in satellite and there s no way to remove this host from satellite itself.

Steps to Reproduce:
1. provision a host via generic bootdisk on rhev
2. delete the host from rhev first
3. delete the host from satellite

Actual results:
Failed to destroy a compute rhevm1.satellite.lab.eng.rdu2.redhat.com (RHEV) instance bootdiskgen2.katello-latest.satellite.lab.eng.rdu2.redhat.com: ActiveRecord::RecordNotFound

Expected results:
host should be deleted from sat6 too

Additional info:

If I provision a host on libvirt and remove it from libvirt first, later I can successfully remove it from satellite.

Similarly, if I remove host provisioned via discovery first from CR and then later try to remove from satellite, I don't see any issue.


Related issues 1 (1 open0 closed)

Related to Foreman - Bug #18777: Can not delete host if VM is removedNew03/02/2017Actions
Actions #1

Updated by Ivan Necas about 6 years ago

  • Related to Bug #18777: Can not delete host if VM is removed added
Actions #2

Updated by Ido Kanner about 6 years ago

  • Subject changed from WebUI doesn't allow to delete a host provisioned via bootdisk from satellite, when same host has already been deleted from rhev to WebUI doesn't allow to delete a host provisioned via bootdisk from satellite, when same host has already been deleted from rhev
  • Assignee set to Ido Kanner
Actions #3

Updated by Ido Kanner about 6 years ago

  • Status changed from New to Resolved

I can't reproduce it, just tried, and it worked well.
On v1.18

Actions #4

Updated by Ido Kanner about 6 years ago

  • Status changed from Resolved to New
Actions #5

Updated by Ido Kanner over 5 years ago

  • Triaged set to No

Following new testing, I see that now there is a different error, but the same result.

At the moment, the Ovirt resource returns

| Foreman::Exception: ERF42-1251 [Foreman::Exception]: Error has occurred while communicating with rhev (oVirt): HTTP response code is 404. The response body is empty.
 | /home/vagrant/foreman/app/services/power_manager/virt.rb:15:in `rescue in initialize'
 | /home/vagrant/foreman/app/services/power_manager/virt.rb:7:in `initialize'
 | /home/vagrant/foreman/app/models/concerns/hostext/power_interface.rb:8:in `new'
 | /home/vagrant/foreman/app/models/concerns/hostext/power_interface.rb:8:in `power'
 | /home/vagrant/foreman/app/models/concerns/hostext/power_interface.rb:22:in `supports_power_and_running?'
 | /home/vagrant/foreman/app/controllers/hosts_controller.rb:864:in `block in host_power_ping'
 | /home/vagrant/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'
 | /home/vagrant/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/timeout.rb:33:in `block in catch'
 | /home/vagrant/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/timeout.rb:33:in `catch'
 | /home/vagrant/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/timeout.rb:33:in `catch'
 | /home/vagrant/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/timeout.rb:108:in `timeout'
 | /home/vagrant/foreman/app/controllers/hosts_controller.rb:863:in `host_power_ping'
 | /home/vagrant/foreman/app/controllers/hosts_controller.rb:276:in `get_power_state'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:186:in `process_action'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_controller/metal/rendering.rb:30:in `process_action'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:108:in `block in run_callbacks'
 | /home/vagrant/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /home/vagrant/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /home/vagrant/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/audited-4.7.1/lib/audited/sweeper.rb:14:in `around'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/audited-4.7.1/lib/audited/sweeper.rb:14:in `around'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:135:in `run_callbacks'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:19:in `process_action'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_controller/metal/rescue.rb:20:in `process_action'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.6/lib/active_record/railties/controller_runtime.rb:22:in `process_action'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:124:in `process'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionview-5.1.6/lib/action_view/rendering.rb:30:in `process'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_controller/metal.rb:189:in `dispatch'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_controller/metal.rb:253:in `dispatch'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:31:in `serve'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:33:in `each'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:33:in `serve'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:844:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/apipie-rails-0.5.8/lib/apipie/static_dispatcher.rb:65:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/bullet-5.7.5/lib/bullet/rack.rb:14:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/apipie-rails-0.5.8/lib/apipie/extractor/recorder.rb:136:in `call'
 | /home/vagrant/foreman/lib/middleware/telemetry.rb:9:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/apipie-rails-0.5.8/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 | /home/vagrant/foreman/lib/middleware/catch_json_parse_errors.rb:8:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-openid-1.4.2/lib/rack/openid.rb:98:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/etag.rb:25:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/conditional_get.rb:25:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/head.rb:12:in `call'
 | /home/vagrant/foreman/lib/middleware/logging_context.rb:23:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:232:in `context'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:226:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/cookies.rb:613:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.6/lib/active_record/migration.rb:556:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:97:in `run_callbacks'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/callbacks.rb:24:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/executor.rb:12:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/railties-5.1.6/lib/rails/rack/logger.rb:36:in `call_app'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/railties-5.1.6/lib/rails/rack/logger.rb:26:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/request_id.rb:25:in `call'
 | /home/vagrant/katello/lib/katello/prevent_json_parsing.rb:12:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/method_override.rb:22:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/runtime.rb:22:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.6/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/executor.rb:12:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/secure_headers-5.0.5/lib/secure_headers/middleware.rb:13:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/railties-5.1.6/lib/rails/engine.rb:522:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/railties-5.1.6/lib/rails/railtie.rb:185:in `public_send'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/railties-5.1.6/lib/rails/railtie.rb:185:in `method_missing'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/urlmap.rb:68:in `block in call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `each'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/puma-3.11.4/lib/puma/configuration.rb:225:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/puma-3.11.4/lib/puma/server.rb:632:in `handle_request'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/puma-3.11.4/lib/puma/server.rb:446:in `process_client'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/puma-3.11.4/lib/puma/server.rb:306:in `block in run'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/puma-3.11.4/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
 | /home/vagrant/.rvm/gems/ruby-2.4.1/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2018-07-09T08:40:34 [I|app|c1a69] Completed 200 OK in 3466ms (Views: 1.0ms | ActiveRecord: 1131.1ms)
 |
Actions #6

Updated by Shira Maximov about 4 years ago

  • Status changed from New to Closed
  • Assignee deleted (Ido Kanner)

the bug was closed downstream, therefor I'm closing it in Redmine as well.

Actions

Also available in: Atom PDF