Skip to content

Commit 1340bd2

Browse files
author
gitlab
committed
Merge branch 'ZSV-10989' into 'zsv_5.0.0'
<fix>[i18n]: add error details if the vm migration fails See merge request zstackio/zstack!9223
2 parents 928e578 + e260c25 commit 1340bd2

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

conf/i18n/messages_en_US.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ cannot\ do\ volume\ snapshot\ merge\ when\ vm[uuid\:%s]\ is\ in\ state\ of\ %s.\
18841884
live\ volume\ snapshot\ merge\ needs\ libvirt\ version\ greater\ than\ %s,\ current\ libvirt\ version\ is\ %s.\ Please\ stop\ vm\ and\ redo\ the\ operation\ or\ detach\ the\ volume\ if\ it's\ data\ volume = live volume snapshot merge needs libvirt version greater than {0}, current libvirt version is {1}. Please stop vm and redo the operation or detach the volume if it''s data volume
18851885
vm[uuid\:%s]\ is\ not\ Running\ or\ Stopped,\ current\ state[%s] = vm[uuid:{0}] is not Running or Stopped, current state[{1}]
18861886
kvm\ host[uuid\:%s,\ name\:%s,\ ip\:%s]\ doesn't\ not\ support\ live\ snapshot.\ please\ stop\ vm[uuid\:%s]\ and\ try\ again = kvm host[uuid:{0}, name:{1}, ip:{2}] doesn''t not support live snapshot. please stop vm[uuid:{3}] and try again
1887-
failed\ to\ migrate\ VM = failed to migrate VM
1887+
failed\ to\ migrate\ VM,\ because\ %s = failed to migrate VM, because {0}
18881888
failed\ to\ update\ nic[vm\:%s]\ on\ kvm\ host[uuid\:%s,\ ip\:%s],because\ %s = failed to update nic[vm:{0}] on kvm host[uuid:{1}, ip:{2}],because {3}
18891889
failed\ to\ attach\ nic[uuid\:%s,\ vm\:%s]\ on\ kvm\ host[uuid\:%s,\ ip\:%s],because\ %s,\ please\ try\ again\ or\ delete\ device[%s]\ by\ yourself = failed to attach nic[uuid:{0}, vm:{1}] on kvm host[uuid:{2}, ip:{3}],because {4}, please try again or delete device[{5}] by yourself
18901890
failed\ to\ attach\ nic[uuid\:%s,\ vm\:%s]\ on\ kvm\ host[uuid\:%s,\ ip\:%s],because\ %s = failed to attach nic[uuid:{0}, vm:{1}] on kvm host[uuid:{2}, ip:{3}],because {4}

conf/i18n/messages_zh_CN.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ cannot\ do\ volume\ snapshot\ merge\ when\ vm[uuid\:%s]\ is\ in\ state\ of\ %s.\
18841884
live\ volume\ snapshot\ merge\ needs\ libvirt\ version\ greater\ than\ %s,\ current\ libvirt\ version\ is\ %s.\ Please\ stop\ vm\ and\ redo\ the\ operation\ or\ detach\ the\ volume\ if\ it's\ data\ volume = 快照合并需要libvirt版本大于[0],当前libvirt版本为[1],请停止虚拟机并重新执行操作,或者将数据卷从虚拟机中分离
18851885
vm[uuid\:%s]\ is\ not\ Running\ or\ Stopped,\ current\ state[%s] = 虚拟机[uuid:{0}]未处在Running或Stopped状态, 现在状态为[{1}]
18861886
kvm\ host[uuid\:%s,\ name\:%s,\ ip\:%s]\ doesn't\ not\ support\ live\ snapshot.\ please\ stop\ vm[uuid\:%s]\ and\ try\ again =
1887-
failed\ to\ migrate\ VM = 迁移虚拟机失败
1887+
failed\ to\ migrate\ VM,\ because\ %s = 迁移虚拟机失败,因为:{0}
18881888
failed\ to\ update\ nic[vm\:%s]\ on\ kvm\ host[uuid\:%s,\ ip\:%s],because\ %s = 无法更新主机[uuid:{1}, ip:{2}] 虚拟机[vm:{0}]的网卡: {3}
18891889
failed\ to\ attach\ nic[uuid\:%s,\ vm\:%s]\ on\ kvm\ host[uuid\:%s,\ ip\:%s],because\ %s,\ please\ try\ again\ or\ delete\ device[%s]\ by\ yourself = 无法将网卡[uuid:{0}, vm:{1}] 添加到主机[uuid:{2}, ip:{3}],因为:{4},请重新尝试或者自行删除设备[5]
18901890
failed\ to\ attach\ nic[uuid\:%s,\ vm\:%s]\ on\ kvm\ host[uuid\:%s,\ ip\:%s],because\ %s = 无法将网卡[uuid:{0}, vm:{1}] 添加到主机[uuid:{2}, ip:{3}],因为:{4}

conf/i18n_json/i18n_kvm.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,9 @@
290290
"fileName": "src/main/java/org/zstack/kvm/KVMHost.java"
291291
},
292292
{
293-
"raw": "failed to migrate VM",
294-
"en_US": "failed to migrate VM",
295-
"zh_CN": "迁移虚拟机失败",
293+
"raw": "failed to migrate VM, because %s",
294+
"en_US": "failed to migrate VM, because {0}",
295+
"zh_CN": "迁移虚拟机失败,因为:{0}",
296296
"arguments": [],
297297
"fileName": "src/main/java/org/zstack/kvm/KVMHost.java"
298298
},

plugin/kvm/src/main/java/org/zstack/kvm/KVMHost.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3198,7 +3198,7 @@ protected void scripts() {
31983198
@Override
31993199
public void success(MigrateVmResponse ret) {
32003200
if (!ret.isSuccess()) {
3201-
ErrorCode err = err(HostErrors.FAILED_TO_MIGRATE_VM_ON_HYPERVISOR, "failed to migrate VM")
3201+
ErrorCode err = err(HostErrors.FAILED_TO_MIGRATE_VM_ON_HYPERVISOR, "failed to migrate VM, because %s", ret.getError())
32023202
.withOpaque("response.error", ret.getError())
32033203
.withOpaque("vm.uuid", vmUuid)
32043204
.withOpaque("source.host.uuid", srcHostUuid)

0 commit comments

Comments
 (0)