Must-gather is a tool for gathering logs and other relevant information from OpenShift Clusters, which is helpful for debugging. The must-gather itself is generic for all projects running on OpenShift, but each project could have one or more must-gather images to gather information relevant for a given purpose (like logs, CRs, metrics, and others ).
In Migration toolking for virtualization (MTV), we use must-gather to get debugging information to find the root cause of migration issues. The most relevant information gathered by must-gather are Custom Resources (CRs) which contain migration data and related inventory, like VM or data volumes and controller logs.
Gathered information is very valuable for identifying a root cause of possible failures or providing background information for customer’s tickets or upstream issues. However, the amount of data captured by must-gather could become huge. That means that the time needed for must-gather execution is pretty long, and large archives are produced by the must-gather tool. Archives with size in gigabytes are not great to be uploaded as a customer ticket attachment, and searching for relevant data within a large archive gets complicated and time-consuming.
The Crane/MTC team, in Konveyor, introduced parallelization of must-gather tasks. Commands on the image were executed in the background, and the main script waited until all gathering had finished. This decreased the time needed to execute the must-gather, but the result archive remains still as big as it was before.
To avoid gathering a bunch of less relevant data and keep archives in smaller size and faster must-gather executions, we implemented a “targeted gathering.”
The oc adm must-gather command accepts a custom command as an argument, so we used it to pass parameters to the must-gather execution. Parameters are environment variables that are specific to our VM migrations use cases. The forklift-must-gather image contains script /usr/bin/targeted which handles these parameters and filters objects captured into the result must-gather archive.
Objects are filtered according to their type. The targeted gathering script knows the relation between CRs and adds only relevant ones into the archive. Logs are filtered by a grep command, and the search query is constructed from CRs types, names, and IDs, resulting in a smaller file generated with more precise and targeted data.
An example of gathering Forklift debugging information for VM vm-3345 from the namespace ns-test-1 is below. More examples can be found in Forklift must-gather project README.
oc adm must-gather --image=quay.io/konveyor/forklift-must-gather:latest -- VM=vm-3345 NS=ns-test-1 /usr/bin/targeted
Narrowing results in must-gather archives helps to keep the result archives smaller, faster generated, but still providing the most relevant information. That helps getting debugging information from customers or upstream community members. This way of the must-gather parametrization could be helpful to other projects that use OpenShift must-gather with their own gathering images.
저자 소개
유사한 검색 결과
Red Hat and Sylva unify the future for telco cloud
NetApp’s certified OpenShift operator for Trident
Edge computing covered and diced | Technically Speaking
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
가상화
온프레미스와 클라우드 환경에서 워크로드를 유연하게 운영하기 위한 엔터프라이즈 가상화의 미래