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

Data Source Syncing Stuck when Sync originate from Complience Tests #131

Closed
aascedu opened this issue Oct 8, 2024 · 4 comments
Closed

Comments

@aascedu
Copy link

aascedu commented Oct 8, 2024

Validity Version

3.0.3

NetBox Version

4.1.1

Python Version

3.12.3

Steps to Reproduce

Launch tests with validity and checking Sync Data Source,
if it fails (in my case because ssh key was not working), the data source will become stuck in a sync state when you go to Operations --> Data sources, impossible to delete it or re-sync it.

I can try to explain more in detail if you need to!

Thank you ;)
Arthur

Note : If I am making too much issues with your plugin, don't hesitate to tell me ! I know we all have things to do everyday !

Traceback

"Unhandled error occured: `<class 'UnboundLocalError'>: cannot access local variable '_' where it is not associated with a value`
  File \"/opt/netbox/venv/lib/python3.12/site-packages/validity/scripts/runtests/base.py\", line 40, in terminate_job_on_error
    yield
  File \"/opt/netbox/venv/lib/python3.12/site-packages/validity/scripts/runtests/split.py\", line 109, in __call__
    self.sync_datasources(params.overriding_datasource, device_filter, logger)\n  File \"/opt/netbox/venv/lib/python3.12/site-packages/validity/scripts/runtests/split.py\", line 40, in sync_datasources
    self.datasource_sync_fn(datasources, device_filter)
  File \"/opt/netbox/venv/lib/python3.12/site-packages/validity/utils/misc.py\", line 74, in datasource_sync
    any(tp.map(sync_func, datasources))
  File \"/usr/lib/python3.12/concurrent/futures/_base.py\", line 619, in result_iterator yield _result_or_cancel(fs.pop())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3.12/concurrent/futures/_base.py\", line 317, in _result_or_cancel
    return fut.result(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3.12/concurrent/futures/_base.py\", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3.12/concurrent/futures/_base.py\", line 401, in __get_result
    raise self._exception
  File \"/usr/lib/python3.12/concurrent/futures/thread.py\", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/opt/netbox/venv/lib/python3.12/site-packages/validity/utils/misc.py\", line 66, in sync_func
    datasource.sync(device_filter)
  File \"/opt/netbox/venv/lib/python3.12/site-packages/validity/models/data.py\", line 112, in sync
    return super().sync()
           ^^^^^^^^^^^^^^
  File \"/opt/netbox/netbox/core/models/data.py\", line 164, in sync
    raise SyncError(_(\"Cannot initiate sync; syncing already in progress.\"))
                    ^"
@amyasnikov
Copy link
Owner

Hey @aascedu, according to the traceback you've provided I can conclude that it's NetBox issue, not Validity one. I suppose you can try to run sync of git-based data source twice (second one must be started before first one finishes) and run into exactly the same situation

@amyasnikov
Copy link
Owner

FYI: netbox-community/netbox#17713

@aascedu
Copy link
Author

aascedu commented Oct 9, 2024

Thank you @amyasnikov, You seem very devoted to Netbox and your plugin, I would love to know why ?
Thank you for for all your help!

@amyasnikov
Copy link
Owner

You seem very devoted to Netbox and your plugin, I would love to know why ?

So, why not? :)
I'm interested in providing high-quality product to the open source community

I'm closing this issue, so please keep track of the netbox issue I've provided above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants