2
votes

When I try to do ./stack.sh after the call trace I am provide with the following error :

`[Call Trace]
 ./stack.sh:217:source
 /home/work/devstack/stackrc:821:die
 [ERROR] /home/suramya/devstack/stackrc:821 Could not determine host ip address. See local.conf for suggestions on setting HOST_IP.

`

8

8 Answers

4
votes

After cloning:

  • cd devstack/
  • cp samples/local.conf .
  • Edit the local.conf by adding the setting the HOST_IP of your machine on which devstack is being installed.
1
votes

Add HOST_IP=<your machine ip address> to local.conf file.

STEPS:

  1. List item Go to the root folder where you cloned or copied "devstack". Like /opt/stack/devstack
  2. Edit the "local.conf file. vi local.conf
  3. Add HOST_IP=0.0.0.0 (replace 0.0.0.0 with your machine IP address) to the file. Save and exit. The complete file will look like this:

    [[local|localrc]] HOST_IP=13.84.214.151 ADMIN_PASSWORD=secret DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD

  4. Run ./stack.sh

This should run without errors.

1
votes

First, get the IP address using the command:

ip addr show

Second, after you could get the IP address, copy and paste it in the local.conf file that you have created under the devstack directory, that should be looking like this:

[[local|localrc]]
HOST_IP=0.0.0.0   #replace 0.0.0.0 with your ip
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

then run ./stack.sh again.

1
votes
  1. Edit this file "/opt/stack/devstack/stackrc"

  2. In this file, find the HOST_IP Variable and change it to HOST_IP=0.0.0.0

  3. Instead of 0.0.0.0, set your IP Address (ifconfig)

1
votes
  1. First check the IP address of your server interface by using command ifconfig.
  2. Then find the line

HOST_IP=$(get_default_host_ip "$FIXED_RANGE" "$FLOATING_RANGE" "$HOST_IP_IFACE" "$HOST_IP" "inet") in the file /opt/stack/devstack/stackrc.

Put your server IP (in my setup line number is 859), make sure the entry is like below:

if [ "$HOST_IP" == "192.168.0.0" ];

then save the file (suppose my server IPis 192.168.0.0).

  1. Run ./stack.sh

It works for me.

0
votes

You don't have to set up the HOST_IP. It would be great if you can share your local.conf file for us to take a further look.

Take a look at this: https://docs.openstack.org/devstack/latest/

And there is a sample local.conf file under /samples

0
votes
  1. Find the IP Address
  2. Add HOST_IP=[IP_ADDRESS]
  3. Make sure there is no space between the '=' and IP address in step 2.
0
votes

What I did is to modify stackrc and set

HOST_IP=${HOST_IP:-192.168.227.1}

192.168.227.1 is my IP, use your IP instead.