All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xl: log an error if libxl_cpupool_destroy() fails
@ 2015-10-28 16:43 Dario Faggioli
  2015-10-28 16:51 ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Dario Faggioli @ 2015-10-28 16:43 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Ian Jackson, Ian Campbell, Juergen Gross,
	Stefano Stabellini

In fact, right now, failing at destroying a cpupool is just
not reported to the user in any explicit way.

Let's log an error, as it is customary for xl in these cases.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes from v1:
 * avoid changing the return code to EXIT_SUCCESS/FAILURE;
   that is being taken care of in another series anyway.
---
 tools/libxl/xl_cmdimpl.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 646b281..09a6bd7 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -7584,8 +7584,10 @@ int main_cpupooldestroy(int argc, char **argv)
         return 1;
     }
 
-    if (libxl_cpupool_destroy(ctx, poolid))
+    if (libxl_cpupool_destroy(ctx, poolid)) {
+        fprintf(stderr, "Can't destroy cpupool '%s'\n", pool);
         return 1;
+    }
 
     return 0;
 }

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] xl: log an error if libxl_cpupool_destroy() fails
  2015-10-28 16:43 [PATCH v2] xl: log an error if libxl_cpupool_destroy() fails Dario Faggioli
@ 2015-10-28 16:51 ` Wei Liu
  2015-11-03 17:08   ` Ian Campbell
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2015-10-28 16:51 UTC (permalink / raw)
  To: Dario Faggioli
  Cc: Wei Liu, Ian Campbell, Stefano Stabellini, Ian Jackson, xen-devel,
	Juergen Gross

On Wed, Oct 28, 2015 at 05:43:51PM +0100, Dario Faggioli wrote:
> In fact, right now, failing at destroying a cpupool is just
> not reported to the user in any explicit way.
> 
> Let's log an error, as it is customary for xl in these cases.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> Reviewed-by: Juergen Gross <jgross@xxxxxxxx>

Acked-by: Wei Liu <wei.liu2@citrix.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] xl: log an error if libxl_cpupool_destroy() fails
  2015-10-28 16:51 ` Wei Liu
@ 2015-11-03 17:08   ` Ian Campbell
  2015-11-03 17:11     ` Dario Faggioli
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2015-11-03 17:08 UTC (permalink / raw)
  To: Wei Liu, Dario Faggioli
  Cc: Juergen Gross, xen-devel, Ian Jackson, Stefano Stabellini

On Wed, 2015-10-28 at 16:51 +0000, Wei Liu wrote:
> On Wed, Oct 28, 2015 at 05:43:51PM +0100, Dario Faggioli wrote:
> > In fact, right now, failing at destroying a cpupool is just
> > not reported to the user in any explicit way.
> > 
> > Let's log an error, as it is customary for xl in these cases.
> > 
> > Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> > Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>

This conflicted with the changes to use EXIT_(ERROR|SUCCESS). By changing
"return 0" into "return EXIT_SUCCESS" and "return 1" into "return
EXIT_ERROR" in the context it applied cleanly. 

I was about to apply when I noticed the strange Reviewed-by: Jueregen
(having already spotted and fixed in the Cc). I don't think I want to apply
it like that. Please can you fix and rebase (after I push Harman's changes
soon) and resend.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] xl: log an error if libxl_cpupool_destroy() fails
  2015-11-03 17:08   ` Ian Campbell
@ 2015-11-03 17:11     ` Dario Faggioli
  0 siblings, 0 replies; 4+ messages in thread
From: Dario Faggioli @ 2015-11-03 17:11 UTC (permalink / raw)
  To: Ian Campbell, Wei Liu
  Cc: Juergen Gross, xen-devel, Ian Jackson, Stefano Stabellini


[-- Attachment #1.1: Type: text/plain, Size: 1496 bytes --]

On Tue, 2015-11-03 at 17:08 +0000, Ian Campbell wrote:
> On Wed, 2015-10-28 at 16:51 +0000, Wei Liu wrote:
> > On Wed, Oct 28, 2015 at 05:43:51PM +0100, Dario Faggioli wrote:
> > > In fact, right now, failing at destroying a cpupool is just
> > > not reported to the user in any explicit way.
> > > 
> > > Let's log an error, as it is customary for xl in these cases.
> > > 
> > > Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> > > Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
> > 
> > Acked-by: Wei Liu <wei.liu2@citrix.com>
> 
> This conflicted with the changes to use EXIT_(ERROR|SUCCESS). By
> changing
> "return 0" into "return EXIT_SUCCESS" and "return 1" into "return
> EXIT_ERROR" in the context it applied cleanly. 
> 
Right, thanks for trying.

> I was about to apply when I noticed the strange Reviewed-by: Jueregen
> (having already spotted and fixed in the Cc). I don't think I want to
> apply
> it like that. 
>
Oh, come on! How the heck did I manage to put it in there like that,
and to not notice it until now! :-(

Anyway, sorry for wasting your time.

> Please can you fix and rebase (after I push Harman's changes
> soon) and resend.
> 
Sure thing.

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-03 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-28 16:43 [PATCH v2] xl: log an error if libxl_cpupool_destroy() fails Dario Faggioli
2015-10-28 16:51 ` Wei Liu
2015-11-03 17:08   ` Ian Campbell
2015-11-03 17:11     ` Dario Faggioli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.