All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 1859989] [NEW] qemu-img has broken output with large snapshot names
@ 2020-01-16 13:59 pevogam
  2020-01-16 18:49 ` [Bug 1859989] " pevogam
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pevogam @ 2020-01-16 13:59 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

On Qemu 4.1.1 the output of snalshots breaks if the chosen state name is
too long:

```
# qemu-img snapshot -l /mnt/local/some_image.qcow2
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
```

Prior to 4.1.1 this used to work with extra tabs for the VM SIZE values.
The collision is also disabling us from using a regex on top of this
input to detect the snapshot.

** Affects: qemu
     Importance: Undecided
         Status: New

** Summary changed:

- qemu-img has broken input on large snapshot name
+ qemu-img has broken output on large snapshot name

** Summary changed:

- qemu-img has broken output on large snapshot name
+ qemu-img has broken output with large snapshot names

** Description changed:

- On Qemu 4.1.1 the output of snalshots breaks if the chosen state name is
+ On Qemu 4.1.1 the output of snapshots breaks if the chosen state name is
  too long:
  
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  
  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE values.
  The collision is also disabling us from using a regex on top of this
  input to detect the snapshot.

** Description changed:

  On Qemu 4.1.1 the output of snapshots breaks if the chosen state name is
  too long:
  
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  
- Prior to 4.1.1 this used to work with extra tabs for the VM SIZE values.
- The collision is also disabling us from using a regex on top of this
- input to detect the snapshot.
+ Prior to 4.1.1, this used to work with extra tabs for the VM SIZE
+ values. The collision is also disabling us from using a regex on top of
+ this input to detect the snapshot unless we forbid numbers in the
+ snapshot name.

** Description changed:

- On Qemu 4.1.1 the output of snapshots breaks if the chosen state name is
+ On Qemu 4.1.1 the output of snalshots breaks if the chosen state name is
  too long:
  
+ ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
+ ```
  
- Prior to 4.1.1, this used to work with extra tabs for the VM SIZE
- values. The collision is also disabling us from using a regex on top of
- this input to detect the snapshot unless we forbid numbers in the
- snapshot name.
+ Prior to 4.1.1 this used to work with extra tabs for the VM SIZE values.
+ The collision is also disabling us from using a regex on top of this
+ input to detect the snapshot.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1859989

Title:
  qemu-img has broken output with large snapshot names

Status in QEMU:
  New

Bug description:
  On Qemu 4.1.1 the output of snalshots breaks if the chosen state name
  is too long:

  ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  ```

  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE
  values. The collision is also disabling us from using a regex on top
  of this input to detect the snapshot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1859989/+subscriptions


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

* [Bug 1859989] Re: qemu-img has broken output with large snapshot names
  2020-01-16 13:59 [Bug 1859989] [NEW] qemu-img has broken output with large snapshot names pevogam
@ 2020-01-16 18:49 ` pevogam
  2020-01-17  9:54 ` Max Reitz
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pevogam @ 2020-01-16 18:49 UTC (permalink / raw)
  To: qemu-devel

** Description changed:

- On Qemu 4.1.1 the output of snalshots breaks if the chosen state name is
+ On Qemu 4.1.1 the output of snapshots breaks if the chosen state name is
  too long:
  
  ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  ```
  
  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE values.
  The collision is also disabling us from using a regex on top of this
  input to detect the snapshot.

** Description changed:

  On Qemu 4.1.1 the output of snapshots breaks if the chosen state name is
  too long:
  
  ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  ```
  
  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE values.
  The collision is also disabling us from using a regex on top of this
- input to detect the snapshot.
+ output to detect the snapshot.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1859989

Title:
  qemu-img has broken output with large snapshot names

Status in QEMU:
  New

Bug description:
  On Qemu 4.1.1 the output of snapshots breaks if the chosen state name
  is too long:

  ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  ```

  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE
  values. The collision is also disabling us from using a regex on top
  of this output to detect the snapshot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1859989/+subscriptions


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

