Project

General

Profile

Bug #36544

Updated by Alfonso Martínez over 5 years ago

Provided you have built the frontend with "--prod" flag, 
 when you try to create a new pool by clicking on "Add" 
 you see a blank a page instead of the pool creation form. 

 EXPLANATION 

 In "master > do_cmake.sh" we have: 

 ${CMAKE} -DCMAKE_BUILD_TYPE=Debug $ARGS "$@" .. || exit 1 

 This flag 

 CMAKE_BUILD_TYPE=Debug 
 that is causing that although yo do: 

 cd /ceph/build 

 make mgr-dashboard-frontend-build 

 ... you are building in dev mode (not PROD mode) because of this: 

 ==> src/pybind/mgr/dashboard/CMakeLists.txt: 

 if(NOT CMAKE_BUILD_TYPE STREQUAL Debug) 
   set(npm_command npm run build -- --prod --progress=false) 
 else() 
   set(npm_command npm run build -- --progress=false) 
 endif() 

 Once you do the frontend build with --prod in master, you are able to reproduce it. 

 ===> A PROVISIONAL HOTFIX 

  In         src/pybind/mgr/dashboard/frontend/src/app/app.module.ts 

 Add: 

 import { ErasureCodeProfileService } from './shared/api/erasure-code-profile.service'; 

 [...] 

 providers: [ 
 [...] 
   { 
     provide: ToastOptions, 
     useClass: CustomOption 
   }, 
   ErasureCodeProfileService // <==== Here is the provisional hotfix. 
 ], 

 IMHO the whole workflow should be reviewed under PROD environment to ensure 
 that everything is OK.

Back