hangctl: add storage guard for multipath and nfs#15
Merged
dhslove merged 2 commits intoablecloud-team:mainfrom Mar 18, 2026
Merged
hangctl: add storage guard for multipath and nfs#15dhslove merged 2 commits intoablecloud-team:mainfrom
dhslove merged 2 commits intoablecloud-team:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
hangctl이 가상머신 hang을 탐지하고destroy를 수행한 뒤 ABLESTACK HA 정책에 의해 VM이 재기동되는 과정에서,스토리지 경로 이상이 남아 있으면 VM이
PAUSE상태에 머물며 가상화 호스트 전체에 장애를 유발할 수 있다.특히 다음 두 경우를 선제적으로 처리할 필요가 있다.
이번 변경의 핵심
confirmed hang VM에 대한 action 직전에 storage guard를 수행하도록
hangctl을 확장했다.1. multipath 기반 block volume 보호
VM에 연결된 block disk를
virsh domblklist --details로 조회한 뒤,host source를
dmsetup기준으로 역추적하여 multipath map을 식별한다./sys/block/<dm>/slaves/*경로 상태 확인dmsetup message <map> 0 "fail_if_no_path"실행2. host-wide NFS mount 보호
VM 디스크 기준이 아니라, 호스트 전체의 NFS mount를 대상으로 점검한다.
findmnt -t nfs,nfs4로 host 전체 NFS mount inventory 수집umount -R -f -lumount -f -lfallback상세 변경 사항
hangctllibrary load path에storage_guard.sh추가device-mapper,util-linux추가hangctl_cmd_run()이 호출자에게 rc를 제대로 전달하지 않던 문제 수정기대 효과
HA 재기동 VM이
PAUSE에 갇히는 상황을 줄일 수 있음추가 hang 전파를 완화할 수 있음
검증
WSL 환경에서 아래 파일에 대해
bash -n문법 검증 수행bin/ablestack_vm_hangctl.shlib/hangctl/libvirt_wrap.shlib/hangctl/config.shlib/hangctl/actions.shlib/hangctl/storage_guard.sh주의 사항
hangctlaction 흐름 안에서 storage guard를 수행하는 방식이다.docs/ftctl/)는 이번 PR에 포함하지 않았다.