Bug 1444965

Summary: Getting undefined method `get_folder_paths' after applying RHSA-2017:0898
Product: Red Hat CloudForms Management Engine Reporter: Saif Ali <saali>
Component: ProvisioningAssignee: Drew Bomhof <dbomhof>
Status: CLOSED CURRENTRELEASE QA Contact: Dmitry Misharov <dmisharo>
Severity: high Docs Contact:
Priority: high    
Version: 5.7.0CC: cpelland, gblomqui, jfrey, jhardy, obarenbo, saali, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1445804 1445806 (view as bug list) Environment:
Last Closed: 2018-03-06 15:03:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: VMware Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1445804, 1445806    

Description Saif Ali 2017-04-24 15:43:17 UTC
Description of problem:
Getting undefined method `get_folder_paths' after applying RHSA-2017:0898

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 6 Greg McCullough 2017-04-25 18:41:44 UTC
This issue was caused by PR https://github.com/ManageIQ/manageiq/pull/13629.

We should restore the logic for this method since it is a regression effecting a z-stream update.

If yours do not want to apply a hotfix they can replace the call with eligible_folders.


Here is an example of how to replace `prov.get_folder_paths` with a call to eligible_folders.


Initial code example:
prov.get_folder_paths.each { |key, path| log_and_update_message(:info, "Eligible folders:<#{key.inspect}> - <#{path.inspect}>") }

------------------------------

Replacement code:
1. Use the eligible_folders method to build hash similar to what get_folder_paths returned
2. Replace `prov.get_folder_paths` from the original code with the new `folder_paths` variable


folder_paths = prov.eligible_folders.each_with_object({}) do |x, h|
  h[x.id] = x.folder_path(:exclude_non_display_folders => true)
end

folder_paths.each { |key, path| log_and_update_message(:info, "Eligible folders:<#{key.inspect}> - <#{path.inspect}>") }

Comment 8 CFME Bot 2017-04-25 20:11:11 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/104d16bb9c32454b430ffe61c64c1055f5617bf6

commit 104d16bb9c32454b430ffe61c64c1055f5617bf6
Author:     Drew Bomhof <dbomhof>
AuthorDate: Tue Apr 25 15:34:31 2017 -0400
Commit:     Drew Bomhof <dbomhof>
CommitDate: Tue Apr 25 15:34:31 2017 -0400

    Revert removal of get_folder_paths
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1444965

 app/models/mixins/miq_provision_mixin.rb | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comment 13 Milan Falešník 2018-02-05 10:49:33 UTC
Verified in 5.9.0.19 ^^^