Ask Your Question
0

Standalone mode (no network)

asked 2011-03-28 13:31:40 -0500

laurent-borensky gravatar image

Hi,

I search to work with a standalone PC. I just would like validated nova fonctionality with qemu hypervisor. I installed Nova with HOST_IP=127.0.0.1 & USE_MYSQL=1, but I was connected to internet. After reboot, without network, I have an error on each service (ie: nova-api, nova-compute, etc.). The error is relative to DNS Internet (8.8.8.8) with this code (flags.py): def _get_my_ip() """ returns the actual IP of local machine """ try: csock = scocket.socket(socket.AF_INET, socket.SOCK_DGRAM) csock.connect(('8.8.8.8')) (addr, port) = csock.getsockname() return addr except socket.gaierror as ex: return 127.0.0.1

OK, It is really possible to work in standalone mode ?

Thank's

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2011-03-30 14:22:25 -0500

laurent-borensky gravatar image

Hi at all,

OK, I modified (temporaly) the code (see below) to solve my problem to use standalone Nova with my PC. Now, I must confirm that it is possible to run a VM (qemu) with my environment.

source modification: (file: nova/nova/flags.py) WAS: line 203

def _get_my_ip():
    """Returns the actual ip of the local machine."""
    try:
        csock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        csock = connect(('8.8.8.8', 80))
        (addr, port) = csock.getsockname()
        csock.close
        return addr
    except socket.gaierror as ex:
        return "127.0.0.1"

NOW IS:

def _get_my_ip():
    """Returns the actual ip of the local machine."""
    return "127.0.0.1"
    """
    try:
        csock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        csock = connect(('8.8.8.8', 80))
        (addr, port) = csock.getsockname()
        csock.close
        return addr
    except socket.gaierror as ex:
        return "127.0.0.1"
    """

But why the exception did not return the good value (string "127.0.0.1") ?

Regards,

edit flag offensive delete link more
0

answered 2011-03-30 14:24:45 -0500

laurent-borensky gravatar image

OK, it's just a patch personal

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-03-28 13:31:40 -0500

Seen: 39 times

Last updated: Mar 30 '11