From da7483a741324d785642822dae36925b03fe3ca4 Mon Sep 17 00:00:00 2001 From: Sandon Van Ness Date: Mon, 8 Jul 2013 16:54:22 -0700 Subject: [PATCH] VM: Use mac addresses from DB instead of randomizing. In order to make IP addresses less likely to change and to allow a smaller DHCP pool to be used I generated static MAC addresses for all the vpm entries in the DB. I also put the correct entries for all the other types of machines as well for their primary (eth0) mac address as well in order to keep things standardized and so there is another location where we have this information. Without this fix going through a few tests would exhaust the DHCP pool which at the time was around 460 IP addresses for virtual machines and has since been upped to ~690 IP addresses. Signed-off-by: Sandon Van Ness Reviewed-by: Warren Usui --- teuthology/lock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/lock.py b/teuthology/lock.py index 0f8f69f232..009c321c91 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -553,7 +553,7 @@ def create_if_vm(ctx, machine_name): file_info['ram'] = lcnfg.get('ram', '1.9G') file_info['cpus'] = lcnfg.get('cpus', 1) file_info['networks'] = lcnfg.get('networks', - [{'source' : 'front'}]) + [{'source' : 'front', 'mac' : status_info['mac']}] file_info['distro'] = lcnfg.get('distro', vm_type.lower()) file_info['additional-disks'] = lcnfg.get( 'additional-disks', 3) -- 2.39.5