stack.sh fails because /opt/stack/requirements/global-requirements.txt isn't present

Bug #1441820 reported by Amrith Kumar
50
This bug affects 11 people
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Amrith Kumar

Bug Description

This is seen with a fresh clone of devstack.

An earlier clone from about 6am today didn't have this problem. The code that is failing appears to be newly added (pip_install_gr)

Setting up mysql-server (5.5.41-0ubuntu0.14.04.1) ...
+ real_install_package mysql-server
+ is_ubuntu
+ [[ -z deb ]]
+ '[' deb = deb ']'
+ apt_get install mysql-server
++ set +o
++ grep xtrace
+ local 'xtrace=set -o xtrace'
+ set +o xtrace
+ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --assume-yes install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 486 not upgraded.
+ install_database_python
+ install_database_python_mysql
+ pip_install_gr MySQL-python
+ local name=MySQL-python
++ get_from_global_requirements MySQL-python
++ local package=MySQL-python
+++ grep -h '^MySQL-python' /opt/stack/requirements/global-requirements.txt
+++ cut -d# -f1
grep: /opt/stack/requirements/global-requirements.txt: No such file or directory
++ local required_pkg=
++ [[ '' == '' ]]
++ die 142 'Can'\''t find package MySQL-python in requirements'
++ local exitcode=0
++ set +o xtrace
[ERROR] /home/ubuntu/devstack/inc/python:142 Can't find package MySQL-python in requirements
+ local 'clean_name=[Call Trace]
./stack.sh:724:install_database_python
/home/ubuntu/devstack/lib/database:114:install_database_python_mysql
/home/ubuntu/devstack/lib/databases/mysql:158:pip_install_gr
/home/ubuntu/devstack/inc/python:63:get_from_global_requirements
/home/ubuntu/devstack/inc/python:142:die'
+ pip_install '[Call' 'Trace]' ./stack.sh:724:install_database_python /home/ubuntu/devstack/lib/database:114:install_database_python_mysql /home/ubuntu/devstack/lib/databases/mysql:158:pip_install_gr /home/ubuntu/devstack/inc/python:63:get_from_global_requirements /home/ubuntu/devstack/inc/python:142:die
++ set +o
++ grep xtrace
+ local 'xtrace=set -o xtrace'
+ set +o xtrace
+ sudo -H http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS=file:///opt/stack/.wheelhouse /usr/local/bin/pip install '[Call' 'Trace]' ./stack.sh:724:install_database_python /home/ubuntu/devstack/lib/database:114:install_database_python_mysql /home/ubuntu/devstack/lib/databases/mysql:158:pip_install_gr /home/ubuntu/devstack/inc/python:63:get_from_global_requirements /home/ubuntu/devstack/inc/python:142:die
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 246, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 308, in run
    name, None, isolated=options.isolated_mode,
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 220, in from_line
    isolated=isolated)
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 79, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2960, in parse
    reqs = list(parse_requirements(s))
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2891, in parse_requirements
    raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '[Call')

+ exit_trap
+ local r=2
++ jobs -p
+ jobs=
+ [[ -n '' ]]
+ kill_spinner
+ '[' '!' -z '' ']'
+ [[ 2 -ne 0 ]]
+ echo 'Error on exit'
Error on exit
+ [[ -z /opt/stack/logs ]]
+ /home/ubuntu/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2015-04-08-191010.txt for details

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/171788

Changed in devstack:
assignee: nobody → Amrith (amrith)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/171788
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=9860876f5dbb07826b680143a4e111ad580053fe
Submitter: Jenkins
Branch: master

commit 9860876f5dbb07826b680143a4e111ad580053fe
Author: Amrith Kumar <email address hidden>
Date: Wed Apr 8 15:37:58 2015 -0400

    perform install_infra sooner in stack.sh

    The install_infra() call needs to be done earlier since
    pip_install_gr() depends on it. Also the fact that python module names
    are supposed to be lower case but some use camel case is a problem
    (for example with XenAPI).

    Change-Id: I7012d77134fa0d9c746d87e837934e7dcb337e5c
    Closes-Bug: #1441820

Changed in devstack:
status: In Progress → Fix Released
Revision history for this message
Ionut Hulub (ionut-hulub) wrote :

It didn't solve the issue.

Revision history for this message
Amrith Kumar (amrith) wrote :

Ionut, what failure did you see? Please post a log if at all possible else describe your environment/configuration so I may try and reproduce it.

Revision history for this message
Ionut Hulub (ionut-hulub) wrote :

