Skip to content

CNS API contracts for NUMA-Aware Pods #3825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pjohnst5
Copy link
Contributor

@pjohnst5 pjohnst5 commented Jul 14, 2025

CNS IBDevice API Contracts

Overview

Two new APIs for managing InfiniBand (IB) devices in Azure Container Network Service (CNS):

  1. PUT IB Devices for Pod - PUT IB devices for a pod
  2. GET IB Device Info - GET IB device status

API 1: PUT IB Devices for Pod

Endpoint

PUT /ibdevices/pod/{podname-podnamespace}

Request Body

{
  "podID": "my-pod-my-namespace",
  "macAddresses": ["60:45:bd:a4:b5:7a", "7c:1e:52:07:11:36"]
}

Success Response

{
  "errorCode": 0,
  "message": "Successfully assigned 2 devices to pod my-pod-my-namespace"
}

Error Response

{
  "errorCode": 2,
  "message": "Device 60:45:bd:a4:b5:7a is already assigned to another pod"
}

See errorCodes.go in this PR for full list of error codes.


API 2: GET IB Device Information

Endpoint

GET /ibdevices/{mac-address-of-device}

Request

No request body (MAC address provided in URL path)

Success Response

{
  "macAddress": "60:45:bd:a4:b5:7a",
  "podID": "my-pod-my-namespace", 
  "status": "programmed",
  "errorCode": 0,
  "message": ""
}

Device Not Found Response

{
  "deviceID": "60:45:bd:a4:b5:7a",
  "podID": "",
  "status": "",
  "errorCode": 3,
  "message": "Device not found"
}

See status.go in this PR for list of all statuses of an IB device


Request body

See api.go for the structs

  • AssignIBDevicesToPodRequest
  • AssignIBDevicesToPodResponse
  • GetIBDeviceInfoRequest
  • GetIBDeviceInfoResponse

@pjohnst5 pjohnst5 force-pushed the pjohnst5/cns-api-contracts branch 2 times, most recently from 71fa67a to 0564b6d Compare July 15, 2025 00:25
@pjohnst5 pjohnst5 force-pushed the pjohnst5/cns-api-contracts branch from 2f33476 to dad48b6 Compare July 22, 2025 23:54
@pjohnst5 pjohnst5 force-pushed the pjohnst5/cns-api-contracts branch from 7b6d80b to 82b11b0 Compare July 23, 2025 16:47
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.

1 participant