Skip to content

fix: 라이브 하이퍼바이저 조회의 실패 경로 정정 - #43

Merged
yessjun merged 2 commits into
mainfrom
fix/metrics-error-paths
Aug 10, 2026
Merged

fix: 라이브 하이퍼바이저 조회의 실패 경로 정정#43
yessjun merged 2 commits into
mainfrom
fix/metrics-error-paths

Conversation

@yessjun

@yessjun yessjun commented Aug 10, 2026

Copy link
Copy Markdown
Member

📝 작업내용

  • 토큰이 설정되지 않은 상태에서도 사용량 조회가 설계한 503으로 답하게 함
  • 노드 라이브 블록에서 스토리지 조회 실패를 분리해 상태 조회가 성공한 노드를 도달 불가로 표시하지 않게 함
  • 노드 상태 응답이 비어 있을 때 대시보드 전체가 죽던 경로를 막음
  • 오프라인 노드는 라이브 프로브 대상에서 제외
  • 하이퍼바이저 읽기를 읽기 전용 트랜잭션 밖으로 옮겨 커넥션 점유를 없앰
  • 시각이 없는 시계열 지점을 매핑 단계에서 제외
  • 두 지점 DTO에 복사돼 있던 반올림 헬퍼를 한 곳으로 모음

⭐️ 검증

  • 테스트 724개에서 738개로 증가, 항목별로 수정을 되돌려 실패를 확인
  • 계약 파일은 원격 main과 바이트 동일 (조회 표면 무변경)
  • 권한 매트릭스와 접근 스코프 검사 통과

💬 리뷰 포인트

  • 트랜잭션 경계를 좁힌 근거 (접근 검사 서비스가 자체 트랜잭션을 갖고, 이후 접근은 기본 컬럼뿐)
  • 오프라인 노드를 프로브하지 않으면서도 노드 수를 온전히 유지하는 방식
  • 시각 없는 지점을 버리는 처분 (계약의 필수 필드를 완화하지 않는 선택)

The usage series and the system panel's live node block each turned a
recoverable refusal into the wrong answer.

An unconfigured API token makes the client refuse before the request
leaves, and only the transport exception was caught, so a state the
configuration explicitly permits produced a 500 instead of the designed
503. On the node block, the storage probe shared a try with the status
probe, so losing the storage read right alone discarded a successful
status read and reported the node as not answering; the two probes are
now separate answers and a null status envelope reads as unreachable
rather than dereferencing past the catch. A node the operator marked
OFFLINE is no longer probed at all, matching the status poller, and
keeps its row so the node count stays whole. RRD rows without a
timestamp are dropped where the series is mapped, since the contract
makes that field required and a point with no place on the axis cannot
be charted.

The three reads also no longer run inside a read-only transaction. Each
held a pooled database connection for the whole Proxmox call, up to the
client read timeout, so a stalled pveproxy plus a refreshing dashboard
could drain the pool and take unrelated endpoints down with it. The
boundary is safe because nothing here needs one transaction: every
access lookup, repository call and collaborator carries its own, the
summary's tiles are independent counters, and the entities read
afterwards are touched on basic columns only, so no lazy association is
left outside a transaction.
@yessjun
yessjun merged commit 6c9b3d4 into main Aug 10, 2026
1 check passed
@yessjun
yessjun deleted the fix/metrics-error-paths branch August 10, 2026 11:10
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