Netbox worker unable to run custom scripts #18781
Unanswered
iamjpy
asked this question in
Help Wanted!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a very simple custom script which has been imported via the UI.
When it runs, it returns an

Errored
result in the UI:The logs show the job succeeded:
Using the CLI, I'm able to run the custom script with successful results on the
netbox
pod,But I'm unable to execute the script on the CLI of the
netbox-worker
pod nor am I able to access the/opt/netbox/netbox/scripts/
directory in thenetbox-worker
containerI have a netbox deployment installed using the netbox-chart helm chart. The
netbox
andnetbox-worker
pods are running on the same node withscriptsPersistence
enabled. I verified thenetbox-scripts
volume is mounted to both pods with RWO access. Both pods security contexts are configured with the same user and group UIDIt seems that when both the
netbox
andnetbox-worker
pods are running at the same time, one of them loses access to the scripts directory, usually thenetbox-worker
which I believe results in the theErrored
result upon executing the script via the UI. When I restart the pods in a different order, thenetbox-worker
pod regains access to the scripts volume and then thenetbox
pod loses it which results in a permissions error when running the custom script in the UI.Any help is appreciated
Beta Was this translation helpful? Give feedback.
All reactions