Bug 1515285 - Middleware - Error is displayed in UI on removing datasources
Summary: Middleware - Error is displayed in UI on removing datasources
Keywords:
Status: CLOSED EOL
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Tomas Coufal
QA Contact: Sunil Kondkar
URL: https://github.com/ManageIQ/manageiq-...
Whiteboard:
: 1515362 (view as bug list)
Depends On:
Blocks: 1518265
TreeView+ depends on / blocked
 
Reported: 2017-11-20 14:00 UTC by Sunil Kondkar
Modified: 2018-03-30 17:21 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1518265 (view as bug list)
Environment:
Last Closed: 2018-01-08 14:25:42 UTC
Category: ---
Cloudforms Team: Middleware
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot-Error in UI (50.82 KB, image/png)
2017-11-20 14:00 UTC, Sunil Kondkar
no flags Details
production.log (644.95 KB, text/plain)
2017-11-20 14:01 UTC, Sunil Kondkar
no flags Details

Description Sunil Kondkar 2017-11-20 14:00:09 UTC
Created attachment 1355847 [details]
Screenshot-Error in UI

Description of problem:

Removing the datasource displays error in UI - Unexpected error encountered 
The UI error text shown is as below: (Please refer the attached screenshot)

undefined method `remove_middleware_datasource' for #<ManageIQ::Providers::Hawkular::MiddlewareManager:0x000000142df168> Did you mean? remove_instance_variable [middleware_server/button] 


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

Version 5.9.0.8.20171109215303_ed87902 

How reproducible:

Always

Steps to Reproduce:

1. Install standalone EAP 7 by extracting the zip file (mutable standalone EAP7 server)
2. Login to cfme
3. Add middleware provider
4. Navigate to the middleware server and add couple of datasources.
5. Navigate to summary page of middleware server.
6. Click on 'Middleware Datasources' link in the 'Relationships' section.
7. On datasources list page, select a datasource.
8. Click on 'Operations->Remove'
9. Observe the error in UI (screenshot is attached )
10. Observer the error in production.log (Log is attached)

Actual results:

Removing datasource shows error in UI and in production.log

Expected results:

Successful datasource deletion with a success message.

Additional info:

Below is in the production.log:

[----] I, [2017-11-20T06:55:07.135777 #13291:1059320]  INFO -- : Started POST "/middleware_server/button/32?pressed=middleware_datasource_remove" for 127.0.0.1 at 2017-11-20 06:55:07 -0500
[----] I, [2017-11-20T06:55:07.140833 #13291:1059320]  INFO -- : Processing by MiddlewareServerController#button as JS
[----] I, [2017-11-20T06:55:07.141031 #13291:1059320]  INFO -- :   Parameters: {"miq_grid_checks"=>"37", "pressed"=>"middleware_datasource_remove", "id"=>"32"}
[----] F, [2017-11-20T06:55:07.453617 #13291:1059320] FATAL -- : Error caught: [NoMethodError] undefined method `remove_middleware_datasource' for #<ManageIQ::Providers::Hawkular::MiddlewareManager:0x00000019f25968>
Did you mean?  remove_instance_variable
/opt/rh/cfme-gemset/gems/activemodel-5.0.6/lib/active_model/attribute_methods.rb:433:in `method_missing'

Comment 2 Sunil Kondkar 2017-11-20 14:01:55 UTC
Created attachment 1355849 [details]
production.log

Comment 3 Dave Johnson 2017-11-20 21:35:23 UTC
*** Bug 1515362 has been marked as a duplicate of this bug. ***

Comment 5 Tomas Coufal 2017-11-23 09:55:15 UTC
Yes, that's true indeed.

Hawkular does not have remove_middleware_datasource implemented at all. Well, I may be missing something, but here [1] there's only add action available.

Alissa, how should I approach it? Should we have it implemented or rather disable the removal action?

Cheers
Tom

[1] https://github.com/ManageIQ/manageiq-providers-hawkular/blob/9b8ab163314bef2157ec0d92657d3df2b54b432c/app/models/manageiq/providers/hawkular/inventory/server_operations.rb#L63

Comment 6 Alissa 2017-11-23 10:52:44 UTC
(In reply to Tomas Coufal from comment #5)
> Yes, that's true indeed.
> 
> Hawkular does not have remove_middleware_datasource implemented at all.
> Well, I may be missing something, but here [1] there's only add action
> available.
> 
> Alissa, how should I approach it? Should we have it implemented or rather
> disable the removal action?
> 
> Cheers
> Tom
> 
> [1]
> https://github.com/ManageIQ/manageiq-providers-hawkular/blob/
> 9b8ab163314bef2157ec0d92657d3df2b54b432c/app/models/manageiq/providers/
> hawkular/inventory/server_operations.rb#L63

we had this functionality implemented in the past on miq (by Ruben), I tagged you on the PR that added it so this might be a regression.
when you write "hawkular does not have it implemented" do you mean the hawkular side or the miq side?

Comment 7 Tomas Coufal 2017-11-23 13:18:45 UTC
This regression is caused by [1] (exact line [2]) when the operation has been removed without a replacement. I'm working towards re-adding this feature back.

Tom

[1] https://github.com/ManageIQ/manageiq-providers-hawkular/pull/9
[2] https://github.com/ManageIQ/manageiq-providers-hawkular/pull/9/files#diff-280d41e58c3a9c503d6bd1f110c873b1L443

Comment 8 Tomas Coufal 2017-11-28 09:58:25 UTC
The operation has been added back, though it's missing notifications in current build (otherwise the operation works). The notification would be fixed in later build by [1].
Also a related change modifies the toast message when the operation is initiated, this should be included in later build as well. [2]

[1] https://github.com/ManageIQ/manageiq-providers-hawkular/pull/112
[2] https://github.com/ManageIQ/manageiq-ui-classic/pull/2832


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