WAN接続を介したSUSE Multi-Linux Managerサーバとプロキシ間の長い同期時間に関するトラブルシューティング
Depending on what changes are executed in the WebUI or via an API call to distribution or system settings, cobbler sync command may be required to transfer files from SUSE Multi-Linux Manager Server to SUSE Multi-Linux Manager Proxy systems. To accomplish this, Cobbler uses a list of proxies specified in /etc/cobbler/settings.
Due to its design, cobbler sync is not able to sync only the changed or recently added files.
Instead, executing cobbler sync triggers a full sync of the /srv/tftpboot directory to all specified proxies configured in /etc/cobbler/settings. It is also influenced by the latency of the WAN connection between the involved systems.
The process of syncing may take a considerable amount of time to finish according to the logs in /var/log/cobbler/.
たとえば、次の日時に開始したとします。
Thu Jun 3 14:47:35 2021 - DEBUG | running python triggers from /var/lib/cobbler/triggers/task/sync/pre/* Thu Jun 3 14:47:35 2021 - DEBUG | running shell triggers from /var/lib/cobbler/triggers/task/sync/pre/*
そして、次の日時に終了したとします。
Thu Jun 3 15:18:49 2021 - DEBUG | running shell triggers from /var/lib/cobbler/triggers/task/sync/post/* Thu Jun 3 15:18:49 2021 - DEBUG | shell triggers finished successfully
転送量は約1.8GBでした。 転送には30分ほどかかりました。
By comparison, copying a single big file of the same size as /srv/tftboot completes within several minutes.
Switching to an rsync-based approach to copy files between SUSE Multi-Linux Manager Server and Proxy may help to reduce the transfer and wait times.
このタスクを実行するためのスクリプトは、https://suse.my.salesforce.com/sfc/p/1i000000gLOd/a/1i000000ll5B/B2AmvIJN2_JsAyjTQzCVP_x5ioVgd0bYN9X9NpMugS8でダウンロードできます。
The script does not accept command line options. Before running the script, you need to manually edit it and set correctly MLMHOSTNAME, MLMIP and MLMPROXY1 variables for it to work correctly.
|
スクリプトの個々の調整に利用可能なサポートはありません。 スクリプトと内部のコメントは、プロセスの概要と考慮すべきステップを提供することを目的としています。 さらにサポートが必要な場合は、SUSEコンサルティングにお問い合わせください。 |
スクリプトを使用した提案されるアプローチは、次の環境で役立ちます。
-
SUSE Multi-Linux ManagerプロキシシステムがWAN接続を介して接続されている。
-
/srv/tftbootcontains a high number of files for distributions and client PXE boot files, in total several thousand files; -
Any proxy in
/etc/cobbler/settingshas been disabled, otherwise SUSE Multi-Linux Manager will continue to sync content to the proxies.#proxies: # - "MLMproxy.MLMproxy.test" # - "MLMproxy2.MLMproxy.test"
-
SUSE Multi-Linux Managerと関連するシステム間のTCPトラフィックのダンプを取得します。
-
SUSE Multi-Linux Managerサーバの場合:
tcpdump -i ethX -s 200 host <ip-address-of-susemanagerproxy> and not ssh
-
SUSE Multi-Linux Managerプロキシの場合:
tcpdump -i ethX -s 200 host <ip-address-of-susemanager> and not ssh
-
これにより、分析を実行するのに十分な200のパッケージサイズのみがキャプチャされます。
-
プロキシと通信するためにSUSE Multi-Linux Managerが使用する各ネットワークインタフェースにehtXを調整します。
-
最後に、さらにパッケージ数を削減するため、ssh通信はキャプチャされません。
-
-
Start a
cobbler sync.-
To force a sync, delete the Cobbler json cache file first and then issue
cobbler sync:rm /var/lib/cobbler/pxe_cache.json cobbler sync
-
-
When {command]
cobbler syncis finished, stop the TCPdumps. -
Open the TCPdumps using Wireshark, go to
Statistics > Conversationsand wait for the dump to be analyzed. -
TCPタブに切り替えます。 このタブに表示される数は、SUSE Multi-Linux ManagerサーバとSUSE Multi-Linux Managerプロキシ間でキャプチャされた合計対話数を示しています。
-
Look for the column
Duration.-
昇順にソートして開始し、ファイルの転送にかかった最小時間を確認します。
-
降順にソートして続行し、カーネルやinitrdの転送など、大きなファイルの最大値を確認します。
ポート4505と4506はSalt通信に使用されるため無視してください。
-
TCPdumpsの分析では、SUSE Multi-Linux Managerサーバからプロキシへの、サイズが約1800バイトの小さなファイルの転送に約0.3秒かかったことを示しています。
大きなファイルは多くありませんでしたが、小さなファイルの数が多いため、転送されるファイルごとに新しいTCP接続が作成され、確立された接続数が多くなりました。
したがって、最小転送時間と必要な接続数(たとえば、約5000)がわかれば、転送時間全体の概算推定時間が得られます(5000 * 0.3 / 60 = 25分)。