Open MalfuncEddie opened 4 years ago
Hello, @MalfuncEddie.
Thanks for the report. You are indeed correct we should only update the VM relevant to the vCenter it was detected on originally. I'll work on improving this behavior. Thanks for the report!
I have merged this into develop
. Thanks!
Hi,
I juist checkt the develop branch te see the fix. but it looks like the problem is still there. The vm is create in the last cluster but it has the tags "Vcenter A" and "Vcenter B".
@MalfuncEddie I am requesting the resources to test this again. Was the sync done in an already populated NetBox instance? I had to remove the second vCenter tag from the existing VM object as it had already been synced that way and I didn't see a duplication on a fresh sync, but I am going to fully retest this on my side. Thanks!
I'll clean my setup and run the sync again. results tomorrow :)
On Tue, May 12, 2020 at 1:44 PM Raymond Beaudoin notifications@github.com wrote:
@MalfuncEddie https://github.com/MalfuncEddie I am requesting the resources to test this again. Was the sync done in an already populated NetBox instance? I had to remove the second vCenter tag from the existing VM object as it had already been synced that way and I didn't see a duplication on a fresh sync, but I am going to fully retest this on my side. Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/synackray/vcenter-netbox-sync/issues/93#issuecomment-627292135, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANDKCZPDB5WHKGCM64VJODRREZC3ANCNFSM4MOIO36Q .
Hi,
run.py -c Did a check an there were no vm/ tag/ ...
ran run.py again: same result vm gets created vm get updated run it again vm get updated
the diff shows update 1 { "cluster": 23, "platform": 28 } to { "cluster": 29, "platform": 1 } update 2: { "cluster": 29, "platform": 1 } to { "cluster": 23, "platform": 28 }
and the vm has 2 vcenter tags
I didn't try it myself but can you have two virtual machines with the same name in netbox?
No, VM name is unique
Id and name are the primary keys. Then the only solution would be to rename both VMs in netbox with their cluster name as suffix.
Hi,
This could be solved by adding a custom field UUID and using that as the primary key. In either case I've written a custom script that does juist that since I also had the same cluster names in different vcenters :( .
kind regards
On Fri, Sep 25, 2020 at 11:01 PM Ricardo notifications@github.com wrote:
Id and name are the primary keys. Then the only solution would be to rename both VMs in netbox with their cluster name as suffix.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/synackray/vcenter-netbox-sync/issues/93#issuecomment-699153263, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANDKC4O54VSCVUPZRIGTNTSHUALPANCNFSM4MOIO36Q .
I was thinking the same.
How did you name your clusters then? Vcenter name as prefix?
Yes I did
On Sat, Sep 26, 2020, 08:28 Ricardo notifications@github.com wrote:
I was thinking the same.
How did you name your clusters then? Vcenter name as prefeix?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/synackray/vcenter-netbox-sync/issues/93#issuecomment-699438362, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANDKC4VOAVCU4Y35IPD3H3SHWCYFANCNFSM4MOIO36Q .
Just stumbled across this issue. VM and Device names are NOT unique. Here a long discussion on this topic: https://github.com/netbox-community/netbox/issues/2669
Steps to Reproduce
Expected Behavior
The vm should be create two times, one in each cluster.
Observed Behavior
When the script searches if a vm exists it finds the VM of CLUSTER B and changes is to CLUSTER A. When the script is processing CLUSTER B and it finds the same VM the VM is updated from CLUSTER A to B