[PATCH] [Kimchi] Issue #948: Kimchi not throwing errors when migration is performed and gives impression of migration doesn't work

From: Samuel Guimarães <sguimaraes943@gmail.com> This patch fixes an issue related to error messages not being captured by failed live migration tasks. This requires Wok patch for issue #79 otherwise it will repeat error messages once the guests list is refreshed. Samuel Guimarães (1): Issue #948: Kimchi not throwing errors when migration is performed and gives impression of migration doesn't work ui/js/src/kimchi.guest_main.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) -- 1.8.3.1

From: Samuel Guimarães <sguimaraes943@gmail.com> Signed-off-by: Samuel Guimarães <sguimaraes943@gmail.com> --- ui/js/src/kimchi.guest_main.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js index c11ba5c..251882c 100644 --- a/ui/js/src/kimchi.guest_main.js +++ b/ui/js/src/kimchi.guest_main.js @@ -379,6 +379,17 @@ kimchi.listVmsAuto = function() { return guests; }; + var listFailedTasks = function(){ + kimchi.getTasksByFilter('status=failed&target_uri=' + encodeURIComponent('^/plugins/kimchi/vms/.+/migrate'), function(tasks) { + for (var i = 0; i < tasks.length; i++) { + var guestUri = tasks[i].target_uri; + var guestName = guestUri.split('/')[4]; + var message = tasks[i].message; + wok.message('<strong>'+guestName+'</strong>: '+message,'alert-danger', null, true, null, 'failed-migration-'+tasks[i].id); + } + }, null, true); + }; + kimchi.listVMs(function(result, textStatus, jqXHR) { if (result && textStatus == "success") { @@ -418,7 +429,9 @@ kimchi.listVmsAuto = function() { }); }); } - $('.wok-mask').fadeOut(300, function() {}); + $('.wok-mask').fadeOut(300, function() { + listFailedTasks(); + }); } else { $('.grid-control').addClass('hidden'); $('#guestListField').hide(); @@ -444,7 +457,6 @@ kimchi.listVmsAuto = function() { } }; - kimchi.createGuestLi = function(vmObject, prevScreenImage, openMenu) { var result = kimchi.guestElem.clone(); //Setup the VM list entry @@ -882,7 +894,6 @@ kimchi.guest_main = function() { kimchi.listVmsAuto(); }; - kimchi.guest_clonevm_main = function() { kimchi.initCloneDialog(); }; -- 1.8.3.1

Please ignore this patch. I'm working on a v2 to display the correct error message without repeating them on guests list refresh. Samuel -----Original Message----- From: kimchi-devel-bounces@ovirt.org [mailto:kimchi-devel-bounces@ovirt.org] On Behalf Of sguimaraes943@gmail.com Sent: quarta-feira, 22 de junho de 2016 12:54 To: Kimchi Devel <kimchi-devel@ovirt.org> Subject: [Kimchi-devel] [PATCH] [Kimchi] Issue #948: Kimchi not throwing errors when migration is performed and gives impression of migration doesn't work From: Samuel Guimarães <sguimaraes943@gmail.com> This patch fixes an issue related to error messages not being captured by failed live migration tasks. This requires Wok patch for issue #79 otherwise it will repeat error messages once the guests list is refreshed. Samuel Guimarães (1): Issue #948: Kimchi not throwing errors when migration is performed and gives impression of migration doesn't work ui/js/src/kimchi.guest_main.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) -- 1.8.3.1 _______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
participants (2)
-
Samuel Henrique De Oliveira Guimaraes
-
sguimaraes943@gmail.com