Skip to content

Server crashes if REDIS['caching']['INSECURE_SKIP_TLS_VERIFY'] is True #7282

@candlerb

Description

@candlerb

NetBox version

v3.0.2

Python version

3.8

Steps to Reproduce

  1. Edit configuration.py
  2. Under REDIS, under 'caching', set 'INSECURE_SKIP_TLS_VERIFY': True,
  3. Restart netbox

Expected Behavior

Netbox to restart

Observed Behavior

Netbox fails to start, due to trying to access a non-existent dict member:

Sep 16 08:47:54 netbox3 gunicorn[10261]:   File "/opt/netbox/netbox/netbox/settings.py", line 258, in <module>
Sep 16 08:47:54 netbox3 gunicorn[10261]:     CACHES['default']['OPTIONS']['CONNECTION_POOL_KWARGS']['ssl_cert_reqs'] = False
Sep 16 08:47:54 netbox3 gunicorn[10261]: KeyError: 'CONNECTION_POOL_KWARGS'
Sep 16 08:47:54 netbox3 gunicorn[10261]: [2021-09-16 08:47:54 +0000] [10261] [INFO] Worker exiting (pid: 10261)
Sep 16 08:47:54 netbox3 gunicorn[10258]: [2021-09-16 08:47:54 +0000] [10258] [WARNING] Worker with pid 10261 was terminated due to signal 15
Sep 16 08:47:54 netbox3 gunicorn[10258]: [2021-09-16 08:47:54 +0000] [10258] [INFO] Shutting down: Master
Sep 16 08:47:54 netbox3 gunicorn[10258]: [2021-09-16 08:47:54 +0000] [10258] [INFO] Reason: Worker failed to boot.

I suggest adding something like:

CACHES['default']['OPTIONS'].setdefault('CONNECTION_POOL_KWARGS', {})

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions