addresses one bug that failed to create ifcfg-eth0 for mlab boot images.
authorStephen Soltesz <soltesz@cs.princeton.edu>
Mon, 8 Jun 2009 16:10:46 +0000 (16:10 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Mon, 8 Jun 2009 16:10:46 +0000 (16:10 +0000)
commitf18c2cbddd90d35305887ef3a6346a693b9a05ea
treead3a15a1b8a725aed7a3576501001cc84f0d1a22
parenta5f0a46e0b5508b8cc286ef637a98f6f7941cece
addresses one bug that failed to create ifcfg-eth0 for mlab boot images.

Because the variable 'interface' is decremented as each interface is processed,
by the time the primary, is_primary=True interface is reached, the device
name "eth%s" % interface, is not eth0, but, something like eth-4, or eth-12.

This patch sorts the interfaces, implicitly placing the primary (first created)
interface first.  There is a lot of room for improvement to how this script
handles interfaces and how it chooses the primary interface.
plnet.py