Bug 1584630

Summary: Some patterns are not aligned vertically with the column they belong to.
Product: [Community] Virtualization Tools Reporter: ricky.tigg
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: agedosier, berrange, clalancette, crobinso, eskultet, itamar, jforbes, laine, libvirt-maint, mprivozn, skobyda, veillard
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: LibvirtFirstBug
Fixed In Version: libvirt-4.8.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-24 10:24:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Samples – 'virsh' outouts none

Description ricky.tigg 2018-05-31 10:35:48 UTC
Created attachment 1446222 [details]
Samples – 'virsh' outouts

Description of problem: Some patterns are not aligned vertically with the column they belong to.
Version-Release number of component: libvirt-client.x86_64 4.1.0-2.fc28 @fedora

Actual results: See attachment.
Expected results: Each pattern to be aligned with the column it belongs to.
Additional info: Interactive virsh run. System language used: Finnish.

Comment 1 Cole Robinson 2018-06-05 18:06:06 UTC
An example from the attachments is 'virsh vol-list':

$ virsh vol-list default
 Name                 Path                                    
------------------------------------------------------------------------------
 f26-clone.qcow2      /var/lib/libvirt/images/f26-clone.qcow2 
 F26AHLab_vagrant_box_image_0.img /var/lib/libvirt/images/F26AHLab_vagrant_box_image_0.img


If the first name exceeds a certain size then the headers are basically wrong. Getting this right will be more work and possibly worse readability in cases where one long element distorts the size of the table.

TBH I don't know if anyone will care enough to 'fix' this, but I'll move it to the upstream tracker

Comment 2 ricky.tigg 2018-06-05 19:06:41 UTC
virsh # net-list --all
 Nimi                 Tila       Automaattikäynnistys Persistent
----------------------------------------------------------
 default              aktiivinen yes           yes
 V3                   aktiivinen yes           yes
 Wi-Fi                aktiivinen yes           yes

Cases are many; when it appears that no one will care enough to face to seek to investigate a means of correction it is not a bad habit, just a –human– habit.

Comment 3 Erik Skultety 2018-06-06 06:53:41 UTC
> Cases are many; when it appears that no one will care enough to face to seek
> to investigate a means of correction it is not a bad habit, just a –human–
> habit.

I'm not sure I interpreted this correctly, but as a contributor I feel like the following had to be emphasized. First of all, the capacity we have (regular upstream contributors) is fairly limited given the number of bugzillas we get which have to triaged by priority - that is what Cole meant by saying "if anyone will care enough to fix it". Note that we *haven't* ditched the bugzilla, we just moved it to a different tracker that isn't tied to a product which has an EOL. Literally anyone can spend time investigating this on their own free will and contribute patches if they very much desire this to be fixed, so I personally don't think any statements regarding any personal traits/habits related to work attitude or workflow are in place here.

Comment 4 ricky.tigg 2018-06-06 07:27:10 UTC
Comment 2 relation to Comment 1 was coherent. Comment 3 relation to Comment 2 is not anymore, nor even to Comment 1. Why is that? Though, as usual we certainly all did try to speak English, wasn't it?

Comment 5 Daniel Berrangé 2018-06-06 08:47:54 UTC
There's a related problem when unicode is used because we count bytes when doing padding, not characters

  https://bugzilla.redhat.com/show_bug.cgi?id=1574624

We need to come up with some general purpose internal API for printing out tables of data, and use that everywhere in virsh to get alignment right, instead of printing tables manually with each command.

Comment 6 ricky.tigg 2018-06-26 13:21:11 UTC
Issue not tied to libvirt component; It involves as well dnf component:

Presently patterns 'Tunnis', 'Päivämäärä ja k' and 'Muutett' are incomplete. Complete patterns are 'Tunniste', 'Päivämäärä ja kkyttöaika' and 'Muutettu':

$ sudo dnf history *langpack*
Tunnis | komentorivi              | Päivämäärä ja k | Toiminnot      | Muutett
-------------------------------------------------------------------------------
(...)

For comparison:
$ LANG=C sudo dnf history *langpack*
ID     | Command line             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
(...)

Comment 7 Daniel Berrangé 2018-06-26 13:32:24 UTC
Please report that against dnf, its code is unrelated to libvirt.

Comment 8 Simon Kobyda 2018-09-24 10:15:28 UTC
Patches pushed upstream:
https://www.redhat.com/archives/libvir-list/2018-September/msg01184.html

Comment 9 Michal Privoznik 2018-09-24 11:25:17 UTC
bfdd20c5a9 virt-admin: Implement vshTable API to server-list and client-list
95b29fc222 virsh: Implement vshTable API to vol-list
79eec7992b virsh: Implement vshTable API to pool-list
3072ded354 virsh: Implement vshTable API to vcpupin, iothreadinfo, domfsinfo
063509a193 virsh: Implement vshTable API to domiflist
075dd1185d virsh: Implement vshTable API to domblklist
2979bbfb0f virsh: Implement vshTable API to domblkinfo
b9057c639f virsh: Set up cmdDomblkinfo() and cmdDomblkinfoPrint() for vshTable API implementation
b0b1ed2f7b virsh: Implement vshTable API to snapshot-list.
c2b9cf6733 virsh: Implement vshTable API to nwfilter-list and nwfilterbinding-list
cf12efe088 virsh: Implement vshTable API to secret-list
71029ef588 virsh: Implement vshTable API to net-list and net-dhcp-leases
0396cf5336 virsh: Implement vsh-table to iface-list

v4.7.0-226-gbfdd20c5a9