public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 2/4] api: ceph pools: add type to returned properties
Date: Mon, 2 May 2022 09:19:10 +0200	[thread overview]
Message-ID: <bf497f99-9b8f-d63b-4285-33cbdf6bad68@proxmox.com> (raw)
In-Reply-To: <453f8ec1-4b40-0f86-ed1f-c2a79e3e53c3@proxmox.com>



On 5/2/22 09:11, Dominik Csapak wrote:
> one nit inline
> 
> On 4/29/22 16:16, Aaron Lauterer wrote:
>> The osd dump already contains the pool type in numerical format.
>>
>> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
>> ---
>>   PVE/API2/Ceph/Pools.pm | 14 ++++++++++++++
>>   1 file changed, 14 insertions(+)
>>
>> diff --git a/PVE/API2/Ceph/Pools.pm b/PVE/API2/Ceph/Pools.pm
>> index efdee360..b93f87e4 100644
>> --- a/PVE/API2/Ceph/Pools.pm
>> +++ b/PVE/API2/Ceph/Pools.pm
>> @@ -66,6 +66,11 @@ __PACKAGE__->register_method ({
>>               type => 'integer',
>>               title => 'Size',
>>           },
>> +        type => {
>> +            type => 'string',
>> +            title => 'Type',
>> +            enum => ['replicated', 'erasure', 'unknown'],
>> +        },
>>           min_size => {
>>               type => 'integer',
>>               title => 'Min Size',
>> @@ -185,6 +190,15 @@ __PACKAGE__->register_method ({
>>           $d->{bytes_used} = $s->{bytes_used};
>>           $d->{percent_used} = $s->{percent_used};
>>           }
>> +
>> +        if ($e->{type} == 1) {
>> +        $d->{type} = 'replicated';
>> +        } elsif ($e->{type} == 3) {
>> +        $d->{type} = 'erasure';
>> +        } else {
>> +        # we should never get here, but better be safe
>> +        $d->{type} = 'unknown';
>> +        }
> 
> i remember we talked off-list about those '1' / '3' values,
> but is there any reference we can use to document these?
> (as comment or commit message)
> 
> even if it's only a link to some github or refence to a file in
> some commit hash of ceph, that way we can easily look it up
> if it changes

sure
> 
> also what would be value '2' ?

beats me, didn't find anything ;)

> 
>>           push @$data, $d;
>>       }
> 
> 




  reply	other threads:[~2022-05-02  7:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 14:16 [pve-devel] [PATCH manager 1/4] ceph tools: set_pools: filter settings for erasure code pools Aaron Lauterer
2022-04-29 14:16 ` [pve-devel] [PATCH manager 2/4] api: ceph pools: add type to returned properties Aaron Lauterer
2022-05-02  7:11   ` Dominik Csapak
2022-05-02  7:19     ` Aaron Lauterer [this message]
2022-04-29 14:16 ` [pve-devel] [PATCH manager 3/4] ui: ceph pool edit: disable size and crush rule for erasure pools Aaron Lauterer
2022-04-29 14:16 ` [pve-devel] [PATCH manager 4/4] ui: ceph pools: add pool type column Aaron Lauterer
2022-05-02  7:10 ` [pve-devel] [PATCH manager 1/4] ceph tools: set_pools: filter settings for erasure code pools Dominik Csapak
2022-05-02  7:13 ` Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf497f99-9b8f-d63b-4285-33cbdf6bad68@proxmox.com \
    --to=a.lauterer@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal