All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests
@ 2013-12-30  0:33 Loic Dachary
  2013-12-30  0:39 ` Benoît Canet
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Loic Dachary @ 2013-12-30  0:33 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel

Stash the rbd stderr and stdout because it also contains human readable
progress messages : Removing image: 3% complete... in addition to
potential error messages.

Display the stashed output if rbd exits on error.

Signed-off-by: Loic Dachary <loic@dachary.org>
---
 tests/qemu-iotests/common.rc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 28ba0d9..af66bbd 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -189,7 +189,11 @@ _cleanup_test_img()
             ;;
 
         rbd)
-            rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null
+            if ! rbd rm "$TEST_DIR/t.$IMGFMT" > $TEST_DIR/rbd.out 2>&1
+            then
+                cat $TEST_DIR/rbd.out
+            fi
+            rm $TEST_DIR/rbd.out
             ;;
 
         sheepdog)
-- 
1.8.3.2

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

* Re: [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests
  2013-12-30  0:33 [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests Loic Dachary
@ 2013-12-30  0:39 ` Benoît Canet
  2013-12-30  0:50   ` Loic Dachary
  2014-01-06  2:23 ` Stefan Hajnoczi
  2014-01-08 20:05 ` [Qemu-devel] [PATCH v2] " Loic Dachary
  2 siblings, 1 reply; 12+ messages in thread
From: Benoît Canet @ 2013-12-30  0:39 UTC (permalink / raw)
  To: Loic Dachary; +Cc: qemu-devel, Stefan Hajnoczi

Le Monday 30 Dec 2013 à 01:33:34 (+0100), Loic Dachary a écrit :
> Stash the rbd stderr and stdout because it also contains human readable
> progress messages : Removing image: 3% complete... in addition to
> potential error messages.
> 
> Display the stashed output if rbd exits on error.
> 
> Signed-off-by: Loic Dachary <loic@dachary.org>
> ---
>  tests/qemu-iotests/common.rc | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> index 28ba0d9..af66bbd 100644
> --- a/tests/qemu-iotests/common.rc
> +++ b/tests/qemu-iotests/common.rc
> @@ -189,7 +189,11 @@ _cleanup_test_img()
>              ;;
>  
>          rbd)
> -            rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null
> +            if ! rbd rm "$TEST_DIR/t.$IMGFMT" > $TEST_DIR/rbd.out 2>&1
> +            then
> +                cat $TEST_DIR/rbd.out
> +            fi
> +            rm $TEST_DIR/rbd.out
>              ;;
>  
>          sheepdog)

Hi Loïc,

Maybe you could filter by modifying _filter_qemu_io.

Best regards

Benoît
> -- 
> 1.8.3.2
> 
> 

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

* Re: [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests
  2013-12-30  0:39 ` Benoît Canet
@ 2013-12-30  0:50   ` Loic Dachary
  0 siblings, 0 replies; 12+ messages in thread
From: Loic Dachary @ 2013-12-30  0:50 UTC (permalink / raw)
  To: Benoît Canet; +Cc: qemu-devel, Stefan Hajnoczi

[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]

Hi Benoît,

If I understand correctly common.filter is designed to transform the output and remove variance. In the case of rbd displaying the progress of removal, it is something we probably want to get rid of entirely. Please let me know if I'm missing something and I'll update the patch according to your suggestion.

Cheers

On 30/12/2013 01:39, Benoît Canet wrote:
> Le Monday 30 Dec 2013 à 01:33:34 (+0100), Loic Dachary a écrit :
>> Stash the rbd stderr and stdout because it also contains human readable
>> progress messages : Removing image: 3% complete... in addition to
>> potential error messages.
>>
>> Display the stashed output if rbd exits on error.
>>
>> Signed-off-by: Loic Dachary <loic@dachary.org>
>> ---
>>  tests/qemu-iotests/common.rc | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
>> index 28ba0d9..af66bbd 100644
>> --- a/tests/qemu-iotests/common.rc
>> +++ b/tests/qemu-iotests/common.rc
>> @@ -189,7 +189,11 @@ _cleanup_test_img()
>>              ;;
>>  
>>          rbd)
>> -            rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null
>> +            if ! rbd rm "$TEST_DIR/t.$IMGFMT" > $TEST_DIR/rbd.out 2>&1
>> +            then
>> +                cat $TEST_DIR/rbd.out
>> +            fi
>> +            rm $TEST_DIR/rbd.out
>>              ;;
>>  
>>          sheepdog)
> 
> Hi Loïc,
> 
> Maybe you could filter by modifying _filter_qemu_io.
> 
> Best regards
> 
> Benoît
>> -- 
>> 1.8.3.2
>>
>>
> 
> 
> 

-- 
Loïc Dachary, Artisan Logiciel Libre


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

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

* Re: [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests
  2013-12-30  0:33 [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests Loic Dachary
  2013-12-30  0:39 ` Benoît Canet
@ 2014-01-06  2:23 ` Stefan Hajnoczi
  2014-01-06 15:50   ` Loic Dachary
  2014-01-08 20:05 ` [Qemu-devel] [PATCH v2] " Loic Dachary
  2 siblings, 1 reply; 12+ messages in thread
From: Stefan Hajnoczi @ 2014-01-06  2:23 UTC (permalink / raw)
  To: Loic Dachary; +Cc: qemu-devel, Stefan Hajnoczi

On Mon, Dec 30, 2013 at 01:33:34AM +0100, Loic Dachary wrote:
> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> index 28ba0d9..af66bbd 100644
> --- a/tests/qemu-iotests/common.rc
> +++ b/tests/qemu-iotests/common.rc
> @@ -189,7 +189,11 @@ _cleanup_test_img()
>              ;;
>  
>          rbd)
> -            rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null

stderr will be displayed.  Why isn't this enough?

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

* Re: [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests
  2014-01-06  2:23 ` Stefan Hajnoczi
@ 2014-01-06 15:50   ` Loic Dachary
  2014-01-08  4:33     ` Stefan Hajnoczi
  0 siblings, 1 reply; 12+ messages in thread
From: Loic Dachary @ 2014-01-06 15:50 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Josh Durgin, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]



On 06/01/2014 03:23, Stefan Hajnoczi wrote:
> On Mon, Dec 30, 2013 at 01:33:34AM +0100, Loic Dachary wrote:
>> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
>> index 28ba0d9..af66bbd 100644
>> --- a/tests/qemu-iotests/common.rc
>> +++ b/tests/qemu-iotests/common.rc
>> @@ -189,7 +189,11 @@ _cleanup_test_img()
>>              ;;
>>  
>>          rbd)
>> -            rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null
> 
> stderr will be displayed.  Why isn't this enough?
> 

Because the progress of the removal operation will be displayed on stderr. rbd outputs on stderr even when there is no error.

Happy new year !

-- 
Loïc Dachary, Artisan Logiciel Libre


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

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

