From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <a.lauterer@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 2F3BB62AB6
 for <pve-devel@lists.proxmox.com>; Mon, 21 Dec 2020 15:31:44 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 200A321E1F
 for <pve-devel@lists.proxmox.com>; Mon, 21 Dec 2020 15:31:14 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [212.186.127.180])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id A340521E12
 for <pve-devel@lists.proxmox.com>; Mon, 21 Dec 2020 15:31:13 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 678B64552C
 for <pve-devel@lists.proxmox.com>; Mon, 21 Dec 2020 15:31:13 +0100 (CET)
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <20201221100754.2912-1-a.lauterer@proxmox.com>
 <46039410-6f9f-80da-8508-d48ffec96670@proxmox.com>
From: Aaron Lauterer <a.lauterer@proxmox.com>
Message-ID: <549b7fa7-98b1-bacb-b3ec-33eef0453969@proxmox.com>
Date: Mon, 21 Dec 2020 15:31:12 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <46039410-6f9f-80da-8508-d48ffec96670@proxmox.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 1.645 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 NICE_REPLY_A           -3.299 Looks like a legit reply (A)
 RCVD_IN_DNSWL_MED        -2.3 Sender listed at https://www.dnswl.org/,
 medium trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pve-devel] applied: Re: [PATCH v2 manager] pveceph: change
 status from long JSON to ceph -s
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Mon, 21 Dec 2020 14:31:44 -0000



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.lauterer@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!