CCI-MOC / hil

Hardware Isolation Layer, formerly Hardware as a Service
Apache License 2.0
24 stars 54 forks source link

Bad log_dir in hil.cfg crashes server #976

Closed ianballou closed 6 years ago

ianballou commented 6 years ago

If log_dir is set to something inappropriate, the server will crash an report Unexpected error:. This error should report something more useful to the user. After this is fixed, perhaps it could be added to the config precheck (#966)

zenhack commented 6 years ago

Poked at this a little bit, this should be a simple matter of catching IOError specifically in the cli and handling it. we'll want to wait until #969 is merged though, since it will likely cause conflicts.

naved001 commented 6 years ago

Wouldn't what I suggest here fix this?

ianballou commented 6 years ago

It could still crash if the directory can't be accessed. The config check in #966 will only check for malformed directories, not if they exist or not. I do think configuring logging after validating the config file is a good idea though.

naved001 commented 6 years ago

Fixed by #966