public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 pve-container 0/1] add ipam support
@ 2021-05-19  6:59 Alexandre Derumier
  2021-05-19  6:59 ` [pve-devel] [PATCH v2 pve-container 1/1] " Alexandre Derumier
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Derumier @ 2021-05-19  6:59 UTC (permalink / raw)
  To: pve-devel

Changelog v2:

- refactor code
- move code from PVE::LXC::Config to PVE::LXC
- add update_net_ip tests
- fix bugs when changing from vnet ipam to vnet without ipam/ without subnets / classic vmbr
- add support for snasphot rollback
- add support for backup restore

Alexandre Derumier (1):
  add ipam support

 src/PVE/LXC.pm                                | 144 ++++++++++++++++++
 src/PVE/LXC/Config.pm                         |  58 +++++++
 src/PVE/LXC/Create.pm                         |  33 +++-
 src/test/Makefile                             |   5 +-
 .../ipam.db                                   |  18 +++
 .../ipam.db.expected                          |  17 +++
 .../ipam_config                               |   7 +
 .../net                                       |   7 +
 .../net.expected                              |   7 +
 .../oldnet                                    |   7 +
 .../sdn_config                                |  35 +++++
 .../ipam.db                                   |  18 +++
 .../ipam.db.expected                          |  18 +++
 .../ipam_config                               |   7 +
 .../net                                       |   7 +
 .../net.expected                              |   7 +
 .../oldnet                                    |   7 +
 .../sdn_config                                |  35 +++++
 .../ipam.db                                   |  18 +++
 .../ipam.db.expected                          |  17 +++
 .../ipam_config                               |   7 +
 .../net                                       |   7 +
 .../net.expected                              |   7 +
 .../oldnet                                    |   7 +
 .../sdn_config                                |  35 +++++
 .../ipam.db                                   |  18 +++
 .../ipam.db.expected                          |  18 +++
 .../ipam_config                               |   7 +
 .../net                                       |   6 +
 .../net.expected                              |   7 +
 .../oldnet                                    |   7 +
 .../sdn_config                                |  35 +++++
 .../ipam.db                                   |  18 +++
 .../ipam.db.expected                          |  18 +++
 .../ipam_config                               |   7 +
 .../net                                       |   6 +
 .../net.expected                              |   7 +
 .../oldnet                                    |   7 +
 .../sdn_config                                |  35 +++++
 .../ipv4_changeip_samevnet_with_ipam/ipam.db  |  18 +++
 .../ipam.db.expected                          |  18 +++
 .../ipam_config                               |   7 +
 .../ipv4_changeip_samevnet_with_ipam/net      |   7 +
 .../net.expected                              |   7 +
 .../ipv4_changeip_samevnet_with_ipam/oldnet   |   7 +
 .../sdn_config                                |  35 +++++
 .../ipv4_changeip_vmbr0_to_ipamvnet/ipam.db   |  17 +++
 .../ipam.db.expected                          |  18 +++
 .../ipam_config                               |   7 +
 .../ipams/ipv4_changeip_vmbr0_to_ipamvnet/net |   7 +
 .../net.expected                              |   7 +
 .../ipv4_changeip_vmbr0_to_ipamvnet/oldnet    |   7 +
 .../sdn_config                                |  35 +++++
 .../ipv4_changeip_vmbr0_to_noipamvnet/ipam.db |  17 +++
 .../ipam.db.expected                          |  17 +++
 .../ipam_config                               |   7 +
 .../ipv4_changeip_vmbr0_to_noipamvnet/net     |   7 +
 .../net.expected                              |   7 +
 .../ipv4_changeip_vmbr0_to_noipamvnet/oldnet  |   7 +
 .../sdn_config                                |  35 +++++
 .../ipam.db                                   |  18 +++
 .../ipam.db.expected                          |  18 +++
 .../ipam_config                               |   7 +
 .../net                                       |   7 +
 .../net.expected                              |   8 +
 .../oldnet                                    |   7 +
 .../sdn_config                                |  38 +++++
 .../ipam.db                                   |  18 +++
 .../ipam.db.expected                          |  17 +++
 .../ipam_config                               |   7 +
 .../net                                       |   8 +
 .../net.expected                              |   8 +
 .../oldnet                                    |   7 +
 .../sdn_config                                |  38 +++++
 .../ipam.db                                   |  18 +++
 .../ipam.db.expected                          |  18 +++
 .../ipam_config                               |   7 +
 .../net                                       |   7 +
 .../net.expected                              |   7 +
 .../oldnet                                    |   8 +
 .../sdn_config                                |  36 +++++
 .../ipams/ipv4_updateipam_ipamvnet/ipam.db    |  18 +++
 .../ipv4_updateipam_ipamvnet/ipam.db.expected |  18 +++
 .../ipv4_updateipam_ipamvnet/ipam_config      |   7 +
 src/test/ipams/ipv4_updateipam_ipamvnet/net   |   7 +
 .../ipv4_updateipam_ipamvnet/net.expected     |   7 +
 .../ipams/ipv4_updateipam_ipamvnet/oldnet     |   7 +
 .../ipams/ipv4_updateipam_ipamvnet/sdn_config |  35 +++++
 .../ipam.db                                   |  19 +++
 .../ipam.db.expected                          |  19 +++
 .../ipam_config                               |   7 +
 .../ipv4v6_next_free_samevnet_with_ipam/net   |   6 +
 .../net.expected                              |   8 +
 .../oldnet                                    |   8 +
 .../sdn_config                                |  39 +++++
 .../ipam.db                                   |  20 +++
 .../ipam.db.expected                          |  20 +++
 .../ipam_config                               |   7 +
 .../net                                       |   6 +
 .../net.expected                              |   8 +
 .../oldnet                                    |   8 +
 .../sdn_config                                |  39 +++++
 .../ipams/ipv4v6_updateipam_ipamvnet/ipam.db  |  19 +++
 .../ipam.db.expected                          |  19 +++
 .../ipv4v6_updateipam_ipamvnet/ipam_config    |   7 +
 src/test/ipams/ipv4v6_updateipam_ipamvnet/net |   8 +
 .../ipv4v6_updateipam_ipamvnet/net.expected   |   8 +
 .../ipams/ipv4v6_updateipam_ipamvnet/oldnet   |   8 +
 .../ipv4v6_updateipam_ipamvnet/sdn_config     |  39 +++++
 .../ipam.db                                   |  19 +++
 .../ipam.db.expected                          |  19 +++
 .../ipam_config                               |   7 +
 .../ipv4v6_updateipam_ipamvnet_failingv6/net  |   8 +
 .../net.expected                              |   8 +
 .../oldnet                                    |   8 +
 .../sdn_config                                |  35 +++++
 .../ipam.db                                   |  18 +++
 .../ipam.db.expected                          |  18 +++
 .../ipam_config                               |   7 +
 .../net                                       |   7 +
 .../net.expected                              |   7 +
 .../oldnet                                    |   7 +
 .../sdn_config                                |  35 +++++
 .../ipam.db                                   |  18 +++
 .../ipam.db.expected                          |  18 +++
 .../ipam_config                               |   7 +
 .../net                                       |   7 +
 .../net.expected                              |   8 +
 .../oldnet                                    |   7 +
 .../sdn_config                                |  37 +++++
 .../ipams/ipv6_updateipam_ipamvnet/ipam.db    |  14 ++
 .../ipv6_updateipam_ipamvnet/ipam.db.expected |  14 ++
 .../ipv6_updateipam_ipamvnet/ipam_config      |   7 +
 src/test/ipams/ipv6_updateipam_ipamvnet/net   |   7 +
 .../ipv6_updateipam_ipamvnet/net.expected     |   7 +
 .../ipams/ipv6_updateipam_ipamvnet/oldnet     |   7 +
 .../ipams/ipv6_updateipam_ipamvnet/sdn_config |  35 +++++
 src/test/run_ipam_tests.pl                    | 126 +++++++++++++++
 src/test/snapshot-input/sdn/subnets.cfg       |   0
 src/test/snapshot-test.pm                     |   1 -
 140 files changed, 2266 insertions(+), 10 deletions(-)
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnet_noipam/ipam.db
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnet_noipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnet_noipam/ipam_config
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnet_noipam/net
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnet_noipam/net.expected
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnet_noipam/oldnet
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnet_noipam/sdn_config
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnetipam/ipam.db
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnetipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnetipam/ipam_config
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnetipam/net
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnetipam/net.expected
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnetipam/oldnet
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_othervnetipam/sdn_config
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_vmbr0_noipam/ipam.db
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_vmbr0_noipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_vmbr0_noipam/ipam_config
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_vmbr0_noipam/net
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_vmbr0_noipam/net.expected
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_vmbr0_noipam/oldnet
 create mode 100644 src/test/ipams/ipv4_changeip_ipamvnet_to_vmbr0_noipam/sdn_config
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_othervnet_with_ipam/ipam.db
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_othervnet_with_ipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_othervnet_with_ipam/ipam_config
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_othervnet_with_ipam/net
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_othervnet_with_ipam/net.expected
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_othervnet_with_ipam/oldnet
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_othervnet_with_ipam/sdn_config
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_samevnet_with_ipam/ipam.db
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_samevnet_with_ipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_samevnet_with_ipam/ipam_config
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_samevnet_with_ipam/net
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_samevnet_with_ipam/net.expected
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_samevnet_with_ipam/oldnet
 create mode 100644 src/test/ipams/ipv4_changeip_next_free_samevnet_with_ipam/sdn_config
 create mode 100644 src/test/ipams/ipv4_changeip_samevnet_with_ipam/ipam.db
 create mode 100644 src/test/ipams/ipv4_changeip_samevnet_with_ipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_changeip_samevnet_with_ipam/ipam_config
 create mode 100644 src/test/ipams/ipv4_changeip_samevnet_with_ipam/net
 create mode 100644 src/test/ipams/ipv4_changeip_samevnet_with_ipam/net.expected
 create mode 100644 src/test/ipams/ipv4_changeip_samevnet_with_ipam/oldnet
 create mode 100644 src/test/ipams/ipv4_changeip_samevnet_with_ipam/sdn_config
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_ipamvnet/ipam.db
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_ipamvnet/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_ipamvnet/ipam_config
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_ipamvnet/net
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_ipamvnet/net.expected
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_ipamvnet/oldnet
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_ipamvnet/sdn_config
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_noipamvnet/ipam.db
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_noipamvnet/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_noipamvnet/ipam_config
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_noipamvnet/net
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_noipamvnet/net.expected
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_noipamvnet/oldnet
 create mode 100644 src/test/ipams/ipv4_changeip_vmbr0_to_noipamvnet/sdn_config
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetipam/ipam.db
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetipam/ipam_config
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetipam/net
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetipam/net.expected
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetipam/oldnet
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetipam/sdn_config
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetnoipam/ipam.db
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetnoipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetnoipam/ipam_config
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetnoipam/net
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetnoipam/net.expected
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetnoipam/oldnet
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_gateway_othervnetnoipam/sdn_config
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_nogateway_othervnetipam/ipam.db
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_nogateway_othervnetipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_nogateway_othervnetipam/ipam_config
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_nogateway_othervnetipam/net
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_nogateway_othervnetipam/net.expected
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_nogateway_othervnetipam/oldnet
 create mode 100644 src/test/ipams/ipv4_gateway_changeip_ipamvnet_to_nogateway_othervnetipam/sdn_config
 create mode 100644 src/test/ipams/ipv4_updateipam_ipamvnet/ipam.db
 create mode 100644 src/test/ipams/ipv4_updateipam_ipamvnet/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4_updateipam_ipamvnet/ipam_config
 create mode 100644 src/test/ipams/ipv4_updateipam_ipamvnet/net
 create mode 100644 src/test/ipams/ipv4_updateipam_ipamvnet/net.expected
 create mode 100644 src/test/ipams/ipv4_updateipam_ipamvnet/oldnet
 create mode 100644 src/test/ipams/ipv4_updateipam_ipamvnet/sdn_config
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam/ipam.db
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam/ipam_config
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam/net
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam/net.expected
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam/oldnet
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam/sdn_config
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam_failingv6/ipam.db
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam_failingv6/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam_failingv6/ipam_config
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam_failingv6/net
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam_failingv6/net.expected
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam_failingv6/oldnet
 create mode 100644 src/test/ipams/ipv4v6_next_free_samevnet_with_ipam_failingv6/sdn_config
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet/ipam.db
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet/ipam_config
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet/net
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet/net.expected
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet/oldnet
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet/sdn_config
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet_failingv6/ipam.db
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet_failingv6/ipam.db.expected
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet_failingv6/ipam_config
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet_failingv6/net
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet_failingv6/net.expected
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet_failingv6/oldnet
 create mode 100644 src/test/ipams/ipv4v6_updateipam_ipamvnet_failingv6/sdn_config
 create mode 100644 src/test/ipams/ipv6_changeip_ipamvnet_to_othervnetipam/ipam.db
 create mode 100644 src/test/ipams/ipv6_changeip_ipamvnet_to_othervnetipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv6_changeip_ipamvnet_to_othervnetipam/ipam_config
 create mode 100644 src/test/ipams/ipv6_changeip_ipamvnet_to_othervnetipam/net
 create mode 100644 src/test/ipams/ipv6_changeip_ipamvnet_to_othervnetipam/net.expected
 create mode 100644 src/test/ipams/ipv6_changeip_ipamvnet_to_othervnetipam/oldnet
 create mode 100644 src/test/ipams/ipv6_changeip_ipamvnet_to_othervnetipam/sdn_config
 create mode 100644 src/test/ipams/ipv6_gateway_changeip_ipamvnet_to_gateway_othervnetipam/ipam.db
 create mode 100644 src/test/ipams/ipv6_gateway_changeip_ipamvnet_to_gateway_othervnetipam/ipam.db.expected
 create mode 100644 src/test/ipams/ipv6_gateway_changeip_ipamvnet_to_gateway_othervnetipam/ipam_config
 create mode 100644 src/test/ipams/ipv6_gateway_changeip_ipamvnet_to_gateway_othervnetipam/net
 create mode 100644 src/test/ipams/ipv6_gateway_changeip_ipamvnet_to_gateway_othervnetipam/net.expected
 create mode 100644 src/test/ipams/ipv6_gateway_changeip_ipamvnet_to_gateway_othervnetipam/oldnet
 create mode 100644 src/test/ipams/ipv6_gateway_changeip_ipamvnet_to_gateway_othervnetipam/sdn_config
 create mode 100644 src/test/ipams/ipv6_updateipam_ipamvnet/ipam.db
 create mode 100644 src/test/ipams/ipv6_updateipam_ipamvnet/ipam.db.expected
 create mode 100644 src/test/ipams/ipv6_updateipam_ipamvnet/ipam_config
 create mode 100644 src/test/ipams/ipv6_updateipam_ipamvnet/net
 create mode 100644 src/test/ipams/ipv6_updateipam_ipamvnet/net.expected
 create mode 100644 src/test/ipams/ipv6_updateipam_ipamvnet/oldnet
 create mode 100644 src/test/ipams/ipv6_updateipam_ipamvnet/sdn_config
 create mode 100755 src/test/run_ipam_tests.pl
 create mode 100644 src/test/snapshot-input/sdn/subnets.cfg

-- 
2.20.1




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-19  7:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19  6:59 [pve-devel] [PATCH v2 pve-container 0/1] add ipam support Alexandre Derumier
2021-05-19  6:59 ` [pve-devel] [PATCH v2 pve-container 1/1] " Alexandre Derumier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal