Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1510179 - Satellite provider can't be deleted
Summary: Satellite provider can't be deleted
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: All
OS: All
high
medium
Target Milestone: GA
: 5.10.0
Assignee: James Wong
QA Contact: Tasos Papaioannou
URL:
Whiteboard:
Depends On:
Blocks: 1536041
TreeView+ depends on / blocked
 
Reported: 2017-11-06 20:58 UTC by Tasos Papaioannou
Modified: 2019-02-11 13:55 UTC (History)
11 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1536041 (view as bug list)
Environment:
Last Closed: 2019-02-11 13:55:16 UTC
Category: Bug
Cloudforms Team: Satellite


Attachments (Terms of Use)

Description Tasos Papaioannou 2017-11-06 20:58:56 UTC
Description of problem:

After checking a Satellite provider, then clicking Configuration > Remove selected items from Inventory, the provider never gets deleted.

Version-Release number of selected component (if applicable):

5.9.0.5

How reproducible:

100%

Steps to Reproduce:
1.) Add a Satellite provider.
2.) Check the Satellite provider, then click Configuration > Remove selected items from Inventory.
3.) Wait a while, then refresh the Configuration Management Providers page.

Actual results:

Satellite provider never gets deleted.

Expected results:

Satellite provider gets deleted.

Additional info:

Logs show a WARN-level entry that might be relevant:

