From: Juergen Gross Date: Thu, 24 Mar 2016 17:44:50 +0000 (+0100) Subject: libxl: print message how to recover from xl cpupool-cpu-remove errors X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1472^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4e293401f75aeba23410c5a3761761311ffe7ee9;p=xen.git libxl: print message how to recover from xl cpupool-cpu-remove errors An error occurring when calling "xl cpupool-cpu-remove" might leave the system in a state where a cpu is neither completely free nor in a cpupool. This can easily be repaired by adding the cpu via "xl cpupool-cpu-add" to the cpupool where it was removed from before. Print a message telling this the user in case of an error. Cc: Ian Jackson Cc: Stefano Stabellini Cc: Wei Liu Signed-off-by: Juergen Gross Reviewed-by: Dario Faggioli Acked-by: Wei Liu --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index a3610fca74..b7b57ef8f7 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -8011,8 +8011,10 @@ int main_cpupoolcpuremove(int argc, char **argv) goto out; } - if (libxl_cpupool_cpuremove_cpumap(ctx, poolid, &cpumap)) - fprintf(stderr, "some cpus may not have been removed from %s\n", pool); + if (libxl_cpupool_cpuremove_cpumap(ctx, poolid, &cpumap)) { + fprintf(stderr, "Some cpus may have not or only partially been removed from '%s'.\n", pool); + fprintf(stderr, "If a cpu can't be added to another cpupool, add it to '%s' again and retry.\n", pool); + } rc = EXIT_SUCCESS;