resizeVolume with automigrate throws NullPointerException when the migration returns no volume
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
調査の方向性
resizeVolume のパスから始めてください。ここでは、migrateVolume が null 以外の結果を返した場合にのみ _volsDao.findById から volume が設定されています。次に、volume.getUuid() を呼び出している try ブロックと catch ブロックを読んでください。同じパターンが changeOfferingForVolume にも現れます。移行結果が null の場合に、元の移行エラーが、元の volume 参照と実際に試行されたプールとともに返され、NullPointerException が発生しなければ完了です。ペイロードにはテストファイル名がないため、拡張できる既存のボリュームのリサイズまたは移行のテストを探してください。
索引モデルが issue の本文から書いたものです。
説明
problem
resizeVolume with automigrate=true throws a NullPointerException when the volume has to move to another pool and migrateVolume returns no volume.
| step | code |
|---|---|
| migration result | volume = (result != null) ? _volsDao.findById(result.getId()) : null; |
error built in the try |
volume.getUuid() on a null volume |
error built in the catch |
volume.getUuid() again, so the NPE escapes |
migrateVolume returns null on the VM work-job path when the job result is not a volume id.
changeOfferingForVolume has the same block. It does not NPE, but its message prints volume: null and names suitableStoragePools.get(0) instead of the pool that was tried.
versions
4.22 (the same code is on main).
The steps to reproduce the bug
- Resize a volume attached to a VM so that its pool lacks space, with
automigrate=true. - Have the migrate job finish without returning a volume id.
- The API returns a NullPointerException instead of a migration error.
What to do about it?
Keep the original volume reference for the message, report the pool that was actually tried, and keep the migration failure as the cause.
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.4k
- 平均マージ
- 6日 18時間
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/cloudstack のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
apache/cloudstack#14784 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/cloudstack#14770 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/cloudstack#14755 ·
メンテナーはふだん 1 日以内に返信
-
UI: Account search in Add Instance wizard not functioning対応中かも @Shiv-61 が 5 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/cloudstack#14719 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
registerTemplate / registerIso accept a 2048-character URL, but vm_template.url holds 1024対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
apache/cloudstack#14715 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
apache/cloudstack の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
hermes-queue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
chrisalunlloyd2-sudo/mindpalace#425 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
documentation enhancement first-time-contributor good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
SasanLabs/VulnerableApp#961 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信