9장. 설치 제거 중 나머지 리소스 문제 해결 및 삭제
경우에 따라 Operator에서 관리하는 일부 사용자 정의 리소스는 필요한 모든 정리 작업을 수행했지만 완료할 종료자에서 "Terminating" 상태가 남아 있을 수 있습니다. 이러한 경우 이러한 리소스를 강제로 제거해야 합니다. 이렇게 하지 않으면 모든 제거 단계를 수행한 후에도 리소스가 "Terminating" 상태로 유지됩니다.
openshift-storage 네임스페이스가 삭제 시 상태가 종료되는지 확인합니다.
$ oc get project -n <namespace>
출력:
NAME DISPLAY NAME STATUS openshift-storage Terminating
명령 출력의
STATUS
섹션에 있는NamespaceFinalizersRemaining
및NamespaceContentRemaining
메시지를 확인하고 나열된 각 리소스에 대해 다음 단계를 수행합니다.$ oc get project openshift-storage -o yaml
출력 예:
status: conditions: - lastTransitionTime: "2020-07-26T12:32:56Z" message: All resources successfully discovered reason: ResourcesDiscovered status: "False" type: NamespaceDeletionDiscoveryFailure - lastTransitionTime: "2020-07-26T12:32:56Z" message: All legacy kube types successfully parsed reason: ParsedGroupVersions status: "False" type: NamespaceDeletionGroupVersionParsingFailure - lastTransitionTime: "2020-07-26T12:32:56Z" message: All content successfully deleted, may be waiting on finalization reason: ContentDeleted status: "False" type: NamespaceDeletionContentFailure - lastTransitionTime: "2020-07-26T12:32:56Z" message: 'Some resources are remaining: cephobjectstoreusers.ceph.rook.io has 1 resource instances' reason: SomeResourcesRemain status: "True" type: NamespaceContentRemaining - lastTransitionTime: "2020-07-26T12:32:56Z" message: 'Some content in the namespace has finalizers remaining: cephobjectstoreuser.ceph.rook.io in 1 resource instances' reason: SomeFinalizersRemain status: "True" type: NamespaceFinalizersRemaining
이전 단계에 나열된 나머지 리소스를 모두 삭제합니다.
삭제할 각 리소스에 대해 다음을 수행합니다.
제거해야 하는 리소스의 오브젝트 종류를 가져옵니다. 위 출력에서 메시지를 참조하십시오.
예:
message: 네임스페이스의 일부 콘텐츠에는 cephobjectstoreuser.ceph.rook.io의 종료자가 남아 있습니다.
여기서 cephobjectstoreuser.ceph.rook.io 는 오브젝트 유형입니다.
오브젝트 종류에 해당하는 오브젝트 이름을 가져옵니다.
$ oc get <Object-kind> -n <project-name>
예:
$ oc get cephobjectstoreusers.ceph.rook.io -n openshift-storage
출력 예:
NAME AGE noobaa-ceph-objectstore-user 26h
리소스를 패치합니다.
$ oc patch -n <project-name> <object-kind>/<object-name> --type=merge -p '{"metadata": {"finalizers":null}}'
예제:
$ oc patch -n openshift-storage cephobjectstoreusers.ceph.rook.io/noobaa-ceph-objectstore-user \ --type=merge -p '{"metadata": {"finalizers":null}}'
출력:
cephobjectstoreuser.ceph.rook.io/noobaa-ceph-objectstore-user patched
openshift-storage 프로젝트가 삭제되었는지 확인합니다.
$ oc get project openshift-storage
출력:
Error from server (NotFound): namespaces "openshift-storage" not found
문제가 지속되면 Red Hat 지원에 문의하십시오.