****
==> /var/www/miq/vmdb/log/production.log <==
[----] I, [2017-11-06T15:46:37.885386 #13227:193e0f8]  INFO -- : Started POST "/provider_foreman/delete" for 127.0.0.1 at 2017-11-06 15:46:37 -0500
[----] I, [2017-11-06T15:46:37.888900 #13227:193e0f8]  INFO -- : Processing by ProviderForemanController#delete as JS
[----] I, [2017-11-06T15:46:37.888981 #13227:193e0f8]  INFO -- :   Parameters: {"miq_grid_checks"=>"1"}

==> /var/www/miq/vmdb/log/audit.log <==
[----] I, [2017-11-06T15:46:37.910875 #13227:193e0f8]  INFO -- Success: MIQ(ManagerControllerMixin.block in delete) userid: [admin] - [sat62] Record delete initiated

==> /var/www/miq/vmdb/log/evm.log <==
[----] I, [2017-11-06T15:46:37.910955 #13227:193e0f8]  INFO -- : <AuditSuccess> MIQ(ManagerControllerMixin.block in delete) userid: [admin] - [sat62] Record delete initiated
[----] I, [2017-11-06T15:46:37.911074 #13227:193e0f8]  INFO -- : MIQ(ManageIQ::Providers::Foreman::Provider#destroy_queue) Queuing destroy of ManageIQ::Providers::Foreman::Provider with id: 1
[----] I, [2017-11-06T15:46:37.914397 #13227:193e0f8]  INFO -- : MIQ(MiqQueue.put) Message id: [181],  id: [], Zone: [default], Role: [], Server: [], Ident: [generic], Target id: [], Instance id: [1], Task id: [], Command: [ManageIQ::Providers::Foreman::Provider.destroy], Timeout: [3600], Priority: [100], State: [ready], Deliver On: [], Data: [], Args: []

==> /var/www/miq/vmdb/log/production.log <==
[----] I, [2017-11-06T15:46:37.920317 #13227:193e0f8]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-0bfabadd060e/app/views/layouts/_flash_msg.html.haml (0.1ms)
[----] I, [2017-11-06T15:46:37.920557 #13227:193e0f8]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-0bfabadd060e/app/views/layouts/_info_msg.html.haml (0.1ms)
[----] I, [2017-11-06T15:46:37.921215 #13227:193e0f8]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-0bfabadd060e/app/views/layouts/angular/_gtl.html.haml (1.1ms)
[----] I, [2017-11-06T15:46:37.921299 #13227:193e0f8]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-0bfabadd060e/app/views/layouts/_x_gtl.html.haml (1.4ms)
[----] I, [2017-11-06T15:46:37.922111 #13227:193e0f8]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-0bfabadd060e/app/views/layouts/_x_adv_searchbox.html.haml (0.5ms)
[----] I, [2017-11-06T15:46:37.951861 #13227:193e0f8]  INFO -- : Completed 200 OK in 63ms (Views: 3.3ms | ActiveRecord: 6.0ms)

==> /var/www/miq/vmdb/log/evm.log <==
[----] I, [2017-11-06T15:46:38.047600 #2031:108914c]  INFO -- : MIQ(MiqServer#populate_queue_messages) Fetched 1 miq_queue rows for queue_name=generic, wcount=4, priority=200

==> /var/www/miq/vmdb/log/production.log <==
[----] I, [2017-11-06T15:46:38.094931 #13227:193e0f8]  INFO -- : Started POST "/provider_foreman/report_data" for 127.0.0.1 at 2017-11-06 15:46:38 -0500
[----] I, [2017-11-06T15:46:38.098221 #13227:193e0f8]  INFO -- : Processing by ProviderForemanController#report_data as HTML
[----] I, [2017-11-06T15:46:38.098404 #13227:193e0f8]  INFO -- :   Parameters: {"model_name"=>"ManageIQ::Providers::ConfigurationManager", "model"=>"ManageIQ::Providers::ConfigurationManager", "active_tree"=>"configuration_manager_providers_tree", "explorer"=>true, "additional_options"=>{"named_scope"=>nil, "gtl_dbname"=>nil, "model"=>"ManageIQ::Providers::ConfigurationManager", "match_via_descendants"=>nil, "parent_id"=>nil, "parent_method"=>nil, "association"=>nil, "view_suffix"=>nil}, "provider_foreman"=>{"model_name"=>"ManageIQ::Providers::ConfigurationManager", "model"=>"ManageIQ::Providers::ConfigurationManager", "active_tree"=>"configuration_manager_providers_tree", "explorer"=>true, "additional_options"=>{"named_scope"=>nil, "gtl_dbname"=>nil, "model"=>"ManageIQ::Providers::ConfigurationManager", "match_via_descendants"=>nil, "parent_id"=>nil, "parent_method"=>nil, "association"=>nil, "view_suffix"=>nil}}}

==> /var/www/miq/vmdb/log/evm.log <==
[----] W, [2017-11-06T15:46:38.132509 #13227:193e0f8]  WARN -- : MIQ(Rbac::Filterer#lookup_method_for_descendant_class) could not find method name for ConfiguredSystem::ConfiguredSystem

==> /var/www/miq/vmdb/log/production.log <==
[----] I, [2017-11-06T15:46:38.142915 #13227:193e0f8]  INFO -- : Completed 200 OK in 44ms (Views: 1.0ms | ActiveRecord: 4.6ms)

==> /var/www/miq/vmdb/log/evm.log <==
[----] I, [2017-11-06T15:46:38.278404 #13135:108914c]  INFO -- : MIQ(MiqGenericWorker::Runner#get_message_via_drb) Message id: [181], MiqWorker id: [35], Zone: [default], Role: [], Server: [], Ident: [generic], Target id: [], Instance id: [1], Task id: [], Command: [ManageIQ::Providers::Foreman::Provider.destroy], Timeout: [3600], Priority: [100], State: [dequeue], Deliver On: [], Data: [], Args: [], Dequeued in: [0.366393779] seconds
[----] I, [2017-11-06T15:46:38.278598 #13135:108914c]  INFO -- : MIQ(MiqQueue#deliver) Message id: [181], Delivering...
[----] I, [2017-11-06T15:46:38.318504 #13135:108914c]  INFO -- : MIQ(MiqQueue#delivered) Message id: [181], State: [ok], Delivered in [0.039821909] seconds
[----] I, [2017-11-06T15:46:39.890376 #13162:108914c]  INFO -- : MIQ(MiqScheduleWorker::Runner#do_work) Number of scheduled items to be processed: 1.
****

Comment 3 Adam Grare 2017-12-08 14:12:44 UTC
Tasos can you attach the full evm.log?

> 3.) Wait a while, then refresh the Configuration Management Providers page.

How long did you wait?  We wait to delete the provider until all workers shut down.  Workers have a stopping_timeout of 10 minutes so this is about the longest it could take to remove (assuming the GenericWorkers are processing the delete request)

Comment 5 Tasos Papaioannou 2017-12-08 15:45:44 UTC
I've attached an evm.log from a reproducer on a new 5.9.0.12 appliance. I added the Satellite provider was added at 10:00, then scheduled a deletion at 10:15. As of now, at 10:45, the Satellite provider is still visible in the web UI and in the database.

Comment 6 Adam Grare 2017-12-08 15:48:51 UTC
Thanks Tasos!  We discussed and there seems to be a similar issue with ansible.  James can you see if this is the same as your ansible BZ?

Comment 11 James Wong 2017-12-11 21:35:24 UTC
This has the same cause as that of https://bugzilla.redhat.com/show_bug.cgi?id=1491704

Comment 12 James Wong 2017-12-11 21:43:03 UTC

*** This bug has been marked as a duplicate of bug 1491704 ***

Comment 13 Oleg Barenboim 2018-01-05 16:33:41 UTC
Re-opening because this is a different issue **from user perspective** than https://bugzilla.redhat.com/show_bug.cgi?id=1491704.  The same code fix should fix both BZs.

Comment 14 Oleg Barenboim 2018-01-05 16:34:35 UTC
https://github.com/ManageIQ/manageiq/pull/16614

Comment 15 John Prause 2018-01-12 20:13:46 UTC
PR16614 has been closed and https://github.com/ManageIQ/manageiq/pull/16755 replaces it.

Comment 16 CFME Bot 2018-01-17 20:57:07 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/182b7baa35563df885303f7a84371bff27125936

commit 182b7baa35563df885303f7a84371bff27125936
Author:     James Wong <jwong@redhat.com>
AuthorDate: Wed Dec 6 22:36:27 2017 -0500
Commit:     James Wong <jwong@redhat.com>
CommitDate: Tue Jan 16 15:25:17 2018 -0500

    orchestrate_destroy for provider
    
    fixes https://bugzilla.redhat.com/show_bug.cgi?id=1491704
    https://bugzilla.redhat.com/show_bug.cgi?id=1510179

 app/models/ext_management_system.rb                | 44 ++++--------
 .../providers/embedded_ansible/provider.rb         |  2 +-
 app/models/miq_worker.rb                           |  4 ++
 app/models/mixins/async_delete_mixin.rb            | 12 ++--
 app/models/provider.rb                             | 32 +++++++++
 spec/factories/configured_system.rb                |  4 ++
 spec/models/async_delete_mixin_spec.rb             |  4 +-
 spec/models/ext_management_system_spec.rb          | 84 +++++++++++-----------
 spec/models/provider_spec.rb                       | 34 +++++++++
 9 files changed, 137 insertions(+), 83 deletions(-)

Comment 18 Satoe Imaishi 2018-01-30 20:42:40 UTC
https://github.com/ManageIQ/manageiq/pull/16908

Comment 19 Tasos Papaioannou 2018-06-26 16:19:22 UTC
Verified on 5.10.0.1.


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