From 6251f4424364849040c368e42ccc46b7e38fdb40 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Sun, 27 Jun 2021 10:25:30 -0500 Subject: T3653: Cloudinit subnet error if a cidr (/24) is used instead of a subnet mask (255.255.255.0) --- cloudinit/config/cc_vyos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py index fa82d75f..2cd45a32 100644 --- a/cloudinit/config/cc_vyos.py +++ b/cloudinit/config/cc_vyos.py @@ -135,7 +135,7 @@ def set_config_ovf(config, ovf_environment): # Configure an interface and default route if ip_address and ip_mask and gateway: - ip_address_cidr = ipaddress.ip_interface("{}/{}".format(ip_address, ip_mask)).with_prefixlen + ip_address_cidr = ipaddress.ip_interface("{}/{}".format(ip_address, ip_mask.replace('/', ''))).with_prefixlen logger.debug("Configuring the IP address on the eth0 interface: {}".format(ip_address_cidr)) set_ipaddress(config, 'eth0', ip_address_cidr) -- cgit v1.2.3