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

minor issue with final reporting by the end of netbox-sync execution #248

Closed
hikarikumo opened this issue Oct 18, 2022 · 4 comments
Closed
Labels
awaiting reply Awaiting reply from issue owner
Milestone

Comments

@hikarikumo
Copy link

hikarikumo commented Oct 18, 2022

Hello! Thanks a lot for a nice software.
When netbox-sync got up and running for more than a day the final report should corrected:

2022-10-18 01:03:25,587 - ERROR: Unfortunately updated item assigned_object_id for object 10.129.1.196/24 could not be fully resolved: <NBVMInterface instance 'vNIC 2 (AMS-1202) (veeam-test-02)' at 140638424179992>
2022-10-18 01:03:25,587 - INFO: Pruning orphaned data in NetBox
Traceback (most recent call last):
  File "./netbox-sync.py", line 145, in <module>
    main()
  File "./netbox-sync.py", line 141, in main
    log.info("Completed NetBox Sync in %s" % get_relative_time(datetime.now() - start_time))
  File "/home/vladimir.vasilenko/git/netbox-sync/module/common/misc.py", line 139, in get_relative_time
    parts = [float(x) for x in str(delta).split(":")]
  File "/home/vladimir.vasilenko/git/netbox-sync/module/common/misc.py", line 139, in <listcomp>
    parts = [float(x) for x in str(delta).split(":")]
ValueError: could not convert string to float: '2 days, 3'
@bb-Ricardo
Copy link
Owner

Hi, The script was running for 2 days? Wow. Was not anticipating this. Have to look into fixing this long run output 😄

@bb-Ricardo bb-Ricardo added this to the 1.4.0 milestone Oct 18, 2022
@christophe2049
Copy link

Hello, got a related (?) issue :
the script doesnt exit ater final reporting , stuck on (I havent tried to wait 2 days to check an error message)

2022-10-19 10:53:41,026 - DEBUG2: Resolving dependency: IP address
2022-10-19 10:53:41,113 - DEBUG: Third run, update all items with previous unresolved items
2022-10-19 10:53:41,117 - DEBUG2: Resolving dependency: IP address
2022-10-19 10:53:41,227 - DEBUG: Pruning disabled. Skipping
2022-10-19 10:53:41,228 - INFO: Completed NetBox Sync in 1 minute, 59.26 seconds

pressing CTRL-C :

2022-10-19 10:53:41,228 - INFO: Completed NetBox Sync in 1 minute, 59.26 seconds
^CError in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/opt/netbox-sync/.venv/lib/python3.8/site-packages/pyVim/connect.py", line 460, in __Logout
    content = si.RetrieveContent()
  File "/opt/netbox-sync/.venv/lib/python3.8/site-packages/pyVmomi/VmomiSupport.py", line 706, in <lambda>
    self.f(*(self.args + (obj,) + args), **kwargs)
  File "/opt/netbox-sync/.venv/lib/python3.8/site-packages/pyVmomi/VmomiSupport.py", line 512, in _InvokeMethod
    return self._stub.InvokeMethod(self, info, args)
  File "/opt/netbox-sync/.venv/lib/python3.8/site-packages/pyVmomi/SoapAdapter.py", line 1351, in InvokeMethod
    resp = conn.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
    response.begin()
  File "/usr/lib/python3.8/http/client.py", line 316, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 277, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
KeyboardInterrupt

Thank you for your help and thanx for the good job you provide with this helpful script !

@bb-Ricardo
Copy link
Owner

Hi, I pushed a fix for both issues to the development branch

@bb-Ricardo bb-Ricardo added the awaiting reply Awaiting reply from issue owner label Nov 27, 2022
@bb-Ricardo
Copy link
Owner

consider this issue as resolved

andreiKuznets0v pushed a commit to andreiKuznets0v/netbox-sync_try_vcloud that referenced this issue Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reply Awaiting reply from issue owner
Projects
None yet
Development

No branches or pull requests

3 participants