Bug 1677744
| Summary: | Self Service UI: There was an error fetching this service. [object Object] | |||
|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Tuan <tuado> | |
| Component: | API | Assignee: | drew uhlmann <duhlmann> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Niyaz Akhtar Ansari <nansari> | |
| Severity: | medium | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | |
| Priority: | medium | |||
| Version: | 5.9.7 | CC: | bmidwood, dmetzger, duhlmann, hkataria, jocarter, jprause, lavenel, mpovolny, nansari, obarenbo, rmanes, simaishi, yrudman | |
| Target Milestone: | GA | Keywords: | TestOnly, ZStream | |
| Target Release: | 5.11.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | 5.11.0.1 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1702080 (view as bug list) | Environment: | ||
| Last Closed: | 2019-12-13 15:09:09 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | Bug | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | CFME Core | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1702080 | |||
|
Comment 1
Tuan
2019-02-15 19:30:53 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.
The reproducer listed by Robb above has my changes and isn't failing, so I'm not sure what to tell you, Yuri. PR to not allow to delete user if he/she referred to from other models: https://github.com/ManageIQ/manageiq/pull/18472 PR to fix error: https://github.com/ManageIQ/manageiq/pull/18483 Drew, I think work around you proposed in #Comment 12 will help. PR I referred to in #Comment 17 would not help here Verified in Version: 5.11.0.3.20190507174347_a77bd90 |