Skip to content
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

Run all on single device fails because job input is missing from that job #746

Open
jeffkala opened this issue Mar 27, 2024 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@jeffkala
Copy link
Contributor

The new fail_job_on_task_failure was missing on the run all jobs, since its the only job not using the mixin, which if one of the nornir plays fails causes this traceback.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nautobot/extras/jobs.py", line 153, in __call__
    return self.run(*args, **deserialized_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nautobot_golden_config/jobs.py", line 126, in gc_repo_wrapper
    if kwargs["fail_job_on_task_failure"]:
       ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'fail_job_on_task_failure'�[0m
[2024-03-27 00:00:02,151: INFO/MainProcess] Task nautobot_golden_config.jobs.AllDevicesGoldenConfig[60a78216-851b-4b53-89a7-3bf8571f1fdd] received
[2024-03-27 00:00:02,405: INFO/ForkPoolWorker-1] nautobot_golden_config.jobs.AllDevicesGoldenConfig[60a78216-851b-4b53-89a7-3bf8571f1fdd]: Running job
�[1;31m[2024-03-27 00:05:13,199: ERROR/ForkPoolWorker-1] Task nautobot_golden_config.jobs.AllDevicesGoldenConfig[60a78216-851b-4b53-89a7-3bf8571f1fdd] raised unexpected: NornirNautobotException("`E3016:` The provided job parameters didn't match any devices detected by the Golden Config scope. Please check the scope defined within Golden Config Settings or select the correct job parameters to correctly match devices.")
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nautobot/extras/jobs.py", line 153, in __call__
    return self.run(*args, **deserialized_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nautobot_golden_config/jobs.py", line 108, in gc_repo_wrapper
    self.qs = get_job_filter(kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nautobot_golden_config/utilities/helper.py", line 86, in get_job_filter
    raise NornirNautobotException(
nornir_nautobot.exceptions.NornirNautobotException: `E3016:` The provided job parameters didn't match any devices detected by the Golden Config scope. Please check the scope defined within Golden Config Settings or select the correct job parameters to correctly match devices.�[0m
@gsnider2195
Copy link
Contributor

@jeffkala it looks like this may have been fixed by #750. Can you confirm?

@gsnider2195 gsnider2195 added question Further information is requested bug Something isn't working labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants