NSX 3.x から 4.x へのアップグレード作業中、NSX VIB のアップグレードが「Error in running [/etc/init.d/nsx-datapath-dl start upgrade]:Return code: 1」というエラーで失敗しました。
search cancel

NSX 3.x から 4.x へのアップグレード作業中、NSX VIB のアップグレードが「Error in running [/etc/init.d/nsx-datapath-dl start upgrade]:Return code: 1」というエラーで失敗しました。

book

Article ID: 426520

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

免責事項:これは英文の記事「While doing the upgrade from NSX 3.x to 4.x, NSX VIB upgrade failed with error "Error in running [/etc/init.d/nsx-datapath-dl start upgrade]:Return code: 1"(369823)」の日本語訳です。記事はベストエフォートで翻訳を進めているため、ローカライズ化コンテンツは最新情報ではない可能性があります。最新情報は英語版の記事で参照してください。

NSX 3.x から 4.x へアップグレードする際、VIB のアップグレードが以下のエラーで失敗します。

Unexpected error while upgrading upgrade unit:Install of offline bundle failed on host xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with error : [LiveInstallationError]VMware_bootbank_nsx-esx-datapath_4.1.1.0.1-7.0.23358860:Error in running [/etc/init.d/nsx-datapath-dl start upgrade]:Return code: 1 Output: start upgrade begin Exception:Traceback (most recent call last):File "/etc/init.d/nsx-datapath-dl", line 1247, in <module> DualLoadUpgrade() File "/etc/init.d/nsx-datapath-dl",line 1062, in DualLoadUpgrade LoadKernelModules() File "/etc/init.d/nsx-datapath-dl",line 213, in LoadKernelModules nsxesxutils.loadModule(modName, modParam)File "/usr/lib/vmware/nsx-esx-datapath/lib64/python/nsxesxutils.py",line 579, in loadModule raise Exception('Failed to load module %s: %s' %Exception: Failed to load module nsx-esx-70u3/nsxt-ens-23358860: vmkmod: VMKModLoad:VMKernel_LoadKernelModule(nsxt-ens-23358860): Failure Cannot load module nsx-esx-70u3/nsxt-ens-23358860:Failure It is not safe to continue. Please reboot the host immediately to discard the unfinished update.cause = ('nsx-lcp-bundle(4.1.1.0.1-7.0.23358860)', 'nsx-datapath-dl', 'Error in running[/etc/init.d/nsx-datapath-dl start upgrade]:\nReturn code: 1\nOutput: start upgrade begin\nException:\nTraceback(most recent call last):\n File "/etc/init.d/nsx-datapath-dl", line 1247, in <module>\n DualLoadUpgrade()\nFile "/etc/init.d/nsx-datapath-dl", line 1062, in DualLoadUpgrade\n LoadKernelModules()\nFile "/etc/init.d/nsx-datapath-dl", line 213, in LoadKernelModules\n nsxesxutils.loadModule(modName, modParam)\nFile "/usr/lib/vmware/nsx-esx-datapath/lib64/python/nsxesxutils.py", line 579, in loadModule\n raiseException(\'Failed to load module %s: %s\' %\nException: Failed to load module nsx-esx-70u3/nsxt-ens-23358860:vmkmod: VMKModLoad: VMKernel_LoadKernelModule(nsxt-ens-23358860):Failure\nCannot load module nsx-esx-70u3/nsxt-ens-23358860:Failure\n\n') vibs = ['VMware_bootbank_nsx-esx-datapath_4.1.1.0.1-7.0.23358860']Please refer to the log file for more details..

 

Environment

VMware NSX-T
VMware NSX Data Center

Cause

アップグレード中に net-stats が実行されており、かつ定期的に起動していることが原因です。たとえば、ホスト上の pollworld 使用状況を監視する目的で net-stats コマンドが使用される場合があります。このアプリケーションは、NSX モジュールが所有するcharデバイスをオープンします。

vmkernel.log :

2024-05-09T16:01:16.716Z cpu9:181055275)Loading module nsxt-ens-23358860 ...
2024-05-09T16:01:16.732Z cpu9:181055275)Elf: 2119: module nsxt-ens-23358860 has license VMware
2024-05-09T16:01:16.741Z cpu9:181055275)Successfully created 4 ENS affinity heaps.
2024-05-09T16:01:16.744Z cpu9:181055275)FPO: 155: FPO Service Registered
2024-05-09T16:01:16.744Z cpu9:181055275)WARNING: CharDriver: 357: Driver with name ens is already using slot 125
2024-05-09T16:01:16.744Z cpu9:181055275)WARNING: Failed to create ENS char device 
2024-05-09T16:01:16.744Z cpu9:181055275)FPO: 227: FPO Service Unregistered
2024-05-09T16:01:16.745Z cpu9:181055275)nsxt-ens-23358860 failed to load. 
2024-05-09T16:01:16.745Z cpu9:181055275)WARNING: Elf: 3139: Kernel based module load of nsxt-ens-23358860 failed: Failure <Mod_LoadDone failed>

Resolution

NSX-T バンドルのアップグレードを実行する際は、net-stats コマンドが動作中かどうかを確認してください。

「ps」コマンドで net-stats のプロセス ID(PID)を確認します:
ps | grep -i "net-stats"

「kill」コマンドで実行中の net-stats サービスを停止します:
kill <service_pid>

アップグレード開始前に必ず停止してください。停止しない場合、旧モジュールがアンロードできず新モジュールをロードできないため、ライブアップグレードが失敗します。これは「In-Place」モードおよび「Maintenance」モードのアップグレードの両方に該当します(いずれもデュアルロードが必要です)。

アップグレード作業を行う前に、すべての net-stats インスタンスを停止することを推奨します。net-stats プロセスを停止すると、アップグレードは成功します。

なお、In-Place アップグレードのロジックにおいて本事象を検知するための net-stats 事前チェックが NSX-T 9.0 に追加される予定です。これにより、アップグレード開始前にすべての net-stats インスタンスが自動的に停止されるようになります。