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

Alexandre DERUMIER aderumier at odiso.com
Wed Jun 26 05:36:36 CEST 2019


>>But I can use implement colon lists, no problem.

After thinking about it.

actually, colon list are mainly used for rrd, but we have 1 rrd by object (and the filename is the key).

If I'm using kvstore for broadcast, with columnlist, I think I'll have 1key by transportzone,
not sure it'll really clean. (I also don't known how to cleany remove a key if a transportzone is removed from config)

I don't known what is the better/fastest way to store this kind status ? (kv ? rrd ?)

Also,I don't known if user would like to have network stats ? Maybe for vnets ?

in this case, for vnets, rrd make more sense. But I don't known how much data will be broadcasted (20nodes x 300vnets for examples) 




----- Mail original -----
De: "aderumier" <aderumier at odiso.com>
À: "dietmar" <dietmar at proxmox.com>
Cc: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Mardi 25 Juin 2019 19:02:42
Objet: Re: [pve-devel] [PATCH pve-manager 1/2] pvestatd : broadcast sdn transportzone status

>>I am not sure if json is a good idea here. We use colon separated lists for 
>>everything else, so I would prefer that. It is easier to parse inside C, which 
>>is important when you want to generate RRD databases from inside pmxcfs ... 


>>Also, consider that it is quite hard to change that format later, because all cluster nodes 
>>reads/write that data. 

>>So do we want to generate some RRD databases with that data? 

I don't think we need a rrd here, it's a simple status (ok/error/pending/...) on the transportzone. 

I don't want to stream vnet status, because it could be really huge. 
(like 20 servers broadcasting 300vnets for example). 

I the gui, I would like to display transportzone like a storage in the left tree. 
Then for detail, click on the transportzone (like the volumes display on the storage on right pane), 
then query vnets status on the specific node at this time only. 


But I can use implement colon lists, no problem. 


----- Mail original ----- 
De: "dietmar" <dietmar at proxmox.com> 
À: "pve-devel" <pve-devel at pve.proxmox.com>, "aderumier" <aderumier at odiso.com> 
Envoyé: Mardi 25 Juin 2019 08:37:18 
Objet: Re: [pve-devel] [PATCH pve-manager 1/2] pvestatd : broadcast sdn transportzone status 

I am not sure if json is a good idea here. We use colon separated lists for 
everything else, so I would prefer that. It is easier to parse inside C, which 
is important when you want to generate RRD databases from inside pmxcfs ... 

Also, consider that it is quite hard to change that format later, because all cluster nodes 
reads/write that data. 

So do we want to generate some RRD databases with that data? 

> On 25 June 2019 00:04 Alexandre Derumier <aderumier at odiso.com> wrote: 
> 
> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com> 
> --- 
> PVE/Service/pvestatd.pm | 22 ++++++++++++++++++++++ 
> 1 file changed, 22 insertions(+) 
> 
> diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm 
> index e138b2e8..bad1b73d 100755 
> --- a/PVE/Service/pvestatd.pm 
> +++ b/PVE/Service/pvestatd.pm 
> @@ -37,6 +37,12 @@ PVE::Status::Plugin->init(); 
> 
> use base qw(PVE::Daemon); 
> 
> +my $have_sdn; 
> +eval { 
> + require PVE::API2::Network::SDN; 
> + $have_sdn = 1; 
> +}; 
> + 
> my $opt_debug; 
> my $restart_request; 
> 
> @@ -457,6 +463,16 @@ sub update_ceph_version { 
> } 
> } 
> 
> +sub update_sdn_status { 
> + 
> + if($have_sdn) { 
> + my ($transport_status, $vnet_status) = PVE::Network::SDN::status(); 
> + 
> + my $status = $transport_status ? encode_json($transport_status) : undef; 
> + PVE::Cluster::broadcast_node_kv("sdn", $status); 
> + } 
> +} 
> + 
> sub update_status { 
> 
> # update worker list. This is not really required and 
> @@ -524,6 +540,12 @@ sub update_status { 
> $err = $@; 
> syslog('err', "error getting ceph services: $err") if $err; 
> 
> + eval { 
> + update_sdn_status(); 
> + }; 
> + $err = $@; 
> + syslog('err', "sdn status update error: $err") if $err; 
> + 
> } 
> 
> my $next_update = 0; 
> -- 
> 2.20.1 
> 
> _______________________________________________ 
> pve-devel mailing list 
> pve-devel at pve.proxmox.com 
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 

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




More information about the pve-devel mailing list