* [Bug 1859989] Re: qemu-img has broken output with large snapshot names
  2020-01-16 13:59 [Bug 1859989] [NEW] qemu-img has broken output with large snapshot names pevogam
  2020-01-16 18:49 ` [Bug 1859989] " pevogam
@ 2020-01-17  9:54 ` Max Reitz
  2020-01-17 10:13 ` Max Reitz
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Max Reitz @ 2020-01-17  9:54 UTC (permalink / raw)
  To: qemu-devel

Hi,

When did this work last for you?  I tried every .0 release down to
2.12.0, and all showed this kind of broken output.  (I wasn’t able to
compile 2.11.0 and earlier.)

Here was my test case:

$ ./qemu-img create -f qcow2 foo.qcow2 64M
Formatting 'foo.qcow2', fmt=qcow2 size=67108864 cluster_size=65536 lazy_refcounts=off refcount_bits=16
$ ./qemu-img snapshot -c foofoofoofoofoofoofoofoofoofoo foo.qcow2
$ ./qemu-img snapshot -l foo.qcow2 
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         foofoofoofoofoofoofoofoofoofoo      0 2020-01-17 10:53:17   00:00:00.000
$ ./qemu-img --version
qemu-img version 2.12.0 (v2.12.0)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

Max

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1859989

Title:
  qemu-img has broken output with large snapshot names

Status in QEMU:
  New

Bug description:
  On Qemu 4.1.1 the output of snapshots breaks if the chosen state name
  is too long:

  ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  ```

  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE
  values. The collision is also disabling us from using a regex on top
  of this output to detect the snapshot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1859989/+subscriptions


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

* [Bug 1859989] Re: qemu-img has broken output with large snapshot names
  2020-01-16 13:59 [Bug 1859989] [NEW] qemu-img has broken output with large snapshot names pevogam
  2020-01-16 18:49 ` [Bug 1859989] " pevogam
  2020-01-17  9:54 ` Max Reitz
@ 2020-01-17 10:13 ` Max Reitz
  2020-01-17 10:42 ` pevogam
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Max Reitz @ 2020-01-17 10:13 UTC (permalink / raw)
  To: qemu-devel

I’ve just seen that launchpad collapses the spaces in the snapshot...
All I can say is that diff tells me the output from 2.12.0 and 4.1.1 is
exactly the same, with only one difference: 2.12.0 prints the VM SIZE as
“0” (without a unit), whereas 4.1.1 prints “0 B”.

But now I just realized you probably mean that there is no space between
the snapshot name and the VM state size in your example.  OK, I thought
you meant the fact that the headers are not aligned to the table body
columns.

That seems to be because the size is printed in a 7-wide field, which
isn’t sufficient for three-digit sizes with unit prefixes; so “747 MiB”
is not prefixed by a space.  I think de38b5005e9 is to blame which which
(from what I can tell) effectively changed the output from using SI
prefixes to IEC prefixes (which requires one more character), adds a
space before and a “B” after the prefix (another two additional
characters), and by always printing three digits, which may require a
decimal point (so another character).  But it didn’t grow the field
width.  So I think we should do that.

Max

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1859989

Title:
  qemu-img has broken output with large snapshot names

Status in QEMU:
  New

Bug description:
  On Qemu 4.1.1 the output of snapshots breaks if the chosen state name
  is too long:

  ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  ```

  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE
  values. The collision is also disabling us from using a regex on top
  of this output to detect the snapshot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1859989/+subscriptions


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

* [Bug 1859989] Re: qemu-img has broken output with large snapshot names
  2020-01-16 13:59 [Bug 1859989] [NEW] qemu-img has broken output with large snapshot names pevogam
                   ` (2 preceding siblings ...)
  2020-01-17 10:13 ` Max Reitz
@ 2020-01-17 10:42 ` pevogam
  2020-01-17 11:08 ` Max Reitz
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pevogam @ 2020-01-17 10:42 UTC (permalink / raw)
  To: qemu-devel

Hi Max,

It last worked in (previous version we used):
[root@c15 ~]# qemu-img --version
qemu-img version 3.1.1 (qemu-3.1.1-2.fc30)
Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers

Yes, unfortunately Launchpad doesn't seem to support any literal
formatting which is why I tried to use the ``` to signal this. I will
attach some images from both version to counter this effect and make it
clearer to you where the problem is which is indeed in the clash between
the state name and the size. The IEC prefixes were something new and we
could handle that but not the lack of space which is new in this version
we tried.

