netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.99k stars 2.57k forks source link

Event rule not creating jobs #17495

Open neuro42 opened 1 month ago

neuro42 commented 1 month ago

Deployment Type

Self-hosted

NetBox Version

v4.0.9, v4.1.1

Python Version

3.11

Steps to Reproduce

  1. Create an Event Rule to e.g. trigger a script when an IP Address is created/modified/deleted on 3.7.4
  2. Upgrade to 4.0.9 or 4.1.1
  3. Modify an IP Address

Expected Behavior

Job should be created to run the script

Observed Behavior

No job is created, with this error logged: Cannot import events pipeline extras.events.process_event_queue error: 'ScriptModule' object has no attribute 'python_class' Manually running the job works, but the name field in the job list is blank; runs on 3.7.x had this populated

arthanson commented 3 weeks ago

@neuro42 I wasn't able to recreate this, I created an event-rule, added the IP address and the script ran fine. Can you please double-check. This was on NetBox 4.1.1 please double check if you are using NetBox 4.1.1 as there was a change in it that effected EventRules / Scripts.

neuro42 commented 3 weeks ago

I've seen the same problem on 4.0.9 and 4.1.1, upgrading directly from the same 3.7.4 instance. This leads me to believe it's something in the 3.7 -> 4.0 upgrade migrations that is being missed, as it's not just 4.1.1 where the problem is seen.

github-actions[bot] commented 2 weeks ago

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

neuro42 commented 2 weeks ago

Additional information was provided. This has been reproduced with a 3.7.4 added script in upgrades to both 4.0.9 and 4.1.1, as described above.