[pve-devel] [PATCH pve-manager 1/2] pvestatd : broadcast sdn transportzone status

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jun 26 11:02:32 CEST 2019


On 6/26/19 10:52 AM, Alexandre DERUMIER wrote:
>>> you would need to save them by a it's own ID independent key? 
> yes
> 
>>>
>>> 'sdn/zones' 
>>>
>>> Then a simple "broadcast_node_kv('sdn/zones')" will delete all. 
> 
> yes, that's what my patch is doing currently 
> (I push my json->{$zoneid->{status}
>                ->{$zoneid}->{status}
> 
> to broadcast_node_kv('sdn').

Seems OK to me. If we need RRD in the future we can always add it
orthogonal to this, as long it's a simple status hash it can be OK
like this, IMO.

> 
> 
> But do you mean I should brodcast each zone to broadcast_node_kv('sdn/zones/$zoneid') ?

Ah, no sorry, I though you did that and thus had issues when deleting,
but maybe I just was a bit confused, sorry.

>   
> 
> 
>>> Or do you think a zone state can get to big? We currently can 
>>> save 32kb in a kv entry. 
> No it's pretty small. (Currently I'm sending a status string "available/ok/error", but I could also send an integer)

Hmm, not sure, if we say most JSON entries look like:
"12345":"available",

then we use something around 25 - 30 bytes per entry, with that we ca save
around 1100 zone states:
32*1024 / 30 =~ 1092
32*1024 / 25 =~ 1310

If that's enough then we're good with names too, else with an integer we
could save ~ twice as much, so your call.




More information about the pve-devel mailing list