From patchwork Thu Mar 3 16:48:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 8494011 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 216AD9F2F0 for ; Thu, 3 Mar 2016 16:51:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5DCF82035E for ; Thu, 3 Mar 2016 16:51:34 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B3AF2037E for ; Thu, 3 Mar 2016 16:51:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1abWR4-0005Ok-Jm; Thu, 03 Mar 2016 16:49:10 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1abWR3-0005Mb-1l for xen-devel@lists.xen.org; Thu, 03 Mar 2016 16:49:09 +0000 Received: from [85.158.139.211] by server-1.bemta-5.messagelabs.com id 97/A6-29419-40B68D65; Thu, 03 Mar 2016 16:49:08 +0000 X-Env-Sender: jgross@suse.com X-Msg-Ref: server-7.tower-206.messagelabs.com!1457023747!26429878!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 43174 invoked from network); 3 Mar 2016 16:49:07 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by server-7.tower-206.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 3 Mar 2016 16:49:07 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0FCF1ADD4; Thu, 3 Mar 2016 16:49:07 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xen.org Date: Thu, 3 Mar 2016 17:48:49 +0100 Message-Id: <1457023730-10997-6-git-send-email-jgross@suse.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1457023730-10997-1-git-send-email-jgross@suse.com> References: <1457023730-10997-1-git-send-email-jgross@suse.com> Cc: Juergen Gross , Wei Liu , Ian Jackson , Stefano Stabellini Subject: [Xen-devel] [PATCH v3 5/6] libxl: print message how to recover from xl cpupool-cpu-remove errors X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- tools/libxl/xl_cmdimpl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 990d3c9..411473d 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -7716,8 +7716,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;