OpenShift Container Storage is now OpenShift Data Foundation starting with version 4.9.
2장. must-gather를 사용하여 로그 파일 및 진단 정보 다운로드
Red Hat OpenShift Data Foundation이 문제를 자동으로 해결할 수 없는 경우 사용자 또는 Red Hat 지원이 문제를 검토하고 솔루션을 확인할 수 있도록 must-gather 툴을 사용하여 로그 파일 및 진단 정보를 수집합니다.
Red Hat OpenShift Data Foundation이 외부 모드로 배포되면 must-gather 는 OpenShift Data Foundation 클러스터에서만 로그를 수집하고 외부 Red Hat Ceph Storage 클러스터에서 디버그 데이터 및 로그를 수집하지 않습니다. 외부 Red Hat Ceph Storage 클러스터에서 디버그 로그를 수집하려면 Red Hat Ceph Storage 문제 해결 가이드 를 참조하고 Red Hat Ceph Storage Administrator에 문의하십시오.
사전 요구 사항
선택 사항: OpenShift Data Foundation이 연결이 끊긴 환경에 배포된 경우 개별
must-gather이미지를 연결이 끊긴 환경에서 사용 가능한 미러 레지스트리에 미러링해야 합니다.oc image mirror registry.redhat.io/odf4/ocs-must-gather-rhel8:v4.11 <local-registry>/odf4/ocs-must-gather-rhel8:v4.11 [--registry-config=<path-to-the-registry-config>] [--insecure=true]
$ oc image mirror registry.redhat.io/odf4/ocs-must-gather-rhel8:v4.11 <local-registry>/odf4/ocs-must-gather-rhel8:v4.11 [--registry-config=<path-to-the-registry-config>] [--insecure=true]Copy to Clipboard Copied! Toggle word wrap Toggle overflow <local-registry>- 연결이 끊긴 OpenShift Container Platform 클러스터에 사용 가능한 로컬 이미지 미러 레지스트리입니다.
<path-to-the-registry-config>-
레지스트리 자격 증명의 경로입니다. 기본값은
~/.docker/config.json입니다. --insecure- 미러 레지스트리가 비보안인 경우에만 이 플래그를 추가합니다.
자세한 내용은 Red Hat 지식베이스 솔루션을 참조하십시오.
절차
OpenShift Data Foundation 클러스터에 연결된 클라이언트에서
must-gather명령을 실행합니다.oc adm must-gather --image=registry.redhat.io/odf4/ocs-must-gather-rhel8:v4.11 --dest-dir=<directory-name>
$ oc adm must-gather --image=registry.redhat.io/odf4/ocs-must-gather-rhel8:v4.11 --dest-dir=<directory-name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow <directory-name>데이터를 쓸 디렉터리의 이름입니다.Is the name of the directory where you want to write the data to.
중요연결이 끊긴 환경 배포의 경우
--image매개변수의 이미지를 미러링된must-gather이미지로 교체합니다.oc adm must-gather --image=<local-registry>/odf4/ocs-must-gather-rhel8:v4.11 --dest-dir=<directory-name>
$ oc adm must-gather --image=<local-registry>/odf4/ocs-must-gather-rhel8:v4.11 --dest-dir=<directory-name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow <local-registry>- 연결이 끊긴 OpenShift Container Platform 클러스터에 사용 가능한 로컬 이미지 미러 레지스트리입니다.
이 명령은 지정된 디렉터리에서 다음 정보를 수집합니다.
- 모든 Red Hat OpenShift Data Foundation 클러스터 관련 CR(사용자 정의 리소스)과 네임스페이스.
- 모든 Red Hat OpenShift Data Foundation 관련 Pod 로그입니다.
- Status, Cluster health 및 기타와 같은 일부 표준 Ceph 명령의 출력입니다.
명령 변경
하나 이상의 마스터 노드가 Ready 상태가 아닌 경우
--node-name을 사용하여must-gatherPod를 안전하게 예약할 수 있도록 준비 중인 마스터 노드를 제공합니다.oc adm must-gather --image=registry.redhat.io/odf4/ocs-must-gather-rhel8:v4.11 --dest-dir=_<directory-name>_ --node-name=_<node-name>_
$ oc adm must-gather --image=registry.redhat.io/odf4/ocs-must-gather-rhel8:v4.11 --dest-dir=_<directory-name>_ --node-name=_<node-name>_Copy to Clipboard Copied! Toggle word wrap Toggle overflow 특정 시간에서 정보를 수집하려는 경우:
수집된 로그의 상대적 기간을 5초 또는 2일 이내에 지정하려면=<
duration> 이후 /usr/bin/gather를 추가합니다.oc adm must-gather --image=registry.redhat.io/odf4/ocs-must-gather-rhel8:v4.11 --dest-dir=_<directory-name>_ /usr/bin/gather since=<duration>
$ oc adm must-gather --image=registry.redhat.io/odf4/ocs-must-gather-rhel8:v4.11 --dest-dir=_<directory-name>_ /usr/bin/gather since=<duration>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 로그를 수집할 특정 시간을 지정하려면
/usr/bin/gather since-time=<rfc3339-timestamp>를 추가합니다.oc adm must-gather --image=registry.redhat.io/odf4/ocs-must-gather-rhel8:v4.11 --dest-dir=_<directory-name>_ /usr/bin/gather since-time=<rfc3339-timestamp>
$ oc adm must-gather --image=registry.redhat.io/odf4/ocs-must-gather-rhel8:v4.11 --dest-dir=_<directory-name>_ /usr/bin/gather since-time=<rfc3339-timestamp>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
다음과 같이 이러한 명령에서 예제 값을 바꿉니다.
- <node-name>
-
하나 이상의 마스터 노드가 Ready 상태가 아닌 경우 이 매개변수를 사용하여 여전히 Ready 상태에 있는 마스터 노드의 이름을 제공합니다. 이렇게 하면
must-gatherPod가 준비되지 않은 마스터 노드에 예약되지 않도록 하여 예약 오류가 발생하지 않습니다. - <directory-name>
-
must-gather에서 수집한 정보를 저장할 디렉터리입니다. - <duration>
-
정보를 상대 기간(예:
5시간 전부터 시작)으로 수집할 기간을 지정합니다. - <rfc3339-timestamp>
-
정보를 수집할 시간을 RFC 3339 타임 스탬프 (예:
2020-11-10T04:00:00+00:00:00:00:00)로 설정합니다(마지 2020년 11월 11일 오전 4시부터 시작).