Bug 1444085 - No pop-up with support case when collecting logs thru dropbox from second server in distributed mode
Summary: No pop-up with support case when collecting logs thru dropbox from second ser...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.0
Assignee: Dávid Halász
QA Contact: Oleksii Tsuman
URL:
Whiteboard: log_collect:distributed
Depends On:
Blocks: 1444504
TreeView+ depends on / blocked
 
Reported: 2017-04-20 14:20 UTC by Oleksii Tsuman
Modified: 2018-03-06 15:01 UTC (History)
7 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1444504 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:01:27 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Oleksii Tsuman 2017-04-20 14:20:01 UTC
Description of problem:
UI Log Collection for Red Hat Dropbox does not ask for case number if you trying to collect logs from slave server 

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


How reproducible:


1. Set two appliances into distributed mode (join region)
2. Login into master server 
3. Go to Configuration -> Diagnostics -> "Slave server"(e.g. EVM [2]) -> Edit 
4. Set dropbox as log depot
5. Collect logs

Actual results:
Pop-up with support case is absent


Expected results:
pop-up present and possible to set support case

Additional info:

Comment 3 Martin Povolny 2017-04-21 09:19:15 UTC
Oleksii, can you, please, give me the IP of an appliance where you are testing this? I'd like to quickly check this and hopefully fix it while avoiding the complex setup on my dev environment.

Thx!

Comment 4 Oleksii Tsuman 2017-04-21 09:29:33 UTC
Martin, I sent to you email with IP address

Comment 5 Martin Povolny 2017-04-21 10:39:02 UTC
the necessary 'data-prompt' is not being set on the button therefor the UI does not display the prompt

when I change app/helpers/application_helper/button/collect_logs.rb

to include:

  def calculate_properties
    super
    Rails.logger.error(['calculate_properties', :log_file_depot, @record, @record.try(:log_file_depot), @record.try(:log_file_depot).try(:requires_support_case?)].inspect)

    if @record.try(:log_file_depot).try(:requires_support_case?)
      self[:prompt] = true
    end
  end

I can see:

[----] E, [2017-04-21T06:38:07.811254 #33446:1370770] ERROR -- : ["calculate_properties", :log_file_depot, nil, nil, nil]

meaning that @record is nil

so the root cause is that @record is not being set in the controller

going to be the same bug as:

https://bugzilla.redhat.com/show_bug.cgi?id=1443927

but after the refactorings the @record is tested earlier so the button is not displayed at all

Comment 6 Martin Povolny 2017-04-21 10:41:07 UTC
Reassigning do David, will help him fix both bzs.

Comment 7 Martin Povolny 2017-04-21 11:07:31 UTC
Oleksii: I applied a fix on your appliance. Please, take a look.

Comment 9 CFME Bot 2017-04-21 12:04:01 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/cfc4931dfbba7f5136ce46c66f4f685ee1cdc2d3

commit cfc4931dfbba7f5136ce46c66f4f685ee1cdc2d3
Author:     Dávid Halász <dhalasz>
AuthorDate: Fri Apr 21 13:09:12 2017 +0200
Commit:     Dávid Halász <dhalasz>
CommitDate: Fri Apr 21 13:09:12 2017 +0200

    Explicitly set the @record in ops controller on diagnostics screens
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1443927
    https://bugzilla.redhat.com/show_bug.cgi?id=1444085

 app/controllers/ops_controller.rb             | 1 +
 app/controllers/ops_controller/diagnostics.rb | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Comment 10 Oleksii Tsuman 2017-04-21 12:12:16 UTC
Martin, thanks, now on my appliance pop-up present when trying to collect logs (current and all) from master, slave and zone.

Comment 12 Oleksii Tsuman 2017-10-19 19:26:01 UTC
verified in 5.9.0.2.20171010190026_0413a06


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