feat(gateway): define resource admission at the gateway level with a typed policy

オープン
#5,941 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
22/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
api, backend

調査の方向性

Start by reading DriverAdmissionConfig in openshell-core and following where the gateway extracts allow_driver_config and resource_admission from each [openshell.drivers.<name>] table; then read the Configure and GetCapabilities message definitions that carry resource_admission_policy_json and the v1:-prefixed reply. Use the driver_dir deprecated-alias handling as the model for the new [openshell.gateway.resource_admission] table and its warning. Done means the typed policy round-trips, the mismatch rejection still fires, and tests cover legacy location, new location and the round trip. This is a protocol change with a deprecation window, so agree the message shape with a maintainer before editing.

索引モデルが issue の本文から書いたものです。

説明

area:drivers

User Story

I operate the gateway with Docker, Podman or VM compute drivers and configure resource admission (allow_driver_config and resource_admission) for them. I directly encountered, while reviewing the launched-driver contract, that these gateway-level rules live in each driver's own table and travel to drivers as JSON text. This affects how clearly operators configure admission and how safely the protocol carries it.

Problem Statement

allow_driver_config and resource_admission are one shared policy type (DriverAdmissionConfig in openshell-core), enforced by the gateway and re-checked by each driver. It is configured under [openshell.drivers.<name>], so an operator repeats it per driver. The gateway pulls the two keys out of every driver table, and the launcher sends them to the driver as a JSON string (resource_admission_policy_json in Configure). The driver reports its effective policy back in GetCapabilities as another JSON string (resource_admission_policy, prefixed v1:), which the gateway compares with its own.

Impact / Why This Matters

The same policy is written in several places and carried as untyped text in two protocols. A typo or a format change is caught only at parse time, and the placement suggests a per-backend setting when it is a gateway rule.

Desired Workflow

Operators define resource admission once, under the gateway table (for example [openshell.gateway.resource_admission]). The driver-table location keeps working as a deprecated alias with a warning, as driver_dir does. The gateway sends the policy to launched drivers in a typed resource_admission_policy message in Configure, and drivers report it in GetCapabilities as the same typed message, so the gateway compares messages. The JSON fields are deprecated for one protocol version and then removed. Kubernetes and external drivers keep working through the existing capability handshake.

Acceptance Criteria

  • A gateway-level admission table is documented and takes precedence over the deprecated driver-table keys.
  • Configure and GetCapabilities carry a typed policy. resource_admission_policy_json is deprecated for one protocol version and then removed.
  • The gateway rejects a driver whose reported policy differs from its own, as it does today.
  • Tests cover the legacy driver-table location, the new location and the typed round trip.

Related: #5384, #5385. Deferred from the launcher PR.

主要言語
Rust
スター
21.5k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/OpenShell のほかの issue

NVIDIA/OpenShell の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。