Bug 2177907

Summary: Horizon shows "Unable to retrieve the project" error popup when image exist without owner
Product: Red Hat OpenStack Reporter: Ashish Gupta <ashigupt>
Component: python-django-horizonAssignee: Radomir Dopieralski <rdopiera>
Status: ASSIGNED --- QA Contact: Ashish Gupta <ashigupt>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.1 (Wallaby)CC: rdopiera, tkajinam
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
photo depecting the issue none

Description Ashish Gupta 2023-03-13 20:34:38 UTC
Created attachment 1950322 [details]
photo depecting the issue

Description of problem:
The Error popup "Unable to retrieve the project" is seen on Image page when there exist an image with no owner (or project it was owned by previously has been deleted) 

Version-Release number of selected component (if applicable):
python3-django-horizon-19.4.1-1.20230223141004.98685ed.el9ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create a project testing 
2. Source the cloud user rc credentials and Create an image with project owner as 
   testing 
3. Delete the project testing
4. navigate to Admin -> compute -> Images tab on Horizon dashboard


Actual results:
Owner name is empty and Pop-up with error message "Unable to retrieve the project"


Expected results:
Owner name should be displayed and no error popup 



Additional info:
Find the attachments for reference

Comment 1 Takashi Kajinami 2023-03-14 03:54:45 UTC
I'll fully defer to UV folks but I guess the current behavior is reasonable and can't be fixed.

Horizon retrieves image information from glance but glance only stores project ids in its db and
responses from glance never contain project names. If we need project name then we should query
keystone but in this case you have already deleted the project so horizon can't get project name.

If we really want to fix this then we should update glance db and api (and probably db schema
of all projects) to persist project names but that is a "huge" change. Also project name can be
updated in Keystone API and we have to propagate that change to literately all projects, which
doesn't sound feasible IMHO.