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

Netbox Group is set to "host" when Host/Cluster Folder is used inside a datacenter #195

Closed
RobiRob81 opened this issue Jun 1, 2022 · 7 comments
Labels
awaiting reply Awaiting reply from issue owner
Milestone

Comments

@RobiRob81
Copy link

Hi,

when a cluster is placed inside a host folder in a datacenter, the import change the "Cluster Group" to "host" and not the Foldername.

Example:
Datacenter --> TEST --> Cluster01
Group will be set to "TEST".

Datacenter --> TEST2 --> Folder: SiteA --> Cluster-Site-A-01
Group will be set to "host".

thanks,
Robert

@bb-Ricardo
Copy link
Owner

Thank you for this info. This seems interesting and should not be happening.
I'm currently rewriting this part about cluster and group detection due to an another issue.
Will let you know when it's ready for testing.

bb-Ricardo added a commit that referenced this issue Jun 9, 2022
@bb-Ricardo
Copy link
Owner

Hi @RobiRob81

I just pushed another commit to "development" branch. Can you check it out and test if it works now?

@bb-Ricardo bb-Ricardo added this to the 1.3.0 milestone Jun 9, 2022
@bb-Ricardo bb-Ricardo added the awaiting reply Awaiting reply from issue owner label Jun 9, 2022
@RobiRob81
Copy link
Author

Hi @bb-Ricardo

just used the dev branch version.
What i see in a dry run is that only the same cluster will created and each VM under the cluster will be reassigned.
But it's still the same name.

INFO: Created new cluster object: testcluster01
INFO: Virtual machine 'VMTEST01' attribute 'cluster' changed from 'testcluster01' to 'testcluster01'
INFO: Virtual machine 'VMTEST02' attribute 'cluster' changed from 'testcluster01' to 'testcluster01'
....
INFO: Cluster group 'host' attribute 'tags' changed from '['NetBox-synced', 'Source: vsphere']' to '['Source: vsphere']'

I don't see a new group assignment.

If i manually change in netbox the cluster group to the desired folder then i just see this additional line from a new run.
INFO: Cluster group 'host' attribute 'tags' changed from '['NetBox-synced', 'Source: vsphere']' to '['Source: vsphere']'

All runs are only with "dry run".
Does it matter to do it only with dry run?

thanks,
Robert

@bb-Ricardo
Copy link
Owner

Hi, It might seem as the same cluster but it isn't. It has a different group. The problem is that multiple clusters with the same name can be created in NetBox. That's why it seems like the same cluster (name wise) but it isn't.

But your actual issue with 'host' as cluster name has been resolved?

Dry run tells you what changed but does not change it in NetBox.

@bb-Ricardo
Copy link
Owner

Hi, I added a change to the 'development' branch to print the cluster group for a cluster as well. Can you see if this works better?

@RobiRob81
Copy link
Author

Hi, thanks for your update.
I just need to rename the current cluster in netbox. After that the sync script did created a new cluster with "Datacenter" Group. Folders are not used. Looks good.

@bb-Ricardo
Copy link
Owner

Thank you for testing it.

andreiKuznets0v pushed a commit to andreiKuznets0v/netbox-sync_try_vcloud that referenced this issue Feb 27, 2023
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

2 participants