Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New Behavior
Adds a new script (
trace_paths
) to the netbox container entrypoint.The fact that
netbox-docker
currently does not call this script broke cable traces in our environment after an upgrade to NetBoxv2.10.0
due to changes in the cable tracing logic.Contrast to Current Behavior
The script is currently not called in entrypoint or any other place in
netbox-docker
as far as I can see.Discussion: Benefits and Drawbacks
The script will run on every container start, this is probably a bit overkill, especially in K8s scenarios. However, the script should only retrace missing cable traces, so the overhead shouldn't be too big.
If you have suggestions for a different location, I'm open for it, but since it's doing DB operations I'm not sure where else it would fit
The
netbox
upgrade script also callsremove_stale_contenttypes
,clearsessions
, and the cacheinvalidate all
.Maybe these should be added to the entrypoint as well? I think this would solve a lot of issues related to upgrading the
netbox-docker
image in an environment.I don't think these are as critical as
trace_paths
, but I'll gladly add them to this PR if you agree.Changes to the Wiki
I don't think anything is necessary here, but adding a "How to upgrade" wiki page might be something worth considering.
Proposed Release Note Entry
The NetBox
manage.py
commandtrace_paths
from the NetBox upgrade script is now called in docker entrypointDouble Check
develop
branch.