* Re: [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests
  2014-01-06 15:50   ` Loic Dachary
@ 2014-01-08  4:33     ` Stefan Hajnoczi
  2014-01-08  8:22       ` Loic Dachary
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Hajnoczi @ 2014-01-08  4:33 UTC (permalink / raw)
  To: Loic Dachary; +Cc: Josh Durgin, qemu-devel

On Mon, Jan 06, 2014 at 04:50:41PM +0100, Loic Dachary wrote:
> 
> 
> On 06/01/2014 03:23, Stefan Hajnoczi wrote:
> > On Mon, Dec 30, 2013 at 01:33:34AM +0100, Loic Dachary wrote:
> >> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> >> index 28ba0d9..af66bbd 100644
> >> --- a/tests/qemu-iotests/common.rc
> >> +++ b/tests/qemu-iotests/common.rc
> >> @@ -189,7 +189,11 @@ _cleanup_test_img()
> >>              ;;
> >>  
> >>          rbd)
> >> -            rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null
> > 
> > stderr will be displayed.  Why isn't this enough?
> > 
> 
> Because the progress of the removal operation will be displayed on stderr. rbd outputs on stderr even when there is no error.

Is that a bug in the rbd tool which should be fixed?  Either by printing
progress to stdout or by adding a --quiet option?

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

* Re: [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests
  2014-01-08  4:33     ` Stefan Hajnoczi
@ 2014-01-08  8:22       ` Loic Dachary
  0 siblings, 0 replies; 12+ messages in thread
From: Loic Dachary @ 2014-01-08  8:22 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Josh Durgin, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]



On 08/01/2014 05:33, Stefan Hajnoczi wrote:
> On Mon, Jan 06, 2014 at 04:50:41PM +0100, Loic Dachary wrote:
>>
>>
>> On 06/01/2014 03:23, Stefan Hajnoczi wrote:
>>> On Mon, Dec 30, 2013 at 01:33:34AM +0100, Loic Dachary wrote:
>>>> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
>>>> index 28ba0d9..af66bbd 100644
>>>> --- a/tests/qemu-iotests/common.rc
>>>> +++ b/tests/qemu-iotests/common.rc
>>>> @@ -189,7 +189,11 @@ _cleanup_test_img()
>>>>              ;;
>>>>  
>>>>          rbd)
>>>> -            rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null
>>>
>>> stderr will be displayed.  Why isn't this enough?
>>>
>>
>> Because the progress of the removal operation will be displayed on stderr. rbd outputs on stderr even when there is no error.
> 
> Is that a bug in the rbd tool which should be fixed?  Either by printing
> progress to stdout or by adding a --quiet option?

In my opinion, yes. But Josh may disagree ;-)

-- 
Loïc Dachary, Artisan Logiciel Libre


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

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

* [Qemu-devel] [PATCH v2] discard rbd error output when not relevant in qemu-iotests
  2013-12-30  0:33 [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests Loic Dachary
  2013-12-30  0:39 ` Benoît Canet
  2014-01-06  2:23 ` Stefan Hajnoczi
@ 2014-01-08 20:05 ` Loic Dachary
  2014-01-08 21:25   ` Josh Durgin
                     ` (2 more replies)
  2 siblings, 3 replies; 12+ messages in thread
From: Loic Dachary @ 2014-01-08 20:05 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Josh Durgin, qemu-devel

Suppress rbd progress messages with --no-progress so they are not
confused with an error output when comparing test results ( progress is
displayed on stderr ).

Signed-off-by: Loic Dachary <loic@dachary.org>
---
 tests/qemu-iotests/common.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 28ba0d9..7442bad 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -189,7 +189,7 @@ _cleanup_test_img()
             ;;
 
         rbd)
-            rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null
+            rbd --no-progress rm "$TEST_DIR/t.$IMGFMT" > /dev/null
             ;;
 
         sheepdog)
-- 
1.8.3.2

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

* Re: [Qemu-devel] [PATCH v2] discard rbd error output when not relevant in qemu-iotests
  2014-01-08 20:05 ` [Qemu-devel] [PATCH v2] " Loic Dachary
@ 2014-01-08 21:25   ` Josh Durgin
  2014-01-09  1:45   ` Stefan Hajnoczi
  2014-02-27 15:22   ` Stefan Hajnoczi
  2 siblings, 0 replies; 12+ messages in thread
From: Josh Durgin @ 2014-01-08 21:25 UTC (permalink / raw)
  To: Loic Dachary, Stefan Hajnoczi; +Cc: qemu-devel

On 01/08/2014 12:05 PM, Loic Dachary wrote:
> Suppress rbd progress messages with --no-progress so they are not
> confused with an error output when comparing test results ( progress is
> displayed on stderr ).
>
> Signed-off-by: Loic Dachary <loic@dachary.org>
> ---
>   tests/qemu-iotests/common.rc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> index 28ba0d9..7442bad 100644
> --- a/tests/qemu-iotests/common.rc
> +++ b/tests/qemu-iotests/common.rc
> @@ -189,7 +189,7 @@ _cleanup_test_img()
>               ;;
>
>           rbd)
> -            rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null
> +            rbd --no-progress rm "$TEST_DIR/t.$IMGFMT" > /dev/null
>               ;;
>
>           sheepdog)
>

