Prisma Cloud Compute: 再帰的なファイル整合性管理ルールが適用されている場合のメモリ不足の問題

Prisma Cloud Compute: 再帰的なファイル整合性管理ルールが適用されている場合のメモリ不足の問題

3948
Created On 09/09/22 14:01 PM - Last Modified 12/27/24 08:33 AM


Symptom


>>> ツイストロックが有効な場合、 CPU使用率は一貫して増加しますが、ツイストロックを停止すると、 CPUグラフは正常に戻ります。

1番目の症状:

  • Prisma Cloud Computeがない場合
  1. 制限が低いポッドを起動する
  2. ポッドは問題なく動作します。
  3. すべて大丈夫です。

  • Prisma Cloud Compute (Twistlock) を使用
  1. 低制限ポッドを開始
  2. メモリ不足のためポッドが強制終了されました。
  3. ポッドは動作しません。


2番目の症状:

  • カーネルログには、リソース不足のためコンテナの作成が中止されたことが示されています。
runc create failed: unable to start container process: container init was OOM-killed (memory limit too low?)



3番目の症状:

image-20220823-072505.png

4番目の症状:

  • たとえば「 ps aufx 」でプロセスをチェックすると、 crioプロセスに大きなロードがかかっているだけでなく、「 fsmon 」という特定のプロセスが大量のリソースを消費していることに気付くでしょう。プロセスの PID を grep して強制終了すると、リソースの使用量は正常に戻るはずです。

Screenshot 2022-09-09 at 15.55.30.png

5時間の症状:
  • journalctl 出力のエラーは、CRI-O がコンテナの起動に失敗している / 大幅な遅延が発生していることを示しています。
Kubelet may be retrying requests that are timing out in CRI-O due to system load: context deadline exceeded
  • 特に、次のような「名前は予約されています」というエラーが多数発生します。
Aug 19 06:40:49 muc9-4wtp8-worker-b-gen9-mbxcv crio[2252]: time="2022-08-19 06:40:49.510901803Z" level=warning msg="error reserving ctr name k8s_frontoffice-analytics-domain_frontoffice-analytics-deployment-1-zz5s8_reef-an-maxi-uat_ea9c7d33-8fea-4165-a534-106ce6c33e29_17 for id 90615636aa18fdc2a17bfef076500dfd14932a7109ca8e662c45b4708f0364bf: name is reserved"



その他の興味深い症状ログ:

Aug 19 10:30:46 muc9-4wtp8-worker-b-gen9-mbxcv crio[2252]: time="2022-08-19 10:30:45.691591825Z" level=error msg="Container creation error: time="2022-08-19T10:30:42Z" level=warning msg="unable to get oom kill count" error="open /sys/fs/cgroup/memory/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-podff7a0d7a_17b4_4777_9146_94fc41681318.slice/crio-fd00abb205097e9244014a63265fb0f656dab4ebd9dfe1e800d0a10ec55fc42d.scope/memory.oom_control: no such file or directory"\ntime="2022-08-19T10:30:44Z" level=error msg="runc create failed: unable to start container process: unable to apply cgroup configuration: Timeout waiting for systemd to create crio-fd00abb205097e9244014a63265fb0f656dab4ebd9dfe1e800d0a10ec55fc42d.scope"\n" id=dff10a34-f28e-4370-9fff-8e895148d11d name=/runtime.v1.RuntimeService/CreateContainer
Aug 19 10:30:46 muc9-4wtp8-worker-b-gen9-mbxcv crio[2252]: time="2022-08-19 10:30:46.086315234Z" level=info msg="createCtr: deleting container ID fd00abb205097e9244014a63265fb0f656dab4ebd9dfe1e800d0a10ec55fc42d from idIndex" id=dff10a34-f28e-4370-9fff-8e895148d11d name=/runtime.v1.RuntimeService/CreateContainer



Environment


  • プリズマクラウドコンピューティング
  • クラスターディフェンダー
  • オープンシフト/CRIO


Cause


  • この問題の根本的な原因は、 fsmonプロセス (ファイル システムモニタリングプロセス) が大量のCPUリソースを消費し、クラスター環境全体のパフォーマンスに重大な影響を与えることです。

  • In particular, if the customer has a lot of ?File Integrity? rules set up on his/her Cconsole, especially if recursive (i.e., tracking recursively an entire file-system tree like this "path": "/bin", "recursive": true, ...), then this feature can have severe performance impact, depending on the configured rules, when tracking lots of directories recursively.

  • In this case, the file system monitor needs to track and scan many files using fsmon, naturally introducing delays for the containers creation (containers created with runc), as these fail (or timeout as we saw above), the container runtime (crio) continues trying to spawn the containers again and again, making the system extremely busy.


Resolution


  • コンソールのホスト ランタイム ルールを使用して、 fsmonプロセスを強制終了したり、再帰的なファイル整合性管理ルールを削除/削減したりできます。
  • ノード上のCPUリソースを増やす


Additional Information


FIM をコンフィグと、次のものを検出できます。
  • 証明書、シークレット、設定ファイルなどの機密ファイルを読み取ったり、書き込んだりします。
  • ファイル システムに書き込まれたバイナリ。
  • 異常にインストールされたソフトウェア。たとえば、apt-get 以外のプログラムによってファイル システムに書き込まれたファイルなど。

詳細については、 ホストのランタイム防御を参照してください


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000sZ3NCAU&lang=ja&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language