You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nautobot version (Docker tag too if applicable): nautobot:stable-py3.11
Python version: 3.11
Database platform, version: postgres:13
Middleware(s): default
Steps to Reproduce
I have create this job in the root folder for jobs (/opt/nautobot/jobs:
## Tutorial: https://josh-v.com/nautobot-jobs-in-jobs-root/
from django.conf import settings
from nautobot.dcim.models import Device
from nautobot.apps.jobs import Job, ObjectVar, register_jobs
from netmiko import ConnectHandler
name = "Get Version Huawei Smartax EA5800"
class GetVersionOLT(Job):
device = ObjectVar(
model=Device,
description="Device to get the version of"
)
def run(self, device):
self.log_debug(device)
class Meta:
name = "Get Version OLT"
description = "Get the version of the OLT"
register_jobs(GetVersionOLT)
I do the nautobot-server post_upgrade and restart the dockers for nautobot, celery_worker and celery_beat
I try to run the job create
Expected Behavior
It should run the job without any major issue, printing the data from the device.
Observed Behavior
It crashed the celery_worker saying the following:
2024-03-08 14:54:08 [2024-03-08 13:54:08,522: WARNING/MainProcess] /usr/local/lib/python3.11/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
2024-03-08 14:54:08 whether broker connection retries are made during startup in Celery 6.0 and above.
2024-03-08 14:54:08 If you wish to retain the existing behavior for retrying connections on startup,
2024-03-08 14:54:08 you should set broker_connection_retry_on_startup to True.
2024-03-08 14:54:08 warnings.warn(
2024-03-08 14:54:08
2024-03-08 14:54:08 [2024-03-08 13:54:08,536: WARNING/MainProcess] /usr/local/lib/python3.11/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
2024-03-08 14:54:08 whether broker connection retries are made during startup in Celery 6.0 and above.
2024-03-08 14:54:08 If you wish to retain the existing behavior for retrying connections on startup,
2024-03-08 14:54:08 you should set broker_connection_retry_on_startup to True.
2024-03-08 14:54:08 warnings.warn(
2024-03-08 14:54:08
2024-03-08 14:55:11 [2024-03-08 13:55:11,472: ERROR/MainProcess] Received unregistered task of type 'get_version_olt_jobs.GetVersionOLT'.
2024-03-08 14:55:11 The message has been ignored and discarded.
2024-03-08 14:55:11
2024-03-08 14:55:11 Did you remember to import the module containing this task?
2024-03-08 14:55:11 Or maybe you're using relative imports?
2024-03-08 14:55:11
2024-03-08 14:55:11 Please see
2024-03-08 14:55:11 https://docs.celeryq.dev/en/latest/internals/protocol.html
2024-03-08 14:55:11 for more information.
2024-03-08 14:55:11
2024-03-08 14:55:11 The full contents of the message body was:
2024-03-08 14:55:11 b'[[], {"device": "c2c05bf8-bd96-4c5c-8545-425504323d35"}, {"callbacks": null, "errbacks": null, "chain": null, "chord": null}]' (125b)
2024-03-08 14:55:11
2024-03-08 14:55:11 The full contents of the message headers:
2024-03-08 14:55:11 {'lang': 'py', 'task': 'get_version_olt_jobs.GetVersionOLT', 'id': '7aaae6da-91af-414e-8a48-6d2b3eb20699', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 0, 'timelimit': [0, 0], 'root_id': '7aaae6da-91af-414e-8a48-6d2b3eb20699', 'parent_id': None, 'argsrepr': '()', 'kwargsrepr': "{'device': UUID('c2c05bf8-bd96-4c5c-8545-425504323d35')}", 'origin': 'gen74@51696c90f8fb', 'ignore_result': False, 'replaced_task_nesting': 0, 'stamped_headers': None, 'stamps': {}}
2024-03-08 14:55:11
2024-03-08 14:55:11 The delivery info for this task is:
2024-03-08 14:55:11 {'exchange': '', 'routing_key': 'default'}
2024-03-08 14:55:11 Traceback (most recent call last):
2024-03-08 14:55:11 File "/usr/local/lib/python3.11/site-packages/celery/worker/consumer/consumer.py", line 658, in on_task_received
2024-03-08 14:55:11 strategy = strategies[type_]
2024-03-08 14:55:11 ~~~~~~~~~~^^^^^^^
2024-03-08 14:55:11 KeyError: 'get_version_olt_jobs.GetVersionOLT'
2024-03-08 14:55:11 [2024-03-08 13:55:11,475: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'Bunch' object has no attribute 'delivery_info'")
The text was updated successfully, but these errors were encountered:
Environment
Steps to Reproduce
nautobot-server post_upgrade
and restart the dockers for nautobot, celery_worker and celery_beatExpected Behavior
It should run the job without any major issue, printing the data from the device.
Observed Behavior
It crashed the celery_worker saying the following:
The text was updated successfully, but these errors were encountered: