incus-kr2 freeze 원인 = AMD-Vi (IOMMU) Completion-Wait timeout

호스트 약 2주 간격 freeze 재발 패턴 분석 결과 AMD Ryzen 6900HX의
IOMMU Completion-Wait queue stall이 근본 원인. GRUB cmdline에
`iommu=pt` 추가하여 IOMMU passthrough 모드로 차단.

- infra/compute/hosts/incus-kr2.md 신규 (호스트 정본)
- history/2026-05-04-amd-iommu-freeze.md 신규 (사건 기록)
- _index.md / infra-hosts.md 갱신
This commit is contained in:
kaffa
2026-05-05 07:18:28 +09:00
parent e068f18955
commit 35f1e16f09
4 changed files with 171 additions and 3 deletions

View File

@@ -0,0 +1,78 @@
---
title: incus-kr2
updated: 2026-05-04
tags: [infra, host, incus, k3s, seoul, amd, iommu]
type: host
host_kind: server
location: seoul
provider: self-hosted
status: active
ssh_host: incus-kr2
tailscale_ip: 100.119.109.41
lan_ip: 192.168.9.135
lan_ip_2_5g: 192.168.205.135
os: Debian 13 (trixie)
kernel: 6.12.85+deb13-amd64
cpu_model: AMD Ryzen 9 6900HX
cpu_cores: 16
ram_gb: 30
k3s_role: control-plane
critical: true
monthly_cost_usd: 0
chassis: Bosgame EffiZen Series (mini PC)
---
## 역할
Incus + K3s control-plane 호스트 (서울존). Mini PC 폼팩터, AMD Ryzen 9 6900HX. K3s control-plane 2 중 하나, Incus 프로젝트 `default` + `inbest`. inbest 프로젝트가 leewell.com 등 7 컨테이너(cloudflared/nginx/php5/php8/mariadb10/phpmyadmin/sftp) 호스팅 — kr2 단일 장애 시 leewell.com 포함 inbest 서비스 전체 다운.
## 네트워크
- 1G LAN `192.168.9.135` (eno1) — Tailscale 진입
- 2.5G LAN `192.168.205.135` (USB r8152, `enx803f5dd34c9f`) — 백업/대용량 전송용 (실 사용량 14~70 B/s 수준으로 거의 idle, [[infra-hosts]] 참조)
- Tailscale `100.119.109.41`
## 전원/원격제어
- Tapo 스마트플러그 연결 → 강제 리부팅 가능 (호스트 hang 시 유일한 OOB 수단)
- iLO/IPMI 미장착 (mini PC 폼팩터)
## 알려진 hang 패턴 — AMD-Vi (IOMMU) Completion-Wait Timeout
호스트 freeze가 반복 발생한 근본 원인 (2026-05-04 확정, [[2026-05-04-amd-iommu-freeze]]).
**증상**:
- ICMP/이미 매핑된 프로세스(node-exporter, LXC 컨테이너 nginx)는 응답 유지
- containerd, incus 데몬, sshd 새 세션 fork만 동시에 hang
- kubelet `container runtime is down`, `/var/log/pods readdirent: input/output error`
- procs_blocked 0, MemoryPressure False — 자원 고갈 아님
**원인**: AMD Ryzen 6900HX IOMMU(AMD-Vi) Completion-Wait queue stall. `dmesg``AMD-Vi: Completion-Wait loop timed out` 반복 후 누적되어 DMA 의존 디바이스(NVMe, USB 컨트롤러 등)가 stall.
**조치 (2026-05-04 적용)**: GRUB cmdline `iommu=pt` 추가 → IOMMU passthrough 모드. dmesg `iommu: Default domain type: Passthrough` 확인.
**과거 freeze 이력 비교**:
| 일자 | 원인 | 조치 |
|------|------|------|
| 2026-04-04 | USB 2.5GbE r8152 autosuspend hang ([[2026-04-04-usb-25g-hang]]) | `usbcore.autosuspend=-1` + udev rule |
| 2026-04-19 | OOM freeze (RAM 30 GiB 과적) | `kubelet system-reserved=8Gi` |
| 2026-05-04 | AMD-Vi IOMMU Completion-Wait timeout | `iommu=pt` |
## kr2 전용 K3s 설정
- `kubelet system-reserved=memory=8Gi`, `eviction-hard=memory.available<2Gi` (2026-04-19 OOM 대응, RAM 30 GiB로 K3s + Incus 공존)
- 변경 금지 — 제거 시 OOM 재현 위험
## GRUB cmdline
```
ro usbcore.autosuspend=-1 quiet iommu=pt
```
- `usbcore.autosuspend=-1` — USB r8152 절전 hang 차단 (2026-04-04)
- `iommu=pt` — AMD-Vi Completion-Wait timeout 차단 (2026-05-04)
## 디스크
- `/dev/nvme0n1` — root + 데이터, ext4 937 GiB (사용 18%)
- SMART 깨끗 (Critical Warning 0, Media Errors 0, Percentage Used 1%)

