Bug 1302687 - Error during 'Save Tags': Failures occurred during bulk reassignment in edit host tag
Summary: Error during 'Save Tags': Failures occurred during bulk reassignment in edit ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.6.0
Assignee: Lucy Fu
QA Contact: Aziza Karol
URL:
Whiteboard: ui:host:tag
Depends On:
Blocks: 1308748
TreeView+ depends on / blocked
 
Reported: 2016-01-28 11:43 UTC by Aziza Karol
Modified: 2019-12-16 05:19 UTC (History)
12 users (show)

Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1308748 (view as bug list)
Environment:
Last Closed: 2016-06-29 15:34:18 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
err (86.99 KB, image/png)
2016-01-28 11:43 UTC, Aziza Karol
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Aziza Karol 2016-01-28 11:43:50 UTC
Created attachment 1119111 [details]
err

Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
1.delete vsphere provider
2.navigate to infrastructure->host and  edit tags for the host
3.Do the tag assignment and save it

Actual results:
"Error during 'Save Tags': Failures occurred during bulk reassignment. Unable to add the following tags to ManageIQ::Providers::Vmware::InfraManager::HostEsx 4: 3" is displayed in UI.see attached screenshot

Expected results:


Additional info:
evm.log
.cfme.lab.eng.rdu2.redhat.com
[----] I, [2016-01-28T06:36:50.092575 #3041:8e1994]  INFO -- : <AutomationEngine> MiqAeEvent.build_evm_event >> event=<:request_assign_company_tag> inputs=<{"MiqEvent::miq_event"=>2785, :miq_event_id=>2785, "EventStream::event_stream"=>2785, :event_stream_id=>2785}>
[----] E, [2016-01-28T06:36:50.093020 #3041:8e1994] ERROR -- : [RuntimeError]: A group is needed to raise an event. [ManageIQ::Providers::Vmware::InfraManager::HostEsx] id:[4] event_type: [request_assign_company_tag]  Method:[rescue in enforce_policy]
[----] E, [2016-01-28T06:36:50.093237 #3041:8e1994] ERROR -- : /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_event.rb:176:in `automate_user_ids'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_event.rb:114:in `call_automate'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_event.rb:41:in `raise_evm_event'
/var/www/miq/vmdb/app/models/miq_event.rb:41:in `raise_evm_event'
/var/www/miq/vmdb/app/models/classification.rb:329:in `enforce_policy'
/var/www/miq/vmdb/app/models/classification.rb:261:in `assign_entry_to'
/var/www/miq/vmdb/app/models/classification.rb:141:in `block (2 levels) in bulk_reassignment'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5/lib/active_record/relation/delegation.rb:46:in `each'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5/lib/active_record/relation/delegation.rb:46:in `each'
/var/www/miq/vmdb/app/models/classification.rb:137:in `block in bulk_reassignment'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5/lib/active_record/relation/delegation.rb:46:in `each'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5/lib/active_record/relation/delegation.rb:46:in `each'
/var/www/miq/vmdb/app/models/classification.rb:124:in `bulk_reassignment'
/var/www/miq/vmdb/app/controllers/application_controller/tags.rb:222:in `tagging_save_tags'
/var/www/miq/vmdb/app/controllers/application_controller/tags.rb:194:in `tagging_edit_tags_save'
/var/www/miq/vmdb/app/controllers/application_controller/tags.rb:12:in `tagging_edit'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/abstract_controller/base.rb:198:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:117:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:117:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:505:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:505:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/abstract_controller/base.rb:137:in `process'
/opt/rh/cfme-gemset/gems/actionview-4.2.5/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal.rb:196:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal.rb:237:in `block in action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:76:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:45:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/journey/router.rb:30:in `each'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/journey/router.rb:30:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:817:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/flash.rb:260:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5/lib/active_record/query_cache.rb:36:in `call'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/rack/logger.rb:38:in `call_app'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/rack/logger.rb:22:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/static.rb:116:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/middleware/static.rb:116:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/engine.rb:518:in `call'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/application.rb:165:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/handler/thin.rb:19:in `run'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/server.rb:286:in `start'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/server.rb:80:in `start'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:80:in `block in server'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
/var/www/miq/vmdb/bin/rails:4:in `require'
/var/www/miq/vmdb/bin/rails:4:in `<main>'
[----] E, [2016-01-28T06:36:50.093358 #3041:8e1994] ERROR -- : MIQ(Classification.bulk_reassignment) Error occurred while adding entry name: [3] to Host name: cfme-esx-55-04.cfme.lab.eng.rdu2.redhat.com
[----] E, [2016-01-28T06:36:50.093414 #3041:8e1994] ERROR -- : MIQ(Classification.bulk_reassignment) RuntimeError - A group is needed to raise an event. [ManageIQ::Providers::Vmware::InfraManager::HostEsx] id:[4] event_type: [request_assign_company_tag]
[----] E, [2016-01-28T06:36:50.093558 #3041:8e1994] ERROR -- : MIQ(host_controller-tagging_edit): Error during 'Save Tags': Failures occurred during bulk reassignment.  Unable to add the following tags to ManageIQ::Providers::Vmware::InfraManager::HostEsx 4: 3.
[DEPRECATION] secure_headers 3.0 will only accept string values for StrictTransportSecurity config

Comment 2 Greg McCullough 2016-01-28 17:57:05 UTC
I think the issue here is that the Host loses it association to the tenant once the Provider is removed.  For automate we need to pass the identity of the resource (tenant/group/user) which currently relies on this association.  Will need to identify the proper approach here which will likely be to use the root tenant if no tenant can be determined.

Comment 4 Shveta 2016-02-03 00:14:19 UTC
Assigning to add test case

Comment 5 CFME Bot 2016-02-15 20:40:37 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/67a07951ebdd46bdcbea5955caf9a0c22e857ad3

commit 67a07951ebdd46bdcbea5955caf9a0c22e857ad3
Author:     Lucy Fu <lufu>
AuthorDate: Mon Feb 1 14:32:15 2016 -0500
Commit:     Lucy Fu <lufu>
CommitDate: Mon Feb 15 14:05:42 2016 -0500

    The default user/group/tenant for Host to start with.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1302687

 app/models/host.rb                                 | 10 +++++++--
 .../lib/miq_automation_engine/miq_ae_event_spec.rb | 15 ++++++++++++-
 spec/models/host_spec.rb                           | 25 ++++++++++++++++++++++
 3 files changed, 47 insertions(+), 3 deletions(-)

Comment 6 CFME Bot 2016-02-15 20:40:41 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/d36f26a8ca5ba1c69dc50b8b85e841f721b41da3

commit d36f26a8ca5ba1c69dc50b8b85e841f721b41da3
Author:     Lucy Fu <lufu>
AuthorDate: Thu Feb 11 16:12:53 2016 -0500
Commit:     Lucy Fu <lufu>
CommitDate: Mon Feb 15 14:05:42 2016 -0500

    The default user/group/tenant for EmsCluster / ResourcePool to start with.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1302687

 app/models/ems_cluster.rb         | 11 ++++++++---
 app/models/resource_pool.rb       | 10 ++++++++--
 spec/models/ems_cluster_spec.rb   | 25 +++++++++++++++++++++++++
 spec/models/resource_pool_spec.rb | 25 +++++++++++++++++++++++++
 4 files changed, 66 insertions(+), 5 deletions(-)

Comment 7 CFME Bot 2016-02-19 18:24:34 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=4d60859bacb3ce55bbd1bd9d68665df25a1c2d71

commit 4d60859bacb3ce55bbd1bd9d68665df25a1c2d71
Author:     Lucy Fu <lufu>
AuthorDate: Mon Feb 1 14:32:15 2016 -0500
Commit:     Lucy Fu <lufu>
CommitDate: Mon Feb 15 18:20:09 2016 -0500

    The default user/group/tenant for Host to start with.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1302687

 app/models/host.rb                                 | 10 +++++++--
 .../lib/miq_automation_engine/miq_ae_event_spec.rb | 15 ++++++++++++-
 spec/models/host_spec.rb                           | 25 ++++++++++++++++++++++
 3 files changed, 47 insertions(+), 3 deletions(-)

Comment 8 CFME Bot 2016-02-19 18:24:39 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=c77fc3910f7f1fa24de5171681bdfca40e12b795

commit c77fc3910f7f1fa24de5171681bdfca40e12b795
Author:     Lucy Fu <lufu>
AuthorDate: Thu Feb 11 16:12:53 2016 -0500
Commit:     Lucy Fu <lufu>
CommitDate: Mon Feb 15 18:23:15 2016 -0500

    The default user/group/tenant for EmsCluster / ResourcePool to start with.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1302687

 app/models/ems_cluster.rb         | 10 ++++++++--
 app/models/resource_pool.rb       | 10 ++++++++--
 spec/models/ems_cluster_spec.rb   | 25 +++++++++++++++++++++++++
 spec/models/resource_pool_spec.rb | 25 +++++++++++++++++++++++++
 4 files changed, 66 insertions(+), 4 deletions(-)

Comment 9 Aziza Karol 2016-04-20 07:25:34 UTC
Edit host tag  successful.

Verified:
5.6.0.1-beta2.20160413141124_e25ac0e

Comment 11 errata-xmlrpc 2016-06-29 15:34:18 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/RHBA-2016:1348


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