On 12/21/20 3:25 PM, Thomas Lamprecht wrote:
On 21/12/2020 11:07, Aaron Lauterer wrote:
Printing a lot of very detailed JSON output on the CLI is not very
useful.

Printing the `ceph -s` overview is much more suited to give an overview
of the ceph cluster status.

Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com>
---
v1 -> v2:
* added check if Ceph is iniated to avoid ugly error msg

good idea

* removed eval (if the command fails, we want to see the error msg)
* code style: avoiding long lines

@thomas thx for the hint in the dev guidelines regarding long lines.
somehow I missed that until now and took the surrounding (older) code as
guideline :)


please also add a trailing comma to the last argument when doing all
arguments on separate lines - at least if they're a "eats all" param hash
or array, avoids the need to change multiple lines when adding or removing
an argument. We may add a more specific rule for that though.

ah, forgot about that :/



  PVE/CLI/pveceph.pm | 26 +++++++++++++++++++++-----
  1 file changed, 21 insertions(+), 5 deletions(-)



applied, thanks! Added a timeout of 15s (chose by gut feeling) to the
run_command, as ceph -s hangs indefinitely if it cannot reach any monitor
(and/or other ceph service).

thx!



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to