[pve-devel] pve-network : new proposal for apply/reload config

Alexandre DERUMIER aderumier at odiso.com
Tue May 7 01:10:21 CEST 2019


Hi,

I have rethinked about reloading config, without extra daemon:


"
datacenter level:
   -commit config :  - mv /etc/pve/networks.cfg.new /etc/pve/networks.cfg
                     - call each (online) node reload api.


local node:
      reload api:  -> generate /etc/network/interfaces.d/vnet
                      merge pending /etc/network/interfaces.new to /etc/network/interfaces
                      ifreload -a  (2minutes for 2000 vnets, but take 15s at boot ( ifup -a --perfmode)
)

                    
pvestatd:

 get running config : ifquery -a -r    (15second for 2000vnets -> maybe make a cache(cron?otherdaemon?) to not block pvestatd ?)
 for each vnet and vnet bridge-ports
      compare running_config with /etc/network/interfaces.d/vnet
      status: ok / error (vnet missing, or different config(vlan tag,...)) -> broadcast status
 
(they are also a "ifquery -c <int>" to compare running and configuration, but it's interface by interface, and maybe more slower,
so it could be used to have an accurate detail on a specific vnet in the gui)



      
Error should occur because a conflict with a local setting (already used vlan, missing uplink-id,...)
So user can easy see errors from pvestatd status for each vnet. (displayed in the tree ?).
then for fix error, user go the local network configuration, do local network fix changes,
and call reload api again.

If the node was offline when we have commit network config, the vnets will also be displayed in error (different config, missing vnet,...),
so user can also reload it manually from local config.

"


I think this give more control to user, and avoid to have a background daemon reloading networking. (More simpler to fix error, avoid reload loop,....)

What do you think about this ?


Alexandre



More information about the pve-devel mailing list