Skip to content

[Bug] failed to add vmware hypothetical cluster #786

Description

@gstorme

Is this urgent?

No

How are you running netbox-ssot?

Docker

Which version of netbox are you using

4.2.9

Which version of netbox-ssot are you running

Running version v1.26.0 built on 2026-07-15T18:12:50Z (commit f4cfd66)

Which module has the issue?

VMware

Share your configuration

source:
  - name: int-vcenter006
    type: vmware
    hostname: int-vcenter006
    username: ""
    password: ""
    ignoreVMTemplates: true
    interfaceFilter: (cali|vxlan|flannel|docker|[a-f0-9]{15})
    ignoreAssetTags: true
    ignoreVMDisks: true
    ignoreVMHost: true
    ignoreTags: true
    ignoredSubnets:
      - 'fe80::/10'
      - 'fd00::/8'
      - '169.254.0.0/16'
    clusterSiteRelations:
      - int-esx025 = Flex
      - int-esx026 = Flex
      - .* = LCL
    hostSiteRelations:
      - .* = LCL
      - int-esx025 = Flex
      - int-esx026 = Flex
    datacenterClusterGroupRelations:
      - FLEX = Flex
      - LCL = LCL
    vlanGroupRelations:
      - Guests Vlan 442 = Flex
      - Production = Flex
      - User Vlan 441 = Flex
      - .* = int-vcenter006
    vlanGroupSiteRelations:
      - Flex = Flex
      - .* = LCL

What is the problem?

This is the vCenter infrastructure:

Datacenters:

  • Flex
  • LCL

Flex DC has:

  • int-esx025 (host)
  • int-esx026 (host)

LCL DC contains:

  • int-lcl-esx001 (host)
  • int_lcl_r17_intvc006_clus002 (cluster)

add hypothetical cluster: failed to add vmware hypothetical cluster Cluster{Name: int-esx026, Type: ClusterType{Name: VMware ESXi}}: unexpected status code: 400: {"scope":["1 devices are assigned as hosts for this cluster but are not in site LCL"]}

Steps to reproduce

/

What did you expect to happen?

It uses the mapping from the configuration to map the host and hypothetical cluster to the "Flex" site, instead of LCL

What actually happened?

It wants to map the hypothetical cluster to site LCL

Share DEBUG-level logs (remove sensitive information)

2026/07/28 11:59:22 add_items.go:612    DEBUG   (int-vcenter006): Cluster int-esx026 already exists in Netbox but is out of date. Patching it...
2026/07/28 11:59:22 rest.go:130         DEBUG   (int-vcenter006): Patching objects.Cluster with path /api/virtualization/clusters/210/ with data: map[scope_id:2]
2026/07/28 11:59:22 main.go:124         ERROR   (int-vcenter006): add hypothetical cluster: failed to add vmware hypothetical cluster Cluster{Name: int-esx026, Type: ClusterType{Name: VMware ESXi}}: unexpected status code: 400: {"scope":["1 devices are assigned as hosts for this cluster but are not in site LCL"]}
2026/07/28 11:59:22 main.go:143         INFO    (main): Skipping removing orphaned objects because run failed...
2026/07/28 11:59:22 main.go:163         INFO    (main): ⚠ syncing of source int-vcenter006 failed with: add hypothetical cluster: failed to add vmware hypothetical cluster Cluster{Name: int-esx026, Type: ClusterType{Name: VMware ESXi}}: unexpected status code: 400: {"scope":["1 devices are assigned as hosts for this cluster but are not in site LCL"]}

Share your environment details

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions