]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
VM: Use mac addresses from DB instead of randomizing.
authorSandon Van Ness <sandon@inktank.com>
Mon, 8 Jul 2013 23:54:22 +0000 (16:54 -0700)
committerSandon Van Ness <sandon@inktank.com>
Sat, 13 Jul 2013 03:05:39 +0000 (20:05 -0700)
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 <sandon@inktank.com>
Reviewed-by: Warren Usui <warren.usui@inktank.com>
teuthology/lock.py

index 0f8f69f232c4bae75cd3b0e18053bd8f49ba059c..009c321c91cfc75e5ac4d33bf73ac48fa8a19e95 100644 (file)
@@ -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)