blindsidenetworks / scalelite

Scalable load balancer for BigBlueButton.
GNU Affero General Public License v3.0
465 stars 249 forks source link

`status` should not wrap lines #1020

Closed debuglevel closed 2 months ago

debuglevel commented 9 months ago

This is the regular output if called in a terminal:

# [...] status
           HOSTNAME              STATE   STATUS  MEETINGS  USERS  LARGEST MEETING  VIDEOS  LOAD
 bbb-testing.xyz-konferenz.de  disabled  online  0         0      0                0
 bbb5.xyz-konferenz.de         enabled   online  2         3      2                3        6.0

This is the output when called in a script or piped:

# [...] status | cat
  HOSTNAME    STATE   STATUS  MEETINGS  USERS  LARGEST M  VIDEOS  LOAD
                                                 EETING
 bbb-testi  disabled  online  0         0      0          0
 ng.xyz-ko
 nferenz.d
 e
 bbb5.xyz-  enabled   online  2         3      2          3        6.0
 konferenz
 .de

It would be nice if there was no line-wrapping, so we could use this in scripts.

I also tried to capture the output, but that is even worse:

# foo=$([...] status)
# echo $foo
 .de erenz enabled online 2 3 2 3 6.0 ARGEST M VIDEOS LOAD

PS: Sorry for [...] - I'm using a wrapper script around dockerized scalelite.

pielonet commented 9 months ago

Hi @debuglevel ,

could you try this (we have been using it for 3 years now in our opensource BBB orchestrator https://github.com/arawa/divims) ?

docker exec -e COLUMNS=1000 scalelite-api ./bin/rake status
Ithanil commented 3 months ago

This is fixed by https://github.com/blindsidenetworks/scalelite/pull/1054 .