Skip to content

Conversation

@pablogarciamiranda
Copy link
Collaborator

Context

When deploying NetBox with FORCE_NETBOX_NGINX_IPV4=true, the script patches the NetBox Deployment to mount a custom nginx-unit.json config. This change triggers a new ReplicaSet and Pod, but the old ReplicaSet and its pod may linger during rollout.

Since the NetBox pod uses a PVC with ReadWriteOnce access mode, Kubernetes prevents simultaneous attachment to the new pod. This causes a volume Multi-Attach error and stalls the deployment.

Solution

  • Identify the latest ReplicaSet owned by the netbox deployment
  • Delete the older ReplicaSets to free any attached volumes

@pablogarciamiranda pablogarciamiranda merged commit 0b5793b into main Jun 30, 2025
11 checks passed
vaishutin pushed a commit to vaishutin/netbox-operator that referenced this pull request Aug 17, 2025
…me Multi-Attach errors (netbox-community#345)

* Cleanup old ReplicaSets after NetBox deployment patch to prevent volume Multi-Attach errors
* Updating size of NetBox persistent volume

---------

Co-authored-by: Pablo Garcia Miranda <pablo.garciamiranda@swisscom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants