VolumeStatsTask NPE 방지#836
Open
dhslove wants to merge 1 commit into
Open
Conversation
Skip volume stats collection for volumes whose format is unavailable instead of allowing List.of(...).contains(null) to throw. Also guard missing pool metadata in the volume stats path.
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.
요약
VolumeStatsTask가 볼륨 통계 수집 중volume.getFormat()또는 pool 메타데이터가 비어 있는 경우NullPointerException을 반복 출력하지 않도록 보강했습니다.UserVmManagerImpl#getVolumeStatistics에서도 storage pool, Up host, provider 조회 결과가 비어 있는 경합 상황을 null-safe하게 처리했습니다.확인한 현상
VolumeStatsTask가 약 10분 주기로java.util.ImmutableCollections$ListN.indexOf경유 NPE를 반복했습니다.List.of(...).contains(null)호출이며, 실제 로그의 스택은StatsCollector$VolumeStatsTask.runInContext에서 발생했습니다.검증
mvn -pl server -Dtest=StatsCollectorTest test -DskipSurefireReportmvn -pl server -DskipTests packageServerDaemon재시작 및 API alive 확인VolumeStatsTaskNPE가 재발하지 않고 null format volume은 debug skip 로그로 처리됨을 확인배포 메모
cloud-server-4.22.0.0-SNAPSHOT.jar와cloudstack-4.22.0.0-SNAPSHOT.jar양쪽에 동일 class가 있어 두 jar 모두 패치가 필요했습니다.