21101 Commits

Author SHA1 Message Date
Jian Qiu
472b0ae4af fix: task params nil params panic (#25699)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-18 11:57:35 +08:00
Zexi Li
d108efd764 fix(baremetal): ignore RetrieveStorages leftover diagnostics when disks match (#25695)
Only fail buildRaid when no disk is selected, matching CalculateLayout behavior.
2026-09-18 11:17:09 +08:00
Zexi Li
1d1aea797c fix(host): mount kunlunxin xpu-smi and ml lib for containers (#25693)
Ensure container runtime mounts xpu-smi and libxpunvidia-ml.so.1
(including symlink targets) so XPU tooling works inside pods.
2026-09-18 10:58:01 +08:00
Jian Qiu
4abe94ca0b fix(mcp-server): read the field tags through the reflectutils accessor (#25690)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-17 14:15:29 +08:00
Zexi Li
0ea4d1c1ca Automated cherry pick of #25464: feat(host,llm): add Iluvatar GPU container device support (#25688)
* feat(host,llm): add Iluvatar GPU container device support

* feat(host,llm,monitor): add Thead PPU container device support

* feat(host,llm): add Kunlunxin XPU container device support
2026-09-16 11:50:04 +08:00
Zexi Li
07cb45bfac chore: replace issues-helper with gh CLI and refresh README (#25687)
Migrate issue label/close workflows to native gh scripts with explicit permissions, and update README cloud/AI coverage plus typo fixes.
2026-09-15 18:17:48 +08:00
Zexi Li
edcbd48487 feat(glance,region): support container registry and image (#25686)
Move container registry management into glance with import from
kubeserver, add container_image model, resolve container_image_id in
compute, and switch dashboard create flow to glance.
2026-09-15 15:32:27 +08:00
Zexi Li
abab2d4a2f fix(aiproxy): clarify unavailable backend error message (#25682) 2026-09-13 22:31:59 +08:00
Zexi Li
4702df66b6 fix(aiproxy): detect listen address (#25679) 2026-09-13 12:36:10 +08:00
Zexi Li
d950d70102 feat(aiproxy): allow listing virtual key token field (#25676)
Expose VirtualKey in list responses so clients can retrieve the token without a separate get.
2026-09-11 18:46:01 +08:00
Zexi Li
d203580430 fix(llm): keep aiproxy routing across stop/restart (#25673)
Do not unsync or delete deployment ai_routing when replicas leave running; reconcile on running so routing/provider IDs stay stable.
2026-09-11 16:43:18 +08:00
Zexi Li
3fd882452b feat(llm): route MCP agent via aiproxy virtual key and routing id (#25667)
Support X-Ai-Routing-Id to pin ai_routing, treat empty model_pattern as non-wildcard, and wire MCP agent to aiproxy credentials instead of direct LLM api_key.
2026-09-11 10:14:08 +08:00
Jian Qiu
1074f3694d fix: classic nic dhcp default gateway revisit (#25670)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-10 21:05:32 +08:00
Jian Qiu
0590e3a434 fix: keystone-role-assignments-list-scope (#25652)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-10 17:25:32 +08:00
Jian Qiu
3c47ebba45 fix(cloudid): omit clouduser secret from list and get responses (#25651)
Return console login details from the login-info action; skip secret in resource JSON and logs.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 17:24:44 +08:00
Jian Qiu
23d7222bd0 fix: keystone idp join project roles check (#25653)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-10 16:39:09 +08:00
Jian Qiu
e96ca5b665 fix(llm): validate mcp agent server url and session endpoint (#25622)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 15:29:59 +08:00
Jian Qiu
c16d7fcb58 fix(llm): authenticate llm router agent route requests (#25626)
Fetch the agent with the caller session and check perform permission.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 14:37:17 +08:00
Jian Qiu
4b9f523424 fix(llm): require get permission when resolving llm_id (#25627)
Fetch the referenced LLM with the caller session before filling access URL fields.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 13:19:53 +08:00
Jian Qiu
19d63a7a36 fix(identity): validate rolepolicy create and bind-role requests (#25628)
Require role_id and reuse the role add-policy checks when creating a binding.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 13:10:46 +08:00
屈轩
d87a26f70c fix(region): convert kvm prefer storage (#25631) 2026-09-10 12:21:45 +08:00
Jian Qiu
b1d1cad973 fix(identity): check assume login with system scope and target roles (#25629)
Keep the caller session when authorizing assume and reuse join-project role checks.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 12:14:33 +08:00
Jian Qiu
f208976ef0 fix(ansible): validate playbook inventory, connection, and file paths (#25605)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 11:55:48 +08:00
Jian Qiu
c24383dd63 fix(image): reject images that declare a backing file (#25630)
Treat a non-empty backing filename as unsupported on upload, convert, probe, and ceph cache.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 11:55:18 +08:00
Jian Qiu
cb3e3cbb08 fix: allow host networks no gateway (#25625)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-10 01:32:49 +08:00
Jian Qiu
b6b9a3a2ab fix: classic net distribute default route for default nic (#25618)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-09 22:29:00 +08:00
Zexi Li
66409634a4 fix(region): include disabled hosts in isolated device usage stats (#25621)
Keep GPU/device usages consistent with hosts inventory; scheduling still uses enabled hosts only.
2026-09-09 22:27:59 +08:00
Jian Qiu
9f38eaea55 fix(container): validate host bind paths and create host-path files with argv (#25591)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 20:28:55 +08:00
wanyaoqi
a31b6bd52b fix(region): set force stop default timeout 30s (#25614) 2026-09-09 20:28:36 +08:00
Zexi Li
ee255297a7 fix(llm): skip stale container status during pod transitions (#25611)
Watch container events and defer LLM status updates while the pod is starting/stopping, so exited leftovers are not treated as start_fail.
2026-09-09 16:52:11 +08:00
Zexi Li
6f6d0a70c9 fix(host): use assigned nvidia GPU memory for pod metrics (#25608)
Derive mem total from isolated-device quotas when available, and harden
losetup ListDevices against empty --json output.
2026-09-09 12:01:47 +08:00
Jian Qiu
24e1299648 fix(guestfs): keep guest file deploy inside the mounted filesystem (#25592)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 23:46:58 +08:00
Jian Qiu
0b7ecb6c3c fix(identity): check SAML assertion issuer, audience, and optional signature (#25596)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 20:04:56 +08:00
屈轩
705ae5ef5a fix(region): support renew kvm vm (#25593) 2026-09-08 15:50:11 +08:00
Jian Qiu
d6419376fa fix(cloudcommon): fall back list query scope to the resource default view (#25587)
When admin or scope query parameters do not map to a concrete view, use the resource's own scope and keep owner filters applied.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 14:34:20 +08:00
wanyaoqi
876a893dc1 fix(host): start new goroutine to stop guest (#25586) 2026-09-08 14:08:53 +08:00
Zexi Li
da6ea51b5c feat(llm): support force restart for LLM and deployments (#25583)
Allow force restart when instances are failed, protect restarting status
during sync, refresh GPU memory from deployment, and tolerate crash-loop
while waiting for service ready.
2026-09-07 21:14:00 +08:00
屈轩
5fb64e76d2 fix(mcp-server): upgrade mcp lib (#25574) 2026-09-07 14:25:53 +08:00
Zexi Li
80c4977f58 feat(llm): allow disabling pod/container cgroup CPU and memory limits (#25577)
Inference SKUs default to off; SKU and CLI expose enable flags so hosts can skip CFS quota and memory hard limits when needed.
2026-09-07 14:06:35 +08:00
屈轩
d76698cfa1 fix(region): vendor update (#25570) 2026-09-07 10:27:13 +08:00
Jian Qiu
56fec3fcb5 fix(apigateway): authenticate csrf resource requests with the caller session (#25566)
Align the csrf resource handler with other API resource handlers by requiring a token and forwarding with the caller's own session.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 20:48:18 +08:00
Jian Qiu
0f830b4219 fix: verify test revisit (#25562)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-04 19:39:30 +08:00
Jian Qiu
59b658ce87 fix: module not found return 404 (#25558)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-04 19:23:42 +08:00
屈轩
bb540b7a4a fix(region): esxi v2v prefer storage (#25554) 2026-09-04 17:33:31 +08:00
Jian Qiu
95332ed656 fix(webconsole): authenticate sftp endpoints and check session owner (#25502)
The sftp list/download/upload endpoints were not protected by
authentication, only by the UUID4 session id. Anyone who learned the
session id (it appears in URLs and logs) could list, download and
upload files of the VM over the victim's active SSH/SFTP channel.

Wrap all three endpoints with auth.Authenticate and record the owner
of each sftp session at registration, so only the user who opened the
session can use it.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 13:46:08 +08:00
Jian Qiu
2f0ce30f5c fix(webconsole): validate ssh target ip against accessible resources (#25487)
The ssh console endpoint accepted a raw ip address in the URL path
and dialed it directly with user provided credentials, so any
authenticated user could use the webconsole service as an internal
SSH proxy, port scanner and credential brute-forcer.

Resolve the ip against hosts (access_ip) and servers (ip_addr)
visible to the user's session and require it to match one of them,
rejecting all other addresses.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 10:06:25 +08:00
Jian Qiu
f56e2327b1 fix(s3gateway): enforce signature freshness and single key decoding (#25490)
- Reject signed requests older or newer than 15 minutes (x-amz-date
  for v4, Date for v2), so intercepted valid requests can no longer
  be replayed indefinitely
- Decode the object key exactly once: r.URL.Path is already decoded
  by net/http and is the form the signature covers, decoding again
  let a signature for one key be replayed against another
  (e.g. %252e%252e%252f resolving to ../)
- Add unit tests for both behaviors

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 09:19:43 +08:00
Jian Qiu
c805952b40 fix(webconsole): fetch kubeconfig with user session for k8s shell (#25484)
The k8s shell/log endpoints fetched the target cluster kubeconfig
with the admin session, bypassing RBAC and owner scope checks, so any
authenticated user could exec into pods and read logs of any
registered cluster.

Fetch the kubeconfig with the user's own session instead, so policy
checks and owner filtering apply, and command records are attributed
to the real user.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 09:18:52 +08:00
Jian Qiu
bebb68775f fix(webconsole): generate session key with crypto/rand (#25486)
The AES key encrypting all console session tokens was derived from
rand.Float32 with only about 24 bits of entropy, so it could be
recovered by brute force from a single known (session id, token)
pair and then be used to forge access tokens of arbitrary sessions.

Generate the key from 32 crypto/rand bytes instead (about 192 bits
of effective entropy). Sessions live in process memory only, so a
per-process random key is sufficient.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 09:17:43 +08:00
Jian Qiu
afc0519d87 fix(webconsole): isolate RDP console sessions with unique ids (#25485)
RemoteRDPConsoleInfo.GetId() always returned an empty string, so all
RDP sessions were stored under the same key in the session manager:
any valid RDP access token resolved to whatever RDP session was stored
last, letting a user take over another user's console session
(host/port/username/password).

Give every RDP session a random UUID id and validate in
SSessionManager.Get that the presented access token is exactly the
one issued for the session, so sessions can not be reached by any
other token.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 09:16:50 +08:00