netbox-sync: fix orphan tagging if 'ignore_unknown_source_object_puning' is set to true
Hi Ricardo, I remember that you said that to me, but as soon I saw this issue, I reworked my entire docker deployment π The main problem arise with this condition https://github.com/bb-Ricardo/netbox-sync/blob/main/module/netbox/inventory.py#L314. A simple continue is not enough, the entire process of orphan tagging is skipped.
Maybe a condition like:
if this object has a tag that matches the current loaded source: orphan tagging is allowed.
Otherwise: object is not part of the loaded source so skip.
If I find some time, in the next few days, I will have a look at it and discuss with you a better solution. Thank you
_Originally posted by @rizlas in https://github.com/bb-Ricardo/netbox-sync/issues/176#issuecomment-1402761532_
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 23 (23 by maintainers)
Commits related to this issue
- fixes orphan tagging if ignore_unknown_source_object_puning is set to true #273 — committed to bb-Ricardo/netbox-sync by bb-Ricardo a year ago
- fixes issue with handling of pruning objects from unknonw sources #273 — committed to bb-Ricardo/netbox-sync by bb-Ricardo a year ago
- fixes issue with renamed class attributes from last commit #273 — committed to bb-Ricardo/netbox-sync by bb-Ricardo a year ago
- fixes issue with wrong usage of var name in netbox connection #273 — committed to bb-Ricardo/netbox-sync by bb-Ricardo a year ago
- removes source tags from objects which don't belong to that source #273 — committed to bb-Ricardo/netbox-sync by bb-Ricardo a year ago
- fixes issue with pruning data #273 — committed to bb-Ricardo/netbox-sync by bb-Ricardo a year ago
Thank you for all the testing and patients. Will close this issue.
Hi, itβs working fine now ππ» π Thank you! Only a little thing, I tried the behavior injecting manually the tag [NetBox-synced] and started sync like this:
After the run i got this situation:
It is caused because I manually injected the tag?
Hi,
Sorry for that. This slipped through. I thought I took care of it. Obviously not.
Will fix it soon.
I will, with almost a clean vcenter is 60MB output. As soon as I anonymize it Iβll share it with you.