-
Notifications
You must be signed in to change notification settings - Fork 2.7k
CLI script invocation is broken in NetBox 4.3.1 #19529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hrm, the workaround is not working for me, at least in my dev environment. |
Permissions issue perhaps? It worked for me in two environments. Anyway, it's just a side note. |
Turns out I was invoking the workaround incorrectly, my bad. Your workaround does work for me. |
This also affects Event Rule bulk import as it also relies on |
ScriptFileSystemStorage was introduced in #18896 and stores a full path in Script.file_path. This fix handles looking for scripts by relative path as well as full path.
This also affects invocation scripts through API. |
@jnovinger your fix doesn't help me. |
It seems that I've found the problem. New scripts was stored in database with full path.
Was it change done intentionally? |
Uh oh!
There was an error while loading. Please reload this page.
Deployment Type
Self-hosted
NetBox Version
v4.3.1
Python Version
3.11
Steps to Reproduce
SCRIPTS_ROOT = '/opt/netbox/netbox/scripts'
inconfiguration.py
dummy.py
:# /opt/netbox/netbox/manage.py runscript dummy.Dummy
Expected Behavior
The script gets executed from the command line, like in NetBox 4.2.9:
Observed Behavior
Script execution failed with an exception:
The script can be made to run in NetBox 4.3.1 with a modified invocation (which is definitely not how it's supposed to work):
The text was updated successfully, but these errors were encountered: