From patchwork Thu Mar 10 05:27:13 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: 8554051 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 DF4059F38C for ; Thu, 10 Mar 2016 05:30:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2073202E9 for ; Thu, 10 Mar 2016 05:30:20 +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 1BDBD20259 for ; Thu, 10 Mar 2016 05:30:20 +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 1adt85-0000RB-8Y; Thu, 10 Mar 2016 05:27:21 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1adt84-0000Qy-KF for xen-devel@lists.xen.org; Thu, 10 Mar 2016 05:27:20 +0000 Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id F4/FC-03109-7B501E65; Thu, 10 Mar 2016 05:27:19 +0000 X-Env-Sender: jgross@suse.com X-Msg-Ref: server-6.tower-31.messagelabs.com!1457587639!1855487!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 56879 invoked from network); 10 Mar 2016 05:27:19 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by server-6.tower-31.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 10 Mar 2016 05:27:19 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 203BBABED; Thu, 10 Mar 2016 05:27:17 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xen.org Date: Thu, 10 Mar 2016 06:27:13 +0100 Message-Id: <1457587634-22819-3-git-send-email-jgross@suse.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1457587634-22819-1-git-send-email-jgross@suse.com> References: <1457587634-22819-1-git-send-email-jgross@suse.com> Cc: Juergen Gross , Wei Liu , Ian Jackson , Stefano Stabellini Subject: [Xen-devel] [PATCH v4 2/3] 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;