[BUG] FLARE Console kits from dashboard are missing fields in fed_admin.json
Describe the bug FLARE Console kits downloaded from the dashboard can't be launched because they are missing a bunch of fields in the $EMAIL/startup/fed_admin.json file including the ca_cert location.
There are a bunch of top-level fields in the fed_admin.json which are populated when running nvflare provision manually, but which are missing when downloading the provisioned kit from the dashboard.
The workaround is to manually add these missing fields to the downloaded fed_admin.json (see example below).
To Reproduce Steps to reproduce the behavior:
- Host the dashboard
- Log in as the Project Admin
- Enter Project Configuration details and make public
- Enter Server Configuration server DNS name
- Go to Project Home and Freeze the project
- Go to Downloads then download and unzip the FLARE Console
- Open the file $EMAIL/startup/fed_admin.json
- Observe that some fields are missing under "admin": {...}
- Attempt to launch the console by running
./$EMAIL/startup/fl_admin.shand entering the user name - Observe the following exception
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/conda/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/conda/lib/python3.8/site-packages/nvflare/fuel/hci/tools/admin.py", line 115, in <module>
main()
File "/opt/conda/lib/python3.8/site-packages/nvflare/fuel/hci/tools/admin.py", line 97, in main
client = AdminClient(
File "/opt/conda/lib/python3.8/site-packages/nvflare/fuel/hci/client/cli.py", line 112, in __init__
self.api = AdminAPI(
File "/opt/conda/lib/python3.8/site-packages/nvflare/fuel/hci/client/api.py", line 370, in __init__
if len(ca_cert) <= 0:
TypeError: object of type 'NoneType' has no len()
Expected behavior
The fields in fed_admin.json which show up when running nvflare provision should also be in the fed_admin.json when downloading from the dashboard. A freshly downloaded FLARE console should be launched successfully without modification needed.
Screenshots Downloaded fed_admin.json:
{
"format_version": 1,
"admin": {
"overseer_agent": {
"path": "nvflare.ha.dummy_overseer_agent.DummyOverseerAgent",
"args": {
"sp_end_point": "fl-server-nlb-singleAZ-ffc95222dc034180.elb.us-east-1.amazonaws.com:8003:8004"
}
}
}
}
Correct fed_admin.json (produced via manual provision):
{
"format_version": 1,
"admin": {
"with_file_transfer": true,
"upload_dir": "transfer",
"download_dir": "transfer",
"with_login": true,
"with_ssl": true,
"cred_type": "cert",
"client_key": "client.key",
"client_cert": "client.crt",
"ca_cert": "rootCA.pem",
"prompt": "> ",
"overseer_agent": {
"path": "nvflare.ha.dummy_overseer_agent.DummyOverseerAgent",
"args": {
"sp_end_point": "fl-server-nlb-singleAZ-ffc95222dc034180.elb.us-east-1.amazonaws.com:8003:8004"
}
}
}
}
Desktop (please complete the following information):
- OS: ubuntu 20.04
- Python Version: 3.8.12
- NVFlare Version: 2.2.1
Additional context
- Using startup kits downloaded from the dashboard on the latest nvflare/nvflare image, launched with
nvflare dashboard -p 8008 --start
Thanks for reporting, @IsaacYangSLA can you take a look for this one ?
Thanks. This will be fixed in #1215 .