22.2.3. 현재 구성된 리소스 작업 기본값 표시
pcs resource op defaults [config] 명령은 지정한 규칙을 포함하여 리소스 작업에 대해 현재 구성된 기본값 목록을 표시합니다. Red Hat Enterprise Linux 9.5 이상에서는 이 명령의 출력을 텍스트, JSON 및 명령 형식으로 표시할 수 있습니다.
-
--output-format=text를 지정하면 이 옵션의 기본값인 일반 텍스트 형식으로 구성된 리소스 작업 기본값이 표시됩니다. -
--output-format=cmd를 지정하면 현재 클러스터 기본값 구성에서 생성된pcs 리소스 op defaults명령이 표시됩니다. 이러한 명령을 사용하여 다른 시스템에서 구성된 리소스 작업 기본값을 다시 생성할 수 있습니다. -
--output-format=json을 지정하면 머신 구문 분석에 적합한 구성된 리소스 작업 기본값이 JSON 형식으로 표시됩니다.
다음 예제에서는 이 예제 명령을 사용하여 ocf:pacemaker:podman 리소스의 기본 리소스 작업 값 뒤에 pcs resource op defaults config 명령의 세 가지 출력 형식을 보여줍니다.
# pcs resource op defaults set create id=op-set-1 score=100 meta timeout=30s rule op monitor and resource ocf:pacemaker:podman
Warning: Defaults do not apply to resources which override them with their own defined values
이 예제에서는 구성된 리소스 작업 기본값을 일반 텍스트로 표시합니다.
# pcs resource op defaults config
Meta Attrs: op-set-1 score=100
timeout=30s
Rule: boolean-op=and score=INFINITY
Expression: op monitor
Expression: resource ocf:pacemaker:podman
이 예제에서는 현재 클러스터 기본값 구성에서 생성된 pcs resource op defaults 명령을 표시합니다.
# pcs resource op defaults config --output-format=cmd
pcs -- resource op defaults set create id=op-set-1 score=100 \
meta timeout=30s \
rule 'op monitor and resource ocf:pacemaker:podman'
이 예제에서는 구성된 리소스 작업 기본값을 JSON 형식으로 표시합니다.
# pcs resource op defaults config --output-format=json
{"instance_attributes": [], "meta_attributes": [{"id": "op-set-1", "options": {"score": "100"}, "rule": {"id": "op-set-1-rule", "type": "RULE", "in_effect": "UNKNOWN", "options": {"boolean-op": "and", "score": "INFINITY"}, "date_spec": null, "duration": null, "expressions": [{"id": "op-set-1-rule-op-monitor", "type": "OP_EXPRESSION", "in_effect": "UNKNOWN", "options": {"name": "monitor"}, "date_spec": null, "duration": null, "expressions": [], "as_string": "op monitor"}, {"id": "op-set-1-rule-rsc-ocf-pacemaker-podman", "type": "RSC_EXPRESSION", "in_effect": "UNKNOWN", "options": {"class": "ocf", "provider": "pacemaker", "type": "podman"}, "date_spec": null, "duration": null, "expressions": [], "as_string": "resource ocf:pacemaker:podman"}], "as_string": "op monitor and resource ocf:pacemaker:podman"}, "nvpairs": [{"id": "op-set-1-timeout", "name": "timeout", "value": "30s"}]}]}