-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Bug] create cluster datacenter relation failed #427
Comments
Hello, this error occurs when trying to find all clusters for a datacenter (see code). I am using wildcard character for searching, which in my local setups returns all clusters for the datacenter. What datacenter/cluster relations do you have on this source? |
bl4ko
added a commit
that referenced
this issue
Jan 27, 2025
bl4ko
added a commit
that referenced
this issue
Jan 27, 2025
I've made this dirty patch and it works : diff --git a/internal/source/vmware/vmware.go b/internal/source/vmware/vmware.go
index fe31f00..35b458f 100644
--- a/internal/source/vmware/vmware.go
+++ b/internal/source/vmware/vmware.go
@@ -269,11 +269,19 @@ func (vc *VmwareSource) CreateClusterDataCenterRelation(
finder.SetDatacenter(dc)
clusters, err := finder.ClusterComputeResourceList(ctx, "*")
if err != nil {
- return fmt.Errorf(
- "finder failed finding clusters for datacenter %s: %s",
- dc.InventoryPath,
- err,
- )
+ clusters, err := finder.ComputeResourceList(ctx, "*")
+
+ if err != nil {
+ return fmt.Errorf(
+ "finder failed finding clusters for datacenter %s: %s",
+ dc.InventoryPath,
+ err,
+ )
+ }
+
+ for _, cluster := range clusters {
+ vc.Cluster2Datacenter[cluster.Reference().Value] = dc.Reference().Value
+ }
} |
Thanks for the debug. Will you be willing to make a PR for this, since you have already created a patch? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this urgent?
Yes, it's critical
How are you running netbox-ssot?
From source (Go)
What is the version of netbox-ssot
latest
Which module has the issue?
General (not module-specific)
Share your configuration
What is the problem?
Steps to reproduce
netbox-ssot -config ./config.yml
What did you expect to happen?
No failure
What actually happened?
Share DEBUG-level logs (remove sensitive information)
Share your environment details
No response
The text was updated successfully, but these errors were encountered: