Skip to content

Commit 5f847b9

Browse files
committed
fix: do not tag non-owned ERIs with creator=alibabacloud-erdma-controller
EnsureEriTags is called on ENIs that may not have been created by this controller (ECS-console pre-bound ERDMA NICs, Primary ENIs converted to RDMA, backfilled legacy nodes). Tagging them with creator=alibabacloud- erdma-controller is misleading. Only the terway-excluded and instance-id tags are now applied; the creator tag remains exclusively on ENIs this controller actually creates via CreateNetworkInterface.
1 parent 06e5d4e commit 5f847b9

2 files changed

Lines changed: 5 additions & 21 deletions

File tree

README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,6 @@ kubectl get erdmadevices
8686
kubectl get node -o yaml | grep aliyun/erdma
8787
```
8888

89-
### Coexistence with terway CNI
90-
91-
To prevent terway from allocating Pod IPs from ERDMA network interfaces, this
92-
controller tags every managed ERI with the following tags:
93-
94-
| Tag Key | Tag Value |
95-
|---------|-----------|
96-
| `creator` | `alibabacloud-erdma-controller` |
97-
| `instance-id` | the ECS instance id |
98-
| `terway.alibabacloud.com/excluded` | `true` |
99-
100-
The tags are applied both to ENIs created by this controller and to ENIs
101-
already attached to the node (e.g. ERDMA NICs bound through the ECS console
102-
before the node joined the cluster). Recent terway versions recognize these
103-
tags as a built-in block list and will skip the corresponding ENIs, so no
104-
manual `eni_tag_filter` configuration on the terway side is required.
105-
10689
### Using ERDMA Accelerated Network
10790
#### Pod Configurations to Enable ERDMA Accelerated Network
10891
* add `aliyun/erdma` resource in pod spec # config erdma devices for pod

internal/controller/eri.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,11 @@ func (e *EriClient) ConvertPrimaryENI(primaryENI string, instanceID string, queu
198198
return nil
199199
}
200200

201-
// EnsureEriTags adds the creator/instance-id/terway-excluded tags to the given ENIs.
201+
// EnsureEriTags adds the terway-excluded and instance-id tags to the given ENIs.
202+
// It deliberately does NOT add the creator tag because this method is called on
203+
// ENIs that may not have been created by erdma-controller (e.g. ECS-console
204+
// pre-bound ERDMA NICs or Primary ENIs converted to RDMA). The creator tag is
205+
// only set at CreateNetworkInterface time for ENIs this controller actually creates.
202206
// TagResources is idempotent on the cloud side: re-applying the same (key,value)
203207
// pair is a no-op, so this is safe to call repeatedly. instanceID may be empty,
204208
// in which case the instance-id tag is skipped.
@@ -207,9 +211,6 @@ func (e *EriClient) EnsureEriTags(eniIDs []string, instanceID string) error {
207211
return nil
208212
}
209213
tags := []*ecs.TagResourcesRequestTag{{
210-
Key: ptr.To(eriTagCreatorKey),
211-
Value: ptr.To(eriTagCreatorValue),
212-
}, {
213214
Key: ptr.To(eriTagExcludedKey),
214215
Value: ptr.To(eriTagExcludedValue),
215216
}}

0 commit comments

Comments
 (0)