>>You need to know that for now the data is always node dependent, 
>>so currently there's no cluster wide kv-status where one can easily 
>>save things node-independently, or is the SDN status node dependent 
>>anyway? 

Yes, I need to have it for each node. 
(It's the status of local network config, to known if the config from cluster 
wide sdn.cfg
if correctly applied/reload on each local node)



>>you can serialize it with encode_json before, and then deserialize 
>>it on reads with decode_json 
>>We explicitly left out internal serialization for now (as the one 
>>reading/writing 
>>keys should be able to know in which format it comes) 

Ok Thanks ! 



----- Mail original -----
De: "Thomas Lamprecht" <t.lampre...@proxmox.com>
À: "pve-devel" <pve-devel@pve.proxmox.com>, "aderumier" <aderum...@odiso.com>
Envoyé: Lundi 24 Juin 2019 17:03:39
Objet: Re: [pve-devel] broadcast_node_kv , is it possible to send a complex 
value like a hash ?

Hi, 

On 6/24/19 4:53 PM, Alexandre DERUMIER wrote: 
> for SDN, I'm looking to use broadcast_node_kv, to send status of 
> transportzones.(not vnet directly, as it could be really huge with a lot a 
> vnet). 
> 

You need to know that for now the data is always node dependent, 
so currently there's no cluster wide kv-status where one can easily 
save things node-independently, or is the SDN status node dependent 
anyway? 

> I would like to known if it's possible to broadcast a hash instead a string. 
> (the code seem to refuse ref). 
> 
> something like "kv/sdn":$myhash->{transport1}->{status} 
> ->{transport2}->{status} 
> 

you can serialize it with encode_json before, and then deserialize 
it on reads with decode_json 
We explicitly left out internal serialization for now (as the one 
reading/writing 
keys should be able to know in which format it comes) 

> 
> Alternatively, I could send a kv for each transport 
> 
> "kv/sdn-transport1": $status 
> "kv/sdn-transport2": $status 
> 
> 
> But I don't known how to remove old key if a transportzone is remove ? (do we 
> have some kind of ttl ?) 

no TTL, you can delete it though by just passing the key and leaving 
data undef, then it gets deleted for that node. 

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

Reply via email to