Event rule not creating jobs #10248

Closed
opened 2025-12-29 21:28:50 +01:00 by adam · 6 comments
Owner

Originally created by @neuro42 on GitHub (Sep 14, 2024).

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

Originally created by @neuro42 on GitHub (Sep 14, 2024). ### 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
adam added the type: bugnetbox labels 2025-12-29 21:28:50 +01:00
adam closed this issue 2025-12-29 21:28:51 +01:00
Author
Owner

@arthanson commented on GitHub (Sep 16, 2024):

@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.

@arthanson commented on GitHub (Sep 16, 2024): @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.
Author
Owner

@neuro42 commented on GitHub (Sep 16, 2024):

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.

@neuro42 commented on GitHub (Sep 16, 2024): 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.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 24, 2024):

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.

@github-actions[bot] commented on GitHub (Sep 24, 2024): 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.
Author
Owner

@neuro42 commented on GitHub (Sep 24, 2024):

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.

@neuro42 commented on GitHub (Sep 24, 2024): 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.
Author
Owner

@jeremystretch commented on GitHub (Oct 22, 2024):

I was able to reproduce this by upgrading from v3.7.4 to v4.0.9. Looks like there's a bug in the 4.0 migration causing the event rule to lose it association with the specific script.

Unfortunately there's nothing we can do to address it at this point, as the 4.0 release is no longer maintained. However, it's very easy to recreate the event rule to restore the original functionality after upgrading.

@jeremystretch commented on GitHub (Oct 22, 2024): I was able to reproduce this by upgrading from v3.7.4 to v4.0.9. Looks like there's a bug in the 4.0 migration causing the event rule to lose it association with the specific script. Unfortunately there's nothing we can do to address it at this point, as the 4.0 release is no longer maintained. However, it's very easy to recreate the event rule to restore the original functionality after upgrading.
Author
Owner

@neuro42 commented on GitHub (Oct 22, 2024):

It also appeared in a direct migration to 4.1.1. The only difference with readding the job again, is all of the past history of the job running gets lost/split between the old one and the new one.

@neuro42 commented on GitHub (Oct 22, 2024): It also appeared in a direct migration to 4.1.1. The only difference with readding the job again, is all of the past history of the job running gets lost/split between the old one and the new one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10248