Forum Discussion
Using only a portVlanAttachment (and not a port) also does not work. I think this might be a bug? The condition event says this:
Last Transition Time: 2024-07-17T00:47:06Z
Message: apply failed: POST https://api.equinix.com/metal/v1/ports/c6b1b719-5ea7-4509-8ede-ee46b05ce4d5/assign: 422 still bonded :
Reason: ApplyFailure
Status: False
Type: LastAsyncOperation
My resource definition looks like this:
---
apiVersion: metal.equinix.jet.crossplane.io/v1alpha1
kind: PortVlanAttachment
metadata:
name: mmellinproj-equinix-sv-v1000
spec:
forProvider:
deviceIdSelector:
matchLabels:
jci.jnpr.net/equinix: device
forceBond: False
portName: eth1
vlanVnid: 1000
It seems that the unbonding only occurs when a "Port" resource is created, although it is clearly specified here in the API. Then to attach vlans I must use a PortVlanAttachment. No other combination has been successful for me.
From your configuration, it looks like you want eth0 in broken bond0 with layer3 mode and eth1 out of bond in layer2 mode. This is referred to as a Hybrid Unbonded configuration: https://deploy.equinix.com/developers/docs/metal/layer2-networking/hybrid-unbonded-mode/.
Using PortVlanAttachment for Hybrid Unbonded configuration will also require use of DeviceNetworkType with `type: "hybrid"`.
In the Device's default `hybrid-bonded` port mode, it makes sense that attaching a VLAN to eth1 reports "still bonded". If you don't actually need `hybrid` (unbonded) mode, you could change the target portName in your PortVlanAttachment to bond0.
The following Hybrid Unbonded section of the Metal Device Types guide shows how this can be done with Terraform, the Crossplane configuration would apply similarly: https://registry.terraform.io/providers/equinix/equinix/1.20.1/docs/guides/network_types#hybrid-unbonded-device-with-a-vlan
Related Content
- 2 months ago