** Attachment added: "qemu.png"
   https://bugs.launchpad.net/qemu/+bug/1859989/+attachment/5321101/+files/qemu.png

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1859989

Title:
  qemu-img has broken output with large snapshot names

Status in QEMU:
  New

Bug description:
  On Qemu 4.1.1 the output of snapshots breaks if the chosen state name
  is too long:

  ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  ```

  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE
  values. The collision is also disabling us from using a regex on top
  of this output to detect the snapshot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1859989/+subscriptions


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

* [Bug 1859989] Re: qemu-img has broken output with large snapshot names
  2020-01-16 13:59 [Bug 1859989] [NEW] qemu-img has broken output with large snapshot names pevogam
                   ` (3 preceding siblings ...)
  2020-01-17 10:42 ` pevogam
@ 2020-01-17 11:08 ` Max Reitz
  2020-03-10  9:12 ` Laurent Vivier
  2020-04-30 13:42 ` Laurent Vivier
  6 siblings, 0 replies; 8+ messages in thread
From: Max Reitz @ 2020-01-17 11:08 UTC (permalink / raw)
  To: qemu-devel

Sent a patch: https://lists.nongnu.org/archive/html/qemu-
block/2020-01/msg00376.html

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1859989

Title:
  qemu-img has broken output with large snapshot names

Status in QEMU:
  New

Bug description:
  On Qemu 4.1.1 the output of snapshots breaks if the chosen state name
  is too long:

  ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  ```

  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE
  values. The collision is also disabling us from using a regex on top
  of this output to detect the snapshot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1859989/+subscriptions


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

* [Bug 1859989] Re: qemu-img has broken output with large snapshot names
  2020-01-16 13:59 [Bug 1859989] [NEW] qemu-img has broken output with large snapshot names pevogam
                   ` (4 preceding siblings ...)
  2020-01-17 11:08 ` Max Reitz
@ 2020-03-10  9:12 ` Laurent Vivier
  2020-04-30 13:42 ` Laurent Vivier
  6 siblings, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2020-03-10  9:12 UTC (permalink / raw)
  To: qemu-devel

Fixed here:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=804359b8b90f

** Changed in: qemu
       Status: New => Fix Committed

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1859989

Title:
  qemu-img has broken output with large snapshot names

Status in QEMU:
  Fix Committed

Bug description:
  On Qemu 4.1.1 the output of snapshots breaks if the chosen state name
  is too long:

  ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  ```

  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE
  values. The collision is also disabling us from using a regex on top
  of this output to detect the snapshot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1859989/+subscriptions


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

* [Bug 1859989] Re: qemu-img has broken output with large snapshot names
  2020-01-16 13:59 [Bug 1859989] [NEW] qemu-img has broken output with large snapshot names pevogam
                   ` (5 preceding siblings ...)
  2020-03-10  9:12 ` Laurent Vivier
@ 2020-04-30 13:42 ` Laurent Vivier
  6 siblings, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2020-04-30 13:42 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1859989

Title:
  qemu-img has broken output with large snapshot names

Status in QEMU:
  Fix Released

Bug description:
  On Qemu 4.1.1 the output of snapshots breaks if the chosen state name
  is too long:

  ```
  # qemu-img snapshot -l /mnt/local/some_image.qcow2
  Snapshot list:
  ID        TAG                 VM SIZE                DATE       VM CLOCK
  1         online_provider_with_dhcp747 MiB 2020-01-15 12:05:01   00:00:45.873
  ```

  Prior to 4.1.1 this used to work with extra tabs for the VM SIZE
  values. The collision is also disabling us from using a regex on top
  of this output to detect the snapshot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1859989/+subscriptions


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

end of thread, other threads:[~2020-04-30 14:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 13:59 [Bug 1859989] [NEW] qemu-img has broken output with large snapshot names pevogam
2020-01-16 18:49 ` [Bug 1859989] " pevogam
2020-01-17  9:54 ` Max Reitz
2020-01-17 10:13 ` Max Reitz
2020-01-17 10:42 ` pevogam
2020-01-17 11:08 ` Max Reitz
2020-03-10  9:12 ` Laurent Vivier
2020-04-30 13:42 ` Laurent Vivier

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.