DevStack tries to use pip right after uninstalling it (or without installing, if not present)

Bug #1383370 reported by Dmitry Tantsur
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
devstack
Invalid
Undecided
Unassigned

Bug Description

How it looks like if pip wasn't present:

2014-10-20 16:23:24.554 | + get_versions
2014-10-20 16:23:24.554 | ++ which pip
2014-10-20 16:23:24.555 | ++ which pip-python
2014-10-20 16:23:24.556 | ++ true
2014-10-20 16:23:24.556 | + PIP=
2014-10-20 16:23:24.556 | + [[ -n '' ]]
2014-10-20 16:23:24.556 | + echo 'pip: Not Installed'
2014-10-20 16:23:24.556 | pip: Not Installed
2014-10-20 16:23:24.556 | + uninstall_package python-pip
2014-10-20 16:23:24.556 | + is_ubuntu
2014-10-20 16:23:24.556 | + [[ -z rpm ]]
2014-10-20 16:23:24.556 | + '[' rpm = deb ']'
2014-10-20 16:23:24.556 | + is_fedora
2014-10-20 16:23:24.556 | + [[ -z Fedora ]]
2014-10-20 16:23:24.556 | + '[' Fedora = Fedora ']'
2014-10-20 16:23:24.556 | + sudo yum remove -y python-pip
2014-10-20 16:23:24.763 | No Match for argument: python-pip
2014-10-20 16:23:24.819 | No Packages marked for removal
2014-10-20 16:23:24.833 | + install_get_pip
2014-10-20 16:23:24.833 | + [[ ! -r /home/dtantsur/devstack/files/get-pip.py ]]
2014-10-20 16:23:24.833 | + sudo -E python /home/dtantsur/devstack/files/get-pip.py
2014-10-20 16:23:26.084 | Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages
2014-10-20 16:23:26.085 | Cleaning up...
2014-10-20 16:23:26.105 | + [[ -n '' ]]
2014-10-20 16:23:26.106 | + pip_install -U setuptools
2014-10-20 16:23:26.109 | which: no pip in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/dtantsur/.local/bin:/home/dtantsur/bin:/home/dtantsur/.local/bin:/home/dtantsur/bin:/usr/local/sbin:/usr/sbin:/sbin)
2014-10-20 16:23:26.110 | which: no pip-python in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/dtantsur/.local/bin:/home/dtantsur/bin:/home/dtantsur/.local/bin:/home/dtantsur/bin:/usr/local/sbin:/usr/sbin:/sbin)
2014-10-20 16:23:26.113 | [ERROR] /home/dtantsur/devstack/functions-common:1508 Unable to find pip; cannot continue
2014-10-20 16:23:27.115 | + sudo PIP_DOWNLOAD_CACHE=/var/cache/pip http_proxy= https_proxy= no_proxy= '[Call' 'Trace]' /home/dtantsur/devstack/tools/install_pip.sh:86:pip_install /home/dtantsur/devstack/functions-common:1545:get_pip_command /home/dtantsur/devstack/functions-common:1508:die install -U setuptools
2014-10-20 16:23:27.123 | sudo: [Call: command not found
2014-10-20 16:23:27.124 | ++ err_trap
2014-10-20 16:23:27.124 | ++ local r=1
2014-10-20 16:23:27.124 | stack.sh failed: full log in /home/dtantsur/logs/stack.sh.log.2014-10-20-182324
2014-10-20 16:23:27.125 | Error on exit

This is Fedora 20

Dmitry Tantsur (divius)
summary: - DevStack tries to use pip right after uninstalling it
+ DevStack tries to use pip right after uninstalling it (or without
+ installing, if not present)
Revision history for this message
Ian Wienand (iwienand) wrote :

So it tires to run get-pip.py, which says that it is already installed, but then when it tries to run "pip" it is not there

---
2014-10-20 16:23:24.833 | + install_get_pip
2014-10-20 16:23:24.833 | + [[ ! -r /home/dtantsur/devstack/files/get-pip.py ]]
2014-10-20 16:23:24.833 | + sudo -E python /home/dtantsur/devstack/files/get-pip.py
2014-10-20 16:23:26.084 | Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages
2014-10-20 16:23:26.085 | Cleaning up...
2014-10-20 16:23:26.105 | + [[ -n '' ]]
2014-10-20 16:23:26.106 | + pip_install -U setuptools
2014-10-20 16:23:26.109 | which: no pip
---

can you try get-pip.py with -U? That should force reinstall it

Revision history for this message
Arun S A G (sagarun) wrote :

#1 Does not work.

Revision history for this message
Arun S A G (sagarun) wrote :

Removing the /usr/lib/python2.7/site-packages/pip directory made it work!

Revision history for this message
Mauro S M Rodrigues (maurorodrigues) wrote :

it seems it was a problem on your environment and you already fixed it, right? Feel free to reopen if it's not

Changed in devstack:
status: New → Invalid
Revision history for this message
Abbas Ali Zaidi (abbasalizaidi1990) wrote :

I am installing devstack on CentOS 7 and facing the same issue as above. The script is uninstalling pip and right after that trying to use it.

Please refer to the trace below:

+ sudo yum remove -y python-pip
Loaded plugins: fastestmirror, langpacks
No Match for argument: python-pip
No Packages marked for removal
+ install_get_pip
+ [[ -r /opt/stack/devstack/files/get-pip.py ]]
+ head -1 /opt/stack/devstack/files/get-pip.py
+ grep -q '#!/usr/bin/env python'
+ [[ ! -r /opt/stack/devstack/files/get-pip.py ]]
+ [[ -r /opt/stack/devstack/files/get-pip.py.downloaded ]]
+ local timecond=
+ [[ -r /opt/stack/devstack/files/get-pip.py ]]
+ timecond='-z /opt/stack/devstack/files/get-pip.py'
+ curl -f --retry 6 --retry-delay 5 -z /opt/stack/devstack/files/get-pip.py -o /opt/stack/devstack/files/get-pip.py https://bootstrap.pypa.io/get-pip.py
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0
+ touch /opt/stack/devstack/files/get-pip.py.downloaded
+ sudo -H -E python /opt/stack/devstack/files/get-pip.py
/tmp/tmpXE7xck/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages
+ [[ -n '' ]]
+ pip_install -U setuptools
+ local xtrace
++ set +o
++ grep xtrace
+ xtrace='set -o xtrace'
+ set +o xtrace
which: no pip in (/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/stack/.local/bin:/opt/stack/bin:/usr/local/sbin:/usr/sbin:/sbin)
which: no pip-python in (/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/stack/.local/bin:/opt/stack/bin:/usr/local/sbin:/usr/sbin:/sbin)
[ERROR] /opt/stack/devstack/inc/python:34 Unable to find pip; cannot continue
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named pip
[Call Trace]
/opt/stack/devstack/tools/install_pip.sh:121:pip_install
/opt/stack/devstack/inc/python:115:die
[ERROR] /opt/stack/devstack/inc/python:115 Currently installed pip version does not meet minimum requirements (>=6).
++ err_trap
++ local r=1
++ set +o xtrace
stack.sh failed
Error on exit

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/246618

Changed in devstack:
assignee: nobody → Steve Baker (steve-stevebaker)
status: Invalid → In Progress
Revision history for this message
Steve Baker (steve-stevebaker) wrote :

sorry, wrong bug

Changed in devstack:
status: In Progress → Invalid
assignee: Steve Baker (steve-stevebaker) → nobody
Revision history for this message
Silvia (fichera-sil) wrote :
Download full text (3.3 KiB)

I have the same problem

2015-11-24 14:37:41.619 | pip: 1.5.4
2015-11-24 14:37:41.620 | + uninstall_package python-pip
2015-11-24 14:37:41.620 | + is_ubuntu
2015-11-24 14:37:41.620 | + [[ -z deb ]]
2015-11-24 14:37:41.620 | + '[' deb = deb ']'
2015-11-24 14:37:41.621 | + apt_get purge python-pip
2015-11-24 14:37:41.628 | + sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-co$
2015-11-24 14:37:41.654 | Reading package lists...
2015-11-24 14:37:42.179 | Building dependency tree...
2015-11-24 14:37:42.181 | Reading state information...
2015-11-24 14:37:42.745 | The following packages were automatically installed and are no longer required:
2015-11-24 14:37:42.746 | python-chardet-whl python-colorama python-colorama-whl python-distlib
2015-11-24 14:37:42.746 | python-distlib-whl python-html5lib python-html5lib-whl python-pip-whl
2015-11-24 14:37:42.746 | python-requests-whl python-setuptools-whl python-six-whl python-urllib3-whl
2015-11-24 14:37:42.746 | python-wheel python3-pkg-resources
2015-11-24 14:37:42.746 | Use 'apt-get autoremove' to remove them.
2015-11-24 14:37:42.890 | The following packages will be REMOVED:
2015-11-24 14:37:42.891 | python-pip*
2015-11-24 14:37:43.191 | 0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
2015-11-24 14:37:43.191 | After this operation, 477 kB disk space will be freed.
2015-11-24 14:37:43.274 | (Reading database ... 75233 files and directories currently installed.)
2015-11-24 14:37:43.284 | Removing python-pip (1.5.4-1ubuntu3) ...
2015-11-24 14:37:43.420 | Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
2015-11-24 14:37:44.104 | + install_get_pip
2015-11-24 14:37:44.104 | + [[ ! -r /home/silvia/devstack/files/get-pip.py ]]
2015-11-24 14:37:44.104 | + [[ -r /home/silvia/devstack/files/get-pip.py.downloaded ]]
2015-11-24 14:37:44.105 | + curl --retry 6 --retry-delay 5 -z /home/silvia/devstack/files/get-pip.py -o /home/silvia/devstack/files/get-pip.py$
2015-11-24 14:37:44.121 | % Total % Received % Xferd Average Speed Time Time Time Current
2015-11-24 14:37:44.122 | Dload Upload Total Spent Left Speed
2015-11-24 14:37:44.344 | ^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M 0 0 0 0 0 0 $
2015-11-24 14:37:44.348 | + touch /home/silvia/devstack/files/get-pip.py.downloaded
2015-11-24 14:37:44.352 | + sudo -H -E python /home/silvia/devstack/files/get-pip.py
2015-11-24 14:37:47.082 | Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
2015-11-24 14:37:47.688 | + [[ -n '' ]]
2015-11-24 14:37:47.688 | + pip_install -U setuptools
2015-11-24 14:37:47.708 | [ERROR] /home/silvia/devstack/inc/python:34 Unable to find pip; cannot continue
2015-11-24 14:37:49.319 | + sudo -H http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS= '[Call' 'Trace]' /home/silvia/devstack/tools/install_pi$
2015-11-24 14:37:49.327 | sudo: [Call: command not found
2015-11-24 14:37:49.329 | ++ err_trap
2015-11-24 14:37:49.329 | ++ local r=1
2015-11-24 14:37:49.329 | stack.sh failed: full log in stack.sh.log.2015-11-24-15370...

Read more...

Revision history for this message
chris meyers (chris-meyers-fsu) wrote :
Download full text (174.9 KiB)

I seem to be having the same issue. Ubuntu-14.04

+ unset GREP_OPTIONS
+ umask 022
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
+++ dirname /var/tmp/devstack/stack.sh
++ cd /var/tmp/devstack
++ pwd
+ TOP_DIR=/var/tmp/devstack
+ NOUNSET=
+ [[ -n '' ]]
+ [[ -r /var/tmp/devstack/.stackenv ]]
+ FILES=/var/tmp/devstack/files
+ '[' '!' -d /var/tmp/devstack/files ']'
+ '[' '!' -d /var/tmp/devstack/inc ']'
+ '[' '!' -d /var/tmp/devstack/lib ']'
+ [[ '' == \y ]]
+ [[ 1014 -eq 0 ]]
+ LAST_SPINNER_PID=
+ source /var/tmp/devstack/functions
++ [[ -z '' ]]
++ declare -r _DEVSTACK_FUNCTIONS=1
++++ dirname /var/tmp/devstack/functions
+++ cd /var/tmp/devstack
+++ pwd
++ FUNC_DIR=/var/tmp/devstack
++ source /var/tmp/devstack/functions-common
++++ grep xtrace
++++ set +o
+++ XTRACE='set -o xtrace'
+++ set +o xtrace
++ source /var/tmp/devstack/inc/ini-config
++++ grep xtrace
++++ set +o
+++ INC_CONF_TRACE='set -o xtrace'
+++ set +o xtrace
++ source /var/tmp/devstack/inc/python
++++ grep xtrace
++++ set +o
+++ INC_PY_TRACE='set -o xtrace'
+++ set +o xtrace
++ source /var/tmp/devstack/inc/rootwrap
++++ grep xtrace
++++ set +o
+++ INC_ROOT_TRACE='set -o xtrace'
+++ set +o xtrace
+++ grep xtrace
+++ set +o
++ XTRACE='set -o xtrace'
++ set +o xtrace
+ source /var/tmp/devstack/inc/meta-config
+++ grep xtrace
+++ set +o
++ INC_META_XTRACE='set -o xtrace'
++ set +o xtrace
+ source /var/tmp/devstack/lib/stack
+ GetDistro
+ GetOSVersion
++ which sw_vers
+ [[ -x '' ]]
++ which lsb_release
+ [[ -x /usr/bin/lsb_release ]]
++ lsb_release -i -s
+ os_VENDOR=Ubuntu
++ lsb_release -r -s
+ os_RELEASE=14.04
+ os_UPDATE=
+ os_PACKAGE=rpm
+ [[ Debian,Ubuntu,LinuxMint =~ Ubuntu ]]
+ os_PACKAGE=deb
++ lsb_release -c -s
+ os_CODENAME=trusty
+ export os_VENDOR os_RELEASE os_UPDATE os_PACKAGE os_CODENAME
+ [[ Ubuntu =~ (Ubuntu) ]]
+ DISTRO=trusty
+ export DISTRO
+ rm -f /var/tmp/devstack/.localrc.auto
+ [[ -r /var/tmp/devstack/local.conf ]]
++ get_meta_section_files /var/tmp/devstack/local.conf local
++ local file=/var/tmp/devstack/local.conf
++ local matchgroup=local
++ [[ -r /var/tmp/devstack/local.conf ]]
++ awk -v matchgroup=local '
        /^\[\[.+\|.*\]\]/ {
            gsub("[][]", "", $1);
            split($1, a, "|");
            if (a[1] == matchgroup)
                print a[2]
        }
    ' /var/tmp/devstack/local.conf
+ LRC=localrc
+ for lfile in '$LRC'
+ [[ localrc == \l\o\c\a\l\r\c ]]
+ [[ -r /var/tmp/devstack/localrc ]]
+ echo '# Generated file, do not edit'
+ get_meta_section /var/tmp/devstack/local.conf local localrc
+ local file=/var/tmp/devstack/local.conf
+ local matchgroup=local
+ local configfile=localrc
+ [[ -r /var/tmp/devstack/local.conf ]]
+ [[ -z localrc ]]
+ awk -v matchgroup=local -v configfile=localrc '
        BEGIN { group = "" }
        /^\[\[.+\|.*\]\]/ {
            if (group == "") {
                gsub("[][]", "", $1);
                split($1, a, "|");
                if (a[1] == matchgroup && a[2] == configfile) {
                    group=a[1]
                }
            } else {
                group=""
            }
            next
        }
        {
            if (group != "")
                print $0
        }
 ...

Revision history for this message
f h (hefter) wrote :

I have the same issue with Centos 7

Please REOPEN this bug!

f h (hefter)
Changed in devstack:
status: Invalid → Confirmed
Revision history for this message
Sean M. Collins (scollins) wrote :

Setting this as incomplete since the symptom is the same across multiple reporters, but the root cause could be different

Changed in devstack:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for devstack because there has been no activity for 60 days.]

Changed in devstack:
status: Incomplete → Expired
Revision history for this message
Narender (narender-soorineeda) wrote :

I am facing the same issue trying to install devstack in ubuntu..

Changed in devstack:
status: Expired → New
Revision history for this message
Kuo (kuopang90) wrote :

I'm very happy that I resolved this issue.

Beacuse Devstack always install the relations with the certain version from config file.
For example, pip version come from /home/stack/devstack/tools/cap-pip.txt
if pip<8, the devstack will uninstall pip 8.1.2 and install pip 7.1.2. However, your program need pip 8.1.2, this bug come.

if you change pip<8 to pip<9, this issue will be resolved. But there will be more problems about version.

Actually, the main point is that, you write the wrong format in local.conf. Maybe your devstack version is kilo or liberty, but you fill your local.conf from openstack website, the config form website is for the latest version of devstack, that is different from other versions.

for example. the config about ceilometer
website:
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer

liberty:
enable_service ceilometer-acompute ceilometer-acentral ceilometer-collector ceilometer-api
enable_service ceilometer-alarm-notify ceilometer-alarm-eval
enable_service ceilometer-anotification

In a word, you should fill right config in local.conf for your devstack version, all the version problems will go away.

Revision history for this message
Sean Dague (sdague) wrote :

This devstack bug was last updated over 180 days ago, as devstack
is a fast moving project and we'd like to get the tracker down to
currently actionable bugs, this is getting marked as Invalid. If the
issue still exists, please feel free to reopen it.

Changed in devstack:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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