簡體   English   中英

Tuned Operator 不激活自定義配置文件 (Openshift 4.6.18)

[英]Tuned Operator does not activate custom profile (Openshift 4.6.18)

Openshift 提供默認的“node-tuning-operator”來調低系統。

我們可以使用自定義資源 (CR) 創建自定義配置文件。

但是,操作員不會加載/激活自定義配置文件。

它不是激活我的自定義配置文件,而是激活 openshift 提供的默認配置文件。

我仍在努力找出正確的配置文件配置。

調諧操作員沒有激活我的自定義配置文件可能是什么問題?

可以在https://docs.openshift.com/container-platform/4.7/scalability_and_performance/using-node-tuning-operator.html找到調優運算符的文檔。

Tuned Operator 的一般信息:

  • 命名空間/項目:openshift-cluster-node-tuning-operator
  • 運營商:集群節點調整運營商
  • DaemonSet : 調整
  • CRD:tuneds.tuned.openshift.io
  • CR : 調整/默認 & 調整/渲染

文檔說,除了 openshift 提供的名為“ Tuned/default & Tuned/rendered ”的默認資源之外,我們還可以創建自己的kind=Tuned自定義資源。

這些資源提供名為"openshift"、"openshift-node" 和 "openshift-control-plane" 的默認配置文件。

可以使用以下命令查看更多信息:

oc get Tuned/default -n openshift-cluster-node-tuning-operator -o yaml

現在,我們可以創建我們自己的自定義配置文件作為自定義資源的一部分來調整我們自己的設置。

這里的技巧是自定義資源 yaml 文件中關於自定義配置文件的配置應該是正確的。 如果正確,調諧操作員將加載配置文件並激活它。 如果它不正確,則調整后的操作員將不會激活它,它也會忽略任何未來的正確配置。

這是調整運算符中的一個錯誤,作為https://bugzilla.redhat.com/show_bug.cgi?id=1919970 的一部分解決。

修復:將openshift 集群版本升級到 4.7 及更高版本。

解決方法:刪除調整后的 pod,以便操作員創建新的 pod。 創建新 Pod 后,它將激活正確的配置文件。 (希望 CR.yaml 中的配置已更正)。

重要命令:

  • 要找出運行在哪個優化操作符上的 pod:

oc get pod -n openshift-cluster-node-tuning-operator -owide

  • 檢查操作員 pod 的日志:(實際 pod 名稱可以從上面的命令中找到)

oc 日志 pod/cluster-node-tuning-operator-6644cd48bb-z2qxn -n openshift-cluster-node-tuning-operator

  • 要檢查所有 kind=Tuned 的自定義資源都存在:

oc get Tuned -n openshift-cluster-node-tuning-operator

  • 要描述和檢查默認配置文件:

oc get Tuned/default -n openshift-cluster-node-tuning-operator -o yaml

  • 要找出它們在集群中運行的所有調優的 pod 和節點:

oc get pod -n openshift-cluster-node-tuning-operator -owide

  • 要檢查特定調整后的 pod 的日志:(可以從上面的命令中找到實際的 pod 名稱)

oc 日志調優-h8xgh -n openshift-cluster-node-tuning-operator -f

  • 登錄到調優的 pod 並手動確認是否應用了調優:(實際的 pod 名稱可以從上一個命令中找到)

oc exec -it Tuning-h8xgh -n openshift-cluster-node-tuning-operator --bash

  • 您可以在使用上述命令登錄到調優后的 pod 后執行以下命令來驗證調優設置:

    bash-4.4# cat /etc/tuned/infra-nodes/tuned.conf
    [main] summary=優化運行 OpenShift Infra 節點的系統
    [sysctl] fs.inotify.max_user_watches = 1048576 vm.swappiness = 1

    bash-4.4#tuned-adm 推薦無法通過 DBus 與 Tuned 守護進程對話。 Tuned 守護進程是否正在運行? 下節點 bash-4.4#

 bash-4.4# tuned-adm active Cannot talk to Tuned daemon via DBus. Is Tuned daemon running? Current active profile: openshift-control-plane bash-4.4#

注意:上面的示例代碼准確地描述了這個問題中提出的問題。 如果您注意到,活動配置文件是“openshift-control-plane”,而推薦/加載的配置文件是“infra-nodes”。 這是由於前面提到的現有錯誤。 一旦您刪除了調整好的 pod (tuned-h8xgh),操作員將恢復並激活正確的配置文件。

自定義配置文件配置中的示例問題:如果配置文件優先級與默認配置文件相同,則操作員將發出類似於以下內容的警告:

W0722 04:24:25.490704       1 profilecalculator.go:480] profiles openshift-control-plane/infra-node have the same priority 30, please use a different priority for your custom profiles!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM