irrdnet/irrd

IRRd 4.2.0 fails to start when run in foreground mode and no logging configuration is set

Closed this issue · 3 comments

Describe the bug
I'm testing out an upgrade to IRRd 4.2.0 in a test environment where logging isn't really important. IRRd is run there with the --foreground argument, but it fails to start and prints the following error:

 2021-09-15 19:10:46,367 irrd[17]: [irrd.utils.process_support#CRITICAL] Essential IRRd subprocess encountered a fatal error, traceback follows, shutting down: 'Configuration' object has no attribute 'logging_config'
Traceback (most recent call last):
File "/home/irrd/irrd-venv/lib/python3.6/site-packages/irrd/utils/process_support.py", line 13, in run
     super().run()
   File "/usr/local/lib/python3.6/multiprocessing/process.py", line 93, in run
     self._target(*self._args, **self._kwargs)
   File "/home/irrd/irrd-venv/lib/python3.6/site-packages/irrd/server/http/server.py", line 33, in run_http_server
     log_config=configuration.logging_config,
 AttributeError: 'Configuration' object has no attribute 'logging_config'

To Reproduce
Run IRRd with the foreground argument like so:

irrd --foreground

and with the following logging configuration in the yaml configuration file:

  log:
    level: DEBUG

Expected behaviour
IRRd starts and logs information to the console

IRRd version you are running
E.g. 4.2.0

Yes, I can see how this is failing, and definitely is a bug. Logging to a file is the easiest workaround, if you really want to log to stdout for some reason, you could probably do it with a custom logging config.

This issue makes it difficult to run IRRd within a docker container. Is there any plan to fix it any time soon?

This was just fixed and released in 4.2.2.