This flag was added in ceph 0.61. I doubt anyone is interested in
running these tests against earlier versions of ceph (the current stable
releases are 0.67 and 0.72).

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>

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

* Re: [Qemu-devel] [PATCH v2] discard rbd error output when not relevant in qemu-iotests
  2014-01-08 20:05 ` [Qemu-devel] [PATCH v2] " Loic Dachary
  2014-01-08 21:25   ` Josh Durgin
@ 2014-01-09  1:45   ` Stefan Hajnoczi
  2014-02-16 16:03     ` Benoît Canet
  2014-02-27 15:22   ` Stefan Hajnoczi
  2 siblings, 1 reply; 12+ messages in thread
From: Stefan Hajnoczi @ 2014-01-09  1:45 UTC (permalink / raw)
  To: Loic Dachary; +Cc: Josh Durgin, qemu-devel

On Wed, Jan 08, 2014 at 09:05:38PM +0100, Loic Dachary wrote:
> Suppress rbd progress messages with --no-progress so they are not
> confused with an error output when comparing test results ( progress is
> displayed on stderr ).
> 
> Signed-off-by: Loic Dachary <loic@dachary.org>
> ---
>  tests/qemu-iotests/common.rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks!

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2] discard rbd error output when not relevant in qemu-iotests
  2014-01-09  1:45   ` Stefan Hajnoczi
@ 2014-02-16 16:03     ` Benoît Canet
  0 siblings, 0 replies; 12+ messages in thread
From: Benoît Canet @ 2014-02-16 16:03 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Loic Dachary, qemu-devel, Josh Durgin

The Thursday 09 Jan 2014 à 09:45:14 (+0800), Stefan Hajnoczi wrote :
> On Wed, Jan 08, 2014 at 09:05:38PM +0100, Loic Dachary wrote:
> > Suppress rbd progress messages with --no-progress so they are not
> > confused with an error output when comparing test results ( progress is
> > displayed on stderr ).
> > 
> > Signed-off-by: Loic Dachary <loic@dachary.org>
> > ---
> >  tests/qemu-iotests/common.rc | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Thanks!
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> 

Should this be merged before 2.0 ?

Best regards

Benoît

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

* Re: [Qemu-devel] [PATCH v2] discard rbd error output when not relevant in qemu-iotests
  2014-01-08 20:05 ` [Qemu-devel] [PATCH v2] " Loic Dachary
  2014-01-08 21:25   ` Josh Durgin
  2014-01-09  1:45   ` Stefan Hajnoczi
@ 2014-02-27 15:22   ` Stefan Hajnoczi
  2 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2014-02-27 15:22 UTC (permalink / raw)
  To: Loic Dachary; +Cc: Josh Durgin, qemu-devel

On Wed, Jan 08, 2014 at 09:05:38PM +0100, Loic Dachary wrote:
> Suppress rbd progress messages with --no-progress so they are not
> confused with an error output when comparing test results ( progress is
> displayed on stderr ).
> 
> Signed-off-by: Loic Dachary <loic@dachary.org>
> ---
>  tests/qemu-iotests/common.rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

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

end of thread, other threads:[~2014-02-27 15:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-30  0:33 [Qemu-devel] [PATCH] discard rbd error output when not relevant in qemu-iotests Loic Dachary
2013-12-30  0:39 ` Benoît Canet
2013-12-30  0:50   ` Loic Dachary
2014-01-06  2:23 ` Stefan Hajnoczi
2014-01-06 15:50   ` Loic Dachary
2014-01-08  4:33     ` Stefan Hajnoczi
2014-01-08  8:22       ` Loic Dachary
2014-01-08 20:05 ` [Qemu-devel] [PATCH v2] " Loic Dachary
2014-01-08 21:25   ` Josh Durgin
2014-01-09  1:45   ` Stefan Hajnoczi
2014-02-16 16:03     ` Benoît Canet
2014-02-27 15:22   ` Stefan Hajnoczi

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.