Return native Engine NotFound faults and clear Web UI session on 401.
Include the bad id in host/datacenter/cluster errors, expire stale auth in the console, and document Ingress annotations that preserve fault bodies.
This commit is contained in:
@@ -38,6 +38,49 @@ make seed-demo
|
||||
Проверьте, что `OVIRT_SERIES` соответствует ожидаемому pack
|
||||
([api-versions.md](api-versions.md)).
|
||||
|
||||
## HTTP 401 / Web UI всё ещё показывает пользователя
|
||||
|
||||
Токен Engine SSO истёк или отозван (например после `demo/unload` / reseed).
|
||||
В Web UI HTTP **401** очищает локальную сессию и показывает **Guest** в
|
||||
шапке; войдите снова из Environment (`admin@internal` / `secret`).
|
||||
|
||||
## Ingress отдаёт брендированный HTML 404 / nginx 405 вместо fault Engine
|
||||
|
||||
Симулятор отвечает на ошибки API **fault** XML/JSON (`reason` / `detail`).
|
||||
Если видите HTML «page not found» или plain nginx **405**, **Ingress /
|
||||
reverse proxy** подменил тело ответа (часто через `custom-http-errors` у
|
||||
ingress-nginx).
|
||||
|
||||
Исправление на Ingress для этого host (см.
|
||||
`helm/ovirt-api-simulator/values-ingress-example.yaml`):
|
||||
|
||||
```yaml
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/proxy-intercept-errors: "false"
|
||||
nginx.ingress.kubernetes.io/custom-http-errors: "502,503"
|
||||
```
|
||||
|
||||
Проверьте с `Accept: application/json`. Отсутствующий host должен выглядеть так:
|
||||
|
||||
```json
|
||||
{"fault": {"reason": "NotFound", "detail": "No such host ('…')"}}
|
||||
```
|
||||
|
||||
### Корректная authenticated mutation (стиль Engine)
|
||||
|
||||
Bearer (или Basic) и JSON-тело (не form-urlencoded):
|
||||
|
||||
```bash
|
||||
# после POST /ovirt-engine/sso/oauth/token → access_token
|
||||
TOKEN=…
|
||||
curl -sk -X POST "https://HOST/ovirt-engine/api/vms" \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-H "Accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Version: 4" \
|
||||
-d '{"vm":{"name":"lab-vm","cluster":{"name":"Default"}}}'
|
||||
```
|
||||
|
||||
## Падения клиентских suites
|
||||
|
||||
Убедитесь, что стек поднят и засеян, затем сначала smoke:
|
||||
|
||||
Reference in New Issue
Block a user