Search code examples
openstack

Openstack "No hosts found to map to cell, exiting"


I am running into problems with Devstack installation. I git cloned a fresh Devstack on my machine. Ran ./stack.sh once, and hit the following problem.

2016-12-09 13:57:35.870 INFO migrate.versioning.api [req-64697264-f3e0-4c8d-9fa1-19d9d3ceb744 None None] 344 -> 345... 
2016-12-09 13:57:36.225 INFO migrate.versioning.api [req-64697264-f3e0-4c8d-9fa1-19d9d3ceb744 None None] done
2016-12-09 13:57:36.226 INFO migrate.versioning.api [req-64697264-f3e0-4c8d-9fa1-19d9d3ceb744 None None] 345 -> 346... 
2016-12-09 13:57:45.436 INFO migrate.versioning.api [req-64697264-f3e0-4c8d-9fa1-19d9d3ceb744 None None] done
2016-12-09 13:57:45.436 INFO migrate.versioning.api [req-64697264-f3e0-4c8d-9fa1-19d9d3ceb744 None None] 346 -> 347... 
2016-12-09 13:57:47.680 INFO migrate.versioning.api [req-64697264-f3e0-4c8d-9fa1-19d9d3ceb744 None None] done
No hosts found to map to cell, exiting.

No hosts found to map to cell, exiting.
+lib/nova:create_cell:1                    exit_trap
+./stack.sh:exit_trap:487                  local r=1
++./stack.sh:exit_trap:488                  jobs -p
+./stack.sh:exit_trap:488                  jobs=
+./stack.sh:exit_trap:491                  [[ -n '' ]]
+./stack.sh:exit_trap:497                  kill_spinner
+./stack.sh:kill_spinner:383               '[' '!' -z '' ']'
+./stack.sh:exit_trap:499                  [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:500                  echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:501                  generate-subunit 1481266214 5859 fail
+./stack.sh:exit_trap:502                  [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:505                  /home/annakoppad/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2016-12-09-082802.txt for details
+./stack.sh:exit_trap:511                  exit 1

Further, I did ./unstack.sh to and ./clean.sh to clean everything. The same error resulted.

So, I tried two more options of using virtual environments using pyvenv and virtualenv. Both of them gave the same error that is shown below.

(mystack) annakoppad@annakoppad:~/Desktop/mystack/devstack$ ./stack.sh 
+ unset GREP_OPTIONS
+ unset LANG
+ unset LANGUAGE
+ LC_ALL=C
+ export LC_ALL
+ umask 022
+ PATH=/home/annakoppad/Desktop/mystack/bin:/home/annakoppad/bin:/home    /annakoppad/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/sbin:/usr/sbin:/sbin
+++ dirname ./stack.sh
++ cd .
++ pwd
+ TOP_DIR=/home/annakoppad/Desktop/mystack/devstack
+ NOUNSET=
+ [[ -n '' ]]
++ date +%s
+ DEVSTACK_START_TIME=1481289987
+ [[ -r /home/annakoppad/Desktop/mystack/devstack/.stackenv ]]
+ FILES=/home/annakoppad/Desktop/mystack/devstack/files
+ '[' '!' -d /home/annakoppad/Desktop/mystack/devstack/files ']'
+ '[' '!' -d /home/annakoppad/Desktop/mystack/devstack/inc ']'
+ '[' '!' -d /home/annakoppad/Desktop/mystack/devstack/lib ']'
+ [[ '' == \y ]]
+ [[ 1000 -eq 0 ]]
+ [[ -n /home/annakoppad/Desktop/mystack ]]
+ set +o xtrace
You appear to be running under a python virtualenv.
DevStack does not support this, as we may break the
virtualenv you are currently in by modifying 
external system-level components the virtualenv relies on.
We recommend you use a separate virtual-machine if 
you are worried about DevStack taking over your system.

Any pointers on how to overcome will be greatly appreciated.

Thanks in advance.


Solution

  • I suspect the devstack script is failing on this line of code. Which means you want to go to the else branch of code. To do this you need to add enable_service n-cell to your existing local.conf settings.

        [[local|localrc]]
        #NOVA
        enable_service n-cell
    

    I learned to enable the service by looking at this commit

    The commit message states:

    "When cellsv1 is used (n-cell is enabled) skip calling cells_v2 simple_cell_setup, which will never have hosts at the top level and which will always fail."

    Now I'm stuck trying to resolve version conflicts with Cliff and hacking python packages. I hope this helps.