Comment 5 for bug 608772

Revision history for this message
Jay Pipes (jaypipes) wrote :

Sure it will.

from /nova/utils.py:

def default_flagfile(filename='nova.conf'):
    for arg in sys.argv:
        if arg.find('flagfile') != -1:
            break
    else:
        if not os.path.isabs(filename):
            # turn relative filename into an absolute path
            script_dir = os.path.dirname(inspect.stack()[-1][1])
            filename = os.path.abspath(os.path.join(script_dir, filename))
        if os.path.exists(filename):
            sys.argv = sys.argv[:1] + ['--flagfile=%s' % filename] + sys.argv[1:]

Anyway, I think it may have to do with Python sys.path, because when I print network, it shows I have the darn module loaded, but doesn't think there is a network.lease_ip attributes (which of course there is):

jpipes@serialcoder:~/repos/nova/bug608772$ TESTING=1 ./bin/nova-dhcpbridge add fake 127.0.0.1 serialcoder
warning: no vendor libraries included
DEBUG:root:Called add for mac fake with ip 127.0.0.1 and hostname serialcoder on interface br0
<module 'nova.compute.network' from '/usr/lib/pymodules/python2.6/nova/compute/network.py'>
Traceback (most recent call last):
  File "./bin/nova-dhcpbridge", line 89, in <module>
    globals()[action+'_lease'](mac, ip, hostname, interface)
  File "./bin/nova-dhcpbridge", line 48, in add_lease
    network.lease_ip(ip)
AttributeError: 'module' object has no attribute 'lease_ip'