View File

@@ -1,6 +1,6 @@
---
title: 인프라 호스트 및 네트워크
updated: 2026-04-26 bouncer 단일화 — jp1 default 20→19 (cs-cf-worker-bouncer 폐기) + hp2 default 5→4 (anomaly-detect 폐기 2026-04-25)
updated: 2026-05-04 incus-kr2 GRUB `iommu=pt` 적용 (AMD-Vi Completion-Wait timeout 차단)
tags: [infra, network, kr-zone, openwrt]
---
@@ -15,7 +15,7 @@ tags: [infra, network, kr-zone, openwrt]
| apisix-osaka | 100.108.39.107 | [[apisix]] API Gateway (오사카) | SSH 직접 접속 |
| incus-jp1 | 100.109.123.1 | Incus 호스트 (도쿄) | agents, db, default, monitoring 프로젝트 |
| incus-kr1 | 100.84.111.28 | Incus+K3s 호스트 (서울) | GTX 1080 Ti, K3s control-plane (LAN 192.168.9.214), default 프로젝트 |
| incus-kr2 | 100.119.109.41 | Incus+K3s 호스트 (서울) | K3s control-plane (LAN 192.168.9.135), default, inbest 프로젝트 |
| incus-kr2 | 100.119.109.41 | [[incus-kr2\|Incus+K3s 호스트 (서울)]] | **AMD Ryzen 9 6900HX, 30 GiB RAM, Bosgame mini PC**, K3s control-plane (LAN 192.168.9.135), default, inbest 프로젝트, GRUB `iommu=pt` (AMD-Vi hang 차단, [[2026-05-04-amd-iommu-freeze]]), Tapo 스마트플러그 OOB |
| incus-hp1 | — | Incus+K3s 호스트 (서울) | **HP ProLiant DL360p Gen8** 베어메탈, Xeon E5-2670 32코어, 188GB RAM, K3s worker/k3s-agent (LAN 192.168.9.227), 1GbE only (2.5G 미탑재), Tailscale 미설치, default 프로젝트, 2026-04-16 신규 |
| incus-hp2 | 100.100.52.34 | Incus+K3s 호스트 (서울) | **HP ProLiant DL360p Gen8** 베어메탈, Xeon E5-2670 32코어, 188GB RAM, 커널 6.12.74+deb13+1 (2026-04-14 업데이트), K3s worker/k3s-agent (LAN 192.168.9.134), default, inbest 프로젝트 |
| openwrt-gw | 100.66.60.66 | **OpenWrt 라우터 (서울, critical)** | HAProxy: 80/443 → MetalLB Traefik(192.168.9.53:80/443), 9080/9443 → MetalLB APISIX(192.168.9.50:80/443), **5432 → Patroni PostgreSQL Leader (K3s kine 데이터스토어 진입점, [[postgresql-ha]] 참조)**. 이 노드 다운 시 K3s API/HTTP 진입 모두 중단 |