[KVM] StringIndexOutOfBoundsException in IscsiAdmStorageAdaptor.disconnectPhysicalDiskByPath makes the first Stop VM fail when a disk path contains "-iscsi-" (e.g. a SharedMountPoint pool mount directory)
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 57/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- java
調査の方向性
Start with IscsiAdmStorageAdaptor.disconnectPhysicalDiskByPath at the reported exception line, then trace how KVMStoragePoolManager calls it during LibvirtComputingResource.cleanupDisk. Reproduce with an attached volume on a SharedMountPoint iSCSI pool and inspect the disk path passed to the method. Done when the first Stop attempt handles that path without throwing and the regression is covered by a focused test.
索引モデルが issue の本文から書いたものです。
説明
problem
Stopping a VM that has a volume from a SharedMountPoint (iSCSI-backed) pool attached fails the first time with:
java.lang.StringIndexOutOfBoundsException: Range [21, -1) out of bounds for length 58
at com.cloud.hypervisor.kvm.storage.IscsiAdmStorageAdaptor.disconnectPhysicalDiskByPath(IscsiAdmStorageAdaptor.java:362)
at com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager.disconnectPhysicalDiskByPath(KVMStoragePoolManager.java:213)
at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.cleanupDisk(LibvirtComputingResource.java:3971)
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStopCommandWrapper.execute(LibvirtStopCommandWrapper.java:98)
The exception is deterministic (same message every time, reproduced 4 times). The second Stop attempt succeeds. If the volume is detached first, the Stop succeeds on the first attempt. The index pair (start 21, end -1) looks like an indexOf(...) returning -1 and being used as the end of a substring, which would mean the disk path format does not match what the parser expects. We have not confirmed this.
versions
- Apache CloudStack 4.22.1.1
- Hypervisor: KVM
- Primary storage: pool of type SharedMountPoint, backed by iSCSI LUNs
The steps to reproduce the bug
- Create a VM with a data volume on a SharedMountPoint (iSCSI-backed) pool and attach it.
- Stop the VM. The stop fails with the exception above.
- Stop the VM again. It stops normally.
- Start the VM, detach the volume, stop the VM. It stops on the first attempt.
What to do about it?
Validate the path in disconnectPhysicalDiskByPath before calling substring, and return false (or log and skip) for paths that are not iSCSI device paths instead of throwing. It would also help to understand why the second Stop works.
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.4k
- 平均マージ
- 7日 16時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/cloudstack のほかの issue
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new size対応中かも @bhouse-nexthop が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/cloudstack#14645 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replaced対応中かも @bhouse-nexthop が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/cloudstack#14633 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)対応中かも @bhouse-nexthop が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/cloudstack#14631 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/cloudstack#14625 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)対応中かも @willbennett-devops が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/cloudstack#14545 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
apache/cloudstack の issue をすべて見る
似ている issue
-
[Bug]: Nullable implicit operator on string extensible enums still throws for a null string対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug emitter:client:csharp
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/typespec#12572 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: Java SDK MountRequest always sends update-optional fields, resetting stored mount settingsオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configuration対応中かも @amalsaidov が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
needs-area-label
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信