Bug 1677744 - Self Service UI: There was an error fetching this service. [object Object]
Summary: Self Service UI: There was an error fetching this service. [object Object]
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.9.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.0
Assignee: drew uhlmann
QA Contact: Niyaz Akhtar Ansari
Red Hat CloudForms Documentation
URL:
Whiteboard:
: 1677745 (view as bug list)
Depends On:
Blocks: 1702080
TreeView+ depends on / blocked
 
Reported: 2019-02-15 18:36 UTC by Tuan
Modified: 2022-03-13 16:59 UTC (History)
13 users (show)

Fixed In Version: 5.11.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1702080 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:09:09 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Tuan 2019-02-15 19:30:53 UTC
*** Bug 1677745 has been marked as a duplicate of this bug. ***

Comment 12 drew uhlmann 2019-02-19 16:18:04 UTC
I have three possible ideas for options at this point, barring anything Tina and GT came up with. 

1) The easy, kind of hacky solution (works but is fixing the symptom):  

changing the get_user method in the mixin to this: 

  def get_user
    if @user || User.in_my_region.find_by(:userid => userid)
      @user ||= User.in_my_region.find_by(:userid => userid).tap do |u|
        u.current_group_by_description = options[:requester_group] if options[:requester_group]
      end
    else
      @user = User.find_by(:userid => "admin")
    end
  end
  alias_method :tenant_identity, :get_user

However, the better solution to this is either 2) figuring out how we still have options[:requester_group] set to something that's linked to the user that got deleted, or 3) a complete overhaul of how we delete users (problems of this sort would be helped by changing our user deletion to be soft deletes only.) I don't know what the right solution to this is, if a quick fix is necessary, the first solution should work fine.

Comment 14 drew uhlmann 2019-02-19 20:05:51 UTC
The reproducer listed by Robb above has my changes and isn't failing, so I'm not sure what to tell you, Yuri.

Comment 17 Yuri Rudman 2019-03-22 13:42:57 UTC
PR to not allow to delete user if  he/she referred to from other models: https://github.com/ManageIQ/manageiq/pull/18472

Comment 18 Yuri Rudman 2019-04-17 18:25:21 UTC
PR to fix error: https://github.com/ManageIQ/manageiq/pull/18483

Comment 19 Yuri Rudman 2019-04-17 19:12:19 UTC
Drew, I think work around you proposed in #Comment 12 will help.

PR I referred to in #Comment 17 would not help here

Comment 21 Yuri Rudman 2019-04-22 11:07:17 UTC
PR: https://github.com/ManageIQ/manageiq/pull/18663

Comment 25 Niyaz Akhtar Ansari 2019-05-14 17:27:22 UTC
Verified in Version: 5.11.0.3.20190507174347_a77bd90


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