polycube icon indicating copy to clipboard operation
polycube copied to clipboard

[BUG] polycubectl - Size of the terminal is too small, output could be missaligned.

Open acloudiator opened this issue 6 years ago • 1 comments

Describe the bug

polycubectl returns an error for terminal size too small, even if it's 238(columns) by 57 (lines)

To Reproduce

Steps to reproduce the behavior:

  1. Run polycubectl --help to see the error.
user@node1:~$ sudo docker run -it --rm --privileged --network host -it polycubenetwork/polycube:latest polycubectl --help
Size of the terminal is too small, output could be missaligned.
Keyword                 Type      Description
 transparenthelloworld   service   Transparent-Helloworld Service
 simplebridge            service   Simple L2 Bridge Service
 nat                     service   NAT Service
 lbrp                    service   LoadBalancer Reverse-Proxy Service
 firewall                service   Firewall Service
 ddosmitigator           service   DDoS Mitigator Service
 simpleforwarder         service   Simple Forwarder Base Service
 lbdsr                   service   LoadBalancer Direct Server Return Service
 pbforwarder             service   Policy-Based Forwarder Service
 helloworld              service   Helloworld Service
 iptables                service   Unknown
 router                  service   Router Service
 k8switch                service   Kubernetes HyperSwitch Service
 k8sfilter               service   Kubernetes Traffic Filtering Service

 connect                 command   Connect ports
 disconnect              command   Disconnect ports

 attach                  command   Attach transparent cubes
 detach                  command   Detach transparent cubes

 services                command   Show/Add/Del services (e.g. Bridge, Router,
                                   ..)
 cubes                   command   Show running service instances (e.g. br1,
                                   nat2, ..)
 topology                command   Show topology of service instances
 netdevs                 command   Show net devices available
user@node1:~$ tput lines && tput cols
57
238

Expected behavior

polycubecctl shouldn't throw an error if the screen size is large enough. Maybe we can also eliminate this terminal size check?!

Please tell us about your environment:

  1. OS details: "Ubuntu 18.04.1 LTS" (64 bit)
  2. Kernel details: 4.17.8-041708-generic
  3. Polycube Version: pre_transparent_services+ [git: (branch/commit): master/b813c671]
  4. Polycube Log:
[2019-04-29 20:17:41.022] [polycubed] [info] configuration parameters:
[2019-04-29 20:17:41.022] [polycubed] [info]  loglevel: info
[2019-04-29 20:17:41.022] [polycubed] [info]  daemon: true
[2019-04-29 20:17:41.022] [polycubed] [info]  pidfile: /var/run/polycube.pid
[2019-04-29 20:17:41.022] [polycubed] [info]  port: 9000
[2019-04-29 20:17:41.023] [polycubed] [info]  addr: localhost
[2019-04-29 20:17:41.023] [polycubed] [info]  logfile: /var/log/polycube/polycubed.log
[2019-04-29 20:17:41.023] [polycubed] [info] polycubed starting...
[2019-04-29 20:17:41.023] [polycubed] [info] version pre_transparent_services+ [git: (branch/commit): master/b813c671]
[2019-04-29 20:17:41.023] [polycubed] [info] running as daemon

Additional context

$ sudo docker images | grep polycube
polycubenetwork/polycube                   latest               5a4805bd2dbc        2 days ago          526MB

acloudiator avatar Apr 30 '19 03:04 acloudiator

Related issue: https://github.com/polycube-network/polycube/issues/13

mauriciovasquezbernal avatar Jul 27 '19 18:07 mauriciovasquezbernal