Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program settings won't read starting_folder setting from configuration file #857

Closed
1 task
jolopezl opened this issue Jun 28, 2021 · 7 comments
Closed
1 task
Assignees
Labels
bug Something isn't working

Comments

@jolopezl
Copy link
Contributor

jolopezl commented Jun 28, 2021

The CARTA backend crashes when starting it with the following backend settings file:

{
    "verbosity": 5,
    "port": 3020,
    "grpc_port": 50071,
    "starting_folder": "/home/cartadev/temp/CARTAvis/data",
    "top_level_folder": "/home/cartadev/temp/CARTAvis/data",
    "frontend_folder": "/home/cartadev/temp/CARTAvis/carta-frontend/build",
    "omp_threads": 4
}

with the following message:

[2021-06-28 20:39:19.490] [info] Writing to the log file: /home/cartadev/.carta/log/carta.log
[2021-06-28 20:39:19.491] [debug] Reading user settings from /home/cartadev/.carta/backend.json.
[2021-06-28 20:39:19.491] [info] /home/cartadev/temp/CARTAvis/carta-backend/build/./carta_backend: Version 2.0.0-dev.21.04.27
[2021-06-28 20:39:19.491] [critical] Starting /home/cartadev/temp/CARTAvis/carta-backend/build must be a subdirectory of top level /home/cartadev/temp/CARTAvis/data. Exiting carta.

It also fails if one attempts to start CARTA as:

> ./carta_backend --starting_folder=/home/cartadev/temp/CARTAvis/data --top_level_folder=/home/cartadev/temp/CARTAvis/data
[2021-06-28 20:41:29.167] [critical] Option ‘starting_folder’ does not exist

which is the natural guess for the starting_folder command-line setting. It works if one uses base instead:

> ./carta_backend --base=/home/cartadev/temp/CARTAvis/data --top_level_folder=/home/cartadev/temp/CARTAvis/data
[2021-06-28 20:42:29.665] [info] Writing to the log file: /home/cartadev/.carta/log/carta.log
[2021-06-28 20:42:29.665] [debug] Using command-line settings
[2021-06-28 20:42:29.665] [debug] Reading user settings from /home/cartadev/.carta/backend.json.
[2021-06-28 20:42:29.665] [info] /home/cartadev/temp/CARTAvis/carta-backend/build/./carta_backend: Version 2.0.0-dev.21.04.27
[2021-06-28 20:42:29.671] [info] CARTA gRPC service available at 0.0.0.0:50071
[2021-06-28 20:42:29.672] [info] Serving CARTA frontend from /home/cartadev/temp/CARTAvis/carta-frontend/build
[2021-06-28 20:42:29.672] [info] Listening on port 3020 with top level folder /home/cartadev/temp/CARTAvis/data, starting folder /home/cartadev/temp/CARTAvis/data, and 4 OpenMP worker threads
[2021-06-28 20:42:29.879] [info] CARTA is accessible at http://localhost:3020/?token=6D49DBB9-67E7-47CB-A70A-14FA9B57F3C7
[2021-06-28 20:42:31.402] [debug] Updated 1 preferences
[2021-06-28 20:42:31.418] [debug] Updated 2 preferences
[2021-06-28 20:42:31.926] [debug] 0x7fdc6a009200 ::Session (1)
[2021-06-28 20:42:31.926] [info] Session 1 [127.0.0.1] Connected. Num sessions: 1
[2021-06-28 20:42:36.692] [debug] WebSocket closed with code 1006 and message ''.
[2021-06-28 20:42:36.693] [info] Client 1 [127.0.0.1] Deleted. Remaining sessions: 1
[2021-06-28 20:42:36.693] [debug] 0x7fdc6a009200 ~Session 0
[2021-06-28 20:42:36.693] [info] No remaining sessions.
^C[2021-06-28 20:42:38.577] [info] Exiting backend.

These are two different problems but involves a similar change. I propose updating the command line settings arguments, adding starting_folder to the command line arguments, and fixing the first case, which is a bug for a missing keyword in the program setting dictionaries.

To-do:
- [ ] add starting_folder option to the command line,

  • add missing keyword for starting_folder in the program setting dictionaries.
@jolopezl jolopezl added bug Something isn't working enhancement New feature or request labels Jun 28, 2021
@jolopezl jolopezl self-assigned this Jun 28, 2021
@jolopezl
Copy link
Contributor Author

I guess this is partly duplicated since we already have #807

@pford
Copy link
Collaborator

pford commented Jun 28, 2021

If you run carta_backend --help you can see the parameters. base has been deprecated as a parameter for the starting folder, which is now a positional parameter instead of an option: carta {OPTION...] <starting_folder>

@veggiesaurus
Copy link
Collaborator

the positional argument is used for the starting folder. For example,
carta_backend /home/angus/data will use the top level folder of / (default) and /home/angus/data as the starting folder

@jolopezl
Copy link
Contributor Author

jolopezl commented Jun 28, 2021

Ok! Thanks, @pford, and @veggiesaurus. I got confused while getting CARTA crashing with what I was aiming to test for other things. I was trying to get it working using backend json-based settings, but I kept failing there with starting_folder (which is really missing for that) but tested the command line differently using what I guessed what correct --starting_folder.

@jolopezl jolopezl removed the enhancement New feature or request label Jun 28, 2021
@veggiesaurus
Copy link
Collaborator

@jolopezl can we close this in favour of #807?

@jolopezl
Copy link
Contributor Author

Yes, of course!. I am ashamed of having opened this issue now.

@veggiesaurus
Copy link
Collaborator

Yes, of course!. I am ashamed of having opened this issue now.

At least now we're all on the same page 👍

veggiesaurus pushed a commit that referenced this issue Jul 5, 2021
* ProgramSettings: add missing (settings #807 and #857)

* ProgramSettings: drop unnecesary change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants