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

Bootstrap Errors Deleting ValidatedSoftware with DLM 3.0 #610

Closed
jdrew82 opened this issue Dec 2, 2024 · 0 comments · Fixed by #611
Closed

Bootstrap Errors Deleting ValidatedSoftware with DLM 3.0 #610

jdrew82 opened this issue Dec 2, 2024 · 0 comments · Fixed by #611
Assignees
Labels
integration: bootstrap Issues/PRs for Bootstrap integration status: accepted This issue has been accepted by the maintainers team for implementation type: bug Issues/PRs addressing a bug.

Comments

@jdrew82
Copy link
Contributor

jdrew82 commented Dec 2, 2024

Environment

  • Python version: 3.10
  • Nautobot version: 2.3.3
  • nautobot-ssot version: 3.1.0

Expected Behavior

Expect ValidatedSoftware objects that aren't in Boostrap data to be deleted.

Observed Behavior

Error is thrown:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/celery/app/trace.py", line 760, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/nautobot/extras/jobs.py", line 1136, in run_job
    result = job(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/nautobot/extras/jobs.py", line 149, in __call__
    return self.run(*args, **deserialized_kwargs)
  File "/usr/local/lib/python3.10/site-packages/nautobot_ssot/integrations/bootstrap/jobs.py", line 105, in run
    super().run(dryrun=self.dryrun, memory_profiling=self.memory_profiling, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/nautobot_ssot/jobs/base.py", line 354, in run
    self.sync_data(memory_profiling)
  File "/usr/local/lib/python3.10/site-packages/nautobot_ssot/jobs/base.py", line 196, in sync_data
    self.execute_sync()
  File "/usr/local/lib/python3.10/site-packages/nautobot_ssot/jobs/base.py", line 98, in execute_sync
    self.source_adapter.sync_to(self.target_adapter, flags=self.diffsync_flags)
  File "/usr/local/lib/python3.10/site-packages/diffsync/__init__.py", line 626, in sync_to
    return target.sync_from(self, diff_class=diff_class, flags=flags, callback=callback, diff=diff)
  File "/usr/local/lib/python3.10/site-packages/diffsync/__init__.py", line 598, in sync_from
    result = syncer.perform_sync()
  File "/usr/local/lib/python3.10/site-packages/diffsync/helpers.py", line 329, in perform_sync
    changed |= self.sync_diff_element(element)
  File "/usr/local/lib/python3.10/site-packages/diffsync/helpers.py", line 379, in sync_diff_element
    changed, modified_model = self.sync_model(src_model=src_model, dst_model=dst_model, ids=ids, attrs=attrs)
  File "/usr/local/lib/python3.10/site-packages/diffsync/helpers.py", line 436, in sync_model
    dst_model = dst_model.delete()
  File "/usr/local/lib/python3.10/site-packages/nautobot_ssot/integrations/bootstrap/diffsync/models/nautobot.py", line 2553, in delete
    _software = ORMSoftware.objects.get(version=self.software_version, device_platform=_platform)
NameError: name 'ORMSoftware' is not defined. Did you mean: 'Software'?

Steps to Reproduce

  1. Setup Boostrap integration with DLM 3.0.
  2. Create Validated Software object that doesn't exist in Boostrap data.
  3. Run Boostrap sync.
@jdrew82 jdrew82 added status: accepted This issue has been accepted by the maintainers team for implementation type: bug Issues/PRs addressing a bug. integration: bootstrap Issues/PRs for Bootstrap integration labels Dec 2, 2024
@jdrew82 jdrew82 self-assigned this Dec 2, 2024
@jdrew82 jdrew82 linked a pull request Dec 2, 2024 that will close this issue
@jdrew82 jdrew82 mentioned this issue Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: bootstrap Issues/PRs for Bootstrap integration status: accepted This issue has been accepted by the maintainers team for implementation type: bug Issues/PRs addressing a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant