Failed to Move VM to Another Account
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.4k
- 平均マージ
- 6日 19時間
- マージ済み PR(30日)
- 32
説明
### problem
Up on stopping an Instance and trying to move it to another account...
...it does not make clear what caused the failure.
Even as a Root Admin, there is no explanation of what prevented the move from happening.
By looking at the logs, the message is clear but it is followed by an unhandled exception.
Sanitized fragments of the logs:
```
2026-06-11 20:07:53,953 ERROR [o.a.c.a.c.a.v.AssignVMCmd] (qtp1404565079-58786:[ctx-e08ee8a2, ctx-7b35ebda]) (logid:46523a5c) Failed to move VM [4944]. com.cloud.exception.InvalidParameterValueException: Snapshots exist for volume [ROOT-4944]. Detach volume or remove snapshots for the volume before assigning VM to another user.
at com.cloud.vm.UserVmManagerImpl.validateIfVolumesHaveNoSnapshots(UserVmManagerImpl.java:7961)
at com.cloud.vm.UserVmManagerImpl.moveVmToUser(UserVmManagerImpl.java:7871)
```
```
2026-06-11 19:58:58,841 ERROR [o.a.c.a.c.a.v.AssignVMCmd] (qtp1404565079-58786:[ctx-b7b9a764, ctx-86b9f79a]) (logid:1096b7f6) Failed to move VM [4944]. com.cloud.exception.InvalidParameterValueException: Remove any Port Forwarding rules for VM [VM instance {"id":4944,"instanceName":"i-73-4944-VM","state":"Stopped","type":"User","uuid":"*"}] before assigning it to another user.
at com.cloud.vm.UserVmManagerImpl.validateIfVmHasNoRules(UserVmManagerImpl.java:7934)
at com.cloud.vm.UserVmManagerImpl.moveVmToUser(UserVmManagerImpl.java:7868)
```
### versions
ACS 4.22.0.1
### The steps to reproduce the bug
1.
2.
3.
...
### What to do about it?
_No response_
コントリビューションガイド
調査の方向性
AssignVMCmd と UserVmManagerImpl から始め、特に validateIfVolumesHaveNoSnapshots、validateIfVmHasNoRules、moveVmToUser を確認してから、リンクされている pull request #13675 をレビューします。完了条件には、move の失敗時に未処理の例外ではなく、ユーザー向けの明確な説明が含まれている必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- backend, cloud
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100