False alarm. It's because I'm new to devstack. I used the Icehouse version then I ran clean.sh and tried installing the Juno version. Turns out it was still using the global requirements from the Icehouse version. I had to delete /opt/stack and it worked.

Revision history for this message
Amrith Kumar (amrith) wrote :

Thanks Ionut!

Revision history for this message
Manish Kumar (manish.algomuse) wrote :

Hello ionut-hulub,

Same error I am also getting,
I can't get your solution for this problem, can u explain bit.

thanking you in advance

Revision history for this message
Manish Kumar (manish.algomuse) wrote :

exact error after

./stack.sh

Revision history for this message
Amrith Kumar (amrith) wrote :

Any chance you could attach the text of the error instead of a picture?

Revision history for this message
Manish Kumar (manish.algomuse) wrote :
Download full text (4.9 KiB)

++lib/rpc_backend:rabbit_setuser:136 awk '$1 == user { print $1 }' user=stackrabbit
+lib/rpc_backend:rabbit_setuser:136 found=stackrabbit
+lib/rpc_backend:rabbit_setuser:137 '[' stackrabbit = stackrabbit ']'
+lib/rpc_backend:rabbit_setuser:138 sudo rabbitmqctl change_password stackrabbit password
Changing password for user "stackrabbit" ...
+lib/rpc_backend:rabbit_setuser:144 sudo rabbitmqctl set_permissions stackrabbit '.*' '.*' '.*'
Setting permissions for user "stackrabbit" in vhost "/" ...
+lib/rpc_backend:restart_rpc_backend:84 '[' 0 -ne 0 ']'
+lib/rpc_backend:restart_rpc_backend:89 sudo rabbitmqctl change_password stackrabbit password
Changing password for user "stackrabbit" ...
+lib/rpc_backend:restart_rpc_backend:91 '[' 0 -ne 0 ']'
+lib/rpc_backend:restart_rpc_backend:95 break
+lib/rpc_backend:restart_rpc_backend:97 is_service_enabled n-cell
+functions-common:is_service_enabled:2043 local xtrace
++functions-common:is_service_enabled:2044 set +o
++functions-common:is_service_enabled:2044 grep xtrace
+functions-common:is_service_enabled:2044 xtrace='set -o xtrace'
+functions-common:is_service_enabled:2045 set +o xtrace
+functions-common:is_service_enabled:2073 return 1
+./stack.sh:main:958 '[' -f /opt/stack/data/ca-bundle.pem ']'
+./stack.sh:main:966 is_service_enabled mysql postgresql
+functions-common:is_service_enabled:2043 local xtrace
++functions-common:is_service_enabled:2044 set +o
++functions-common:is_service_enabled:2044 grep xtrace
+functions-common:is_service_enabled:2044 xtrace='set -o xtrace'
+functions-common:is_service_enabled:2045 set +o xtrace
+functions-common:is_service_enabled:2073 return 0
+./stack.sh:main:967 configure_database
+lib/database:configure_database:128 configure_database_mysql
+lib/databases/mysql:configure_database_mysql:62 local my_conf mysql slow_log
+lib/databases/mysql:configure_database_mysql:63 echo_summary 'Configuring and starting MySQL'
+./stack.sh:echo_summary:392 [[ -t 3 ]]
+./stack.sh:echo_summary:392 [[ True != \T\r\u\e ]]
+./stack.sh:echo_summary:398 echo -e Configuring and starting MySQL
2016-12-07 10:17:46.272 | Configuring and starting MySQL
+lib/databases/mysql:configure_database_mysql:65 is_ubuntu
+functions-common:is_ubuntu:466 [[ -z deb ]]
+functions-common:is_ubuntu:469 '[' deb = deb ']'
+lib/databases/mysql:configure_database_mysql:66 my_conf=/etc/mysql/my.cnf
+lib/databases/mysql:configure_database_mysql:67 mysql=mysql
+lib/databases/mysql:configure_database_mysql:79 is_fedora
+functions-common:is_fedora:439 [[ -z Ubuntu ]]
+functions-common:is_fedora:443 '[' Ubuntu = Fedora ']'
+functions-common:is_fedora:443 '[' Ubuntu = 'Red Hat' ']'
+functions-common:is_fedora:444 '[' Ubuntu = RedHatEnterpriseServer ']'
+functions-common:is_fedora:445 '[' Ubuntu = CentOS ']'
+functions-common:is_fedora:445 '[' Ubuntu = OracleServer ']'
+functions-common:is_fedora:446 '[' Ubuntu = Virtuozzo ']'
+functions-common:is_...

Read more...

Revision history for this message
Amrith Kumar (amrith) wrote :

Totally and absolutely unrelated to the subject of this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.