[pve-devel] applied: [PATCH pve-network 0/2] improvments

Alexandre DERUMIER aderumier at odiso.com
Fri Jun 7 15:19:48 CEST 2019


>>seems OK, as said, only thing is that PMG also uses INotify so we need to
>>ensure it still can without to much hassle...

I have send patches, but I don't have look at PMG currently. (I never have used it to be honest)
(I have only move the network configuration part, and was only used in Network API)


----- Mail original -----
De: "Thomas Lamprecht" <t.lamprecht at proxmox.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>, "aderumier" <aderumier at odiso.com>
Envoyé: Vendredi 7 Juin 2019 12:13:39
Objet: Re: [pve-devel] applied: [PATCH pve-network 0/2] improvments

On 6/7/19 7:11 AM, Alexandre DERUMIER wrote: 
>>> 
>>> As long as we have a clear dependency releationship between the 
>>> packages this could be OK. I.e., probably: 
>>> 
>>> common <- network <----------------- manager 
>>> ^ 
>>> `- qemu-server/container <-/ 
> 
> 
> Hi, 
> I have checked in the code, and they are a lot of small sub in Network.pm 
> called in differents modules 
> 
> ex: 
> 
> Cluster.pm: return PVE::Network::get_ip_from_hostname($nodename, $noerr); 
> LXC/Setup/Base.pm: if ($has_ipv4 && !PVE::Network::is_ip_in_cidr($gw, $d->{ip}, 4)) { 
> Storage/ISCSIPlugin.pm: return PVE::Network::tcp_ping($server, $port || 3260, 2); 
> Firewall.pm:use PVE::Network; 
> Firewall.pm: $mask = $PVE::Network::ipv4_mask_hash_localnet->{$entry->{mask}}; 
> 
> 
> 
> 
> subs in Network.pm are mostly helpers and tools, so I think it's better to keep them in common package. 
> (to avoid cycling depend later). 

Yes, those should be pretty independent too, most do some calls an 
parsing to "ip" only, Wolfgang once though replacing those with using 
the netlink protocol to talk directly with the kernel, but his 
perl-netlink wrapper never went public, yet, so we may want to keep it 
and think about this later, it shouldn't hurt here. 


> 
> Code in Inotify.pm is more related to /etc/network/interfaces generation, so it's better to move that 
> in pve-network. 
> 
> Same for API2/Network.pm, it's only related to config management, can be move to pve-network. 
> 
> what do you think about this ? 
> 

seems OK, as said, only thing is that PMG also uses INotify so we need to 
ensure it still can without to much hassle... 




More information about the pve-devel mailing list