Skip to content

[Bug] Additional NetBox VM-tags are removed while running #536

@AskskwBv8T2nrm4Qnj

Description

@AskskwBv8T2nrm4Qnj

Is this urgent?

No

How are you running netbox-ssot?

Podman

Which version of netbox are you using

v4.2.4

Which version of netbox-ssot are you running

v1.11.6

Which module has the issue?

Proxmox

Share your configuration

netbox:
  apiToken: "token"
  hostname: "xxx.nl"
  httpScheme: https
  port: 443
  timeout: 30
  removeOrphans: false
  removeOrphansAfterDays: 2
  sourcePriority:
    - CLUSTER

source:
  - name: CLUSTERNAME
    type: proxmox
    username: user
    password: "password"
    httpScheme: https
    hostname: proxmox.xxx.nl
    validateCert: true
    ignoredSubnets:
    - 127.0.0.0/8
    - 169.254.0.0/16
    - ::1/128
    - fe80::/16
    - 172.16.0.0/12
    # Loopback, APIPA, loopback, link-local, Docker
    interfaceFilter: (veth*|Loopback*)
    hostSiteRelations:
      - .* = LOCATION-A
    clusterSiteRelations:
      - .* = LOCATION-A
    clusterTenantRelations:
     - .* = TENANT
    vmRoleRelations:
      - .* = PROXMOXVM
    hostRoleRelations:
      - .* = PROXMOXSERVER
    vmTenantRelations:
      - CUST-.* = Customer

What is the problem?

Any 'unexpected' NetBox Tags on VMs managed by netbox-ssot, are removed while running netbox-ssot.

I'm not sure if this bug(?) is an expected result or not.

Steps to reproduce

  1. Run netbox-ssot to add VMs (In my case, of a Proxmox cluster)
  2. Add a tag to a VM that was added by netbox-ssot
  3. Re-run netbox-ssot, and the tag added to the NetBox VM will be removed.

What did you expect to happen?

I expected additional NetBox Tags to remain added to NetBox VMs.

What actually happened?

The NetBox tag I added in between runs was removed...

Share DEBUG-level logs (remove sensitive information)

Running version v1.11.6 built on 2025-04-06T15:09:34Z (commit b288ee365066180b464bf53b130a6a0377b17cac)
...
...
2025/05/22 14:45:09 add_items.go:1154   DEBUG   (<CLUSTER>): VM VM{Name: <SERVER>, Cluster: Cluster{Name: <CLUSTERNAME>, Type: ClusterType{Name: Proxmox}}} already exists in Netbox but is out of date. Patching it...
...
2025/05/22 14:45:10 rest.go:152         DEBUG   (<CLUSTER>): Successfully patched objects.VM: VM{Name: <SERVER>, Cluster: Cluster{Name: <CLUSTERNAME>, Type: <nil>}}
...
2025/05/22 14:45:10 add_items.go:1167   DEBUG   (<CLUSTER>): VM VM{Name: <SERVER>, Cluster: Cluster{Name: <CLUSTERNAME>, Type: <nil>}} already exists in Netbox and is up to date...


The changelog in NetBox:
Pre-Change Data:
tags: [
    "Cloud",
    "Source: <CLUSTER>",
    "netbox-ssot",
    "proxmox"
]

Post-Change Data:
{
    "tags": [
        "Source: <CLUSTER>",
        "netbox-ssot",
        "proxmox"
    ]
}

Share your environment details

Operating System: Rocky Linux 8.10 (Green Obsidian)
Kernel: Linux 4.18.0-553.40.1.el8_10.x86_64

If I can share any additional info, please let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions