Error in running ./stack.sh in devstack

13.7k Views Asked by At

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.

`

9

There are 9 best solutions below

0
On

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
On

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
On
  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)

0
On
  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
On

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.

0
On
  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
On

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.

0
On

On Ubuntu 22.04, following the devstack tutorial here: https://docs.openstack.org/devstack/latest/ one only has this in local.conf :

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

In the VM I run ./stack.sh in, I determined the IP from a shell:

ubuntu@ubuntu-Standard-PC-Q35-ICH9-2009:~/develop/devstack$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:e5:00:fb brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute enp1s0
       valid_lft 85917sec preferred_lft 85917sec
    inet6 fec0::dd5:3efa:4caf:756b/64 scope site temporary dynamic 
       valid_lft 86043sec preferred_lft 14043sec
    inet6 fec0::e0d0:2dd7:984b:e9a6/64 scope site dynamic mngtmpaddr noprefixroute 
       valid_lft 86043sec preferred_lft 14043sec
    inet6 fe80::824d:ebd2:b04b:73ff/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

The IP is 10.0.2.15.

I simply added that as the HOST_IP so local.conf looks like: ubuntu@ubuntu-Standard-PC-Q35-ICH9-2009:~/develop/devstack$ cat local.conf

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

Then run the command again and it passes the step.

0
On

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.