Commit Graph

57 Commits

Author SHA1 Message Date
Martin Kopec 818d1a225d [doc] Update Ubuntu to 22.04
This updates documentation to reflect the switch to
Ubuntu 22.04 (jammy) in the CI:
https://review.opendev.org/c/openstack/devstack/+/860795

Change-Id: I8bee430029dcc719629bd92451c2791571f8a30c
2022-11-28 11:19:45 +01:00
Dr. Jens Harbott e6e7100e85 Don't install pinned setuptools with distro pip
We are seeing failures when using an updated setuptools version
installed together with distro pip on Ubuntu 22.04. Install the version
from u-c only when we are also installing pip from upstream.

Change-Id: Ibb6e9424e5794ccbf9a937d2eecfa3bf60ed312e
2022-06-07 13:42:54 +02:00
Rodolfo Alonso Hernandez a756f4b968 Add python3.6 pip support
Since pip v22, python3.6 is not supported (the minimum version is
python3.7). This patch adds the reference for the pip3.6 URL to be
used instead of the default one.

Closes-Bug: #1959600
Change-Id: Iab2c391d5388461fe9e9037cee81884ce8032e72
2022-02-01 11:27:05 +00:00
Dr. Jens Harbott d6909e41af
Use distro pip on Ubuntu
Running get-pip.py fails on Ubuntu when running twice, e.g. after a
unstack/stack cycle. Just use distro pip instead.

Closes-Bug: #1957048
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I87a8d53ed8860dd017a6c826dee6b6f4baef3c96
2022-01-22 17:02:29 +01:00
Alfredo Moralejo 5ea4c3c18c Support CentOS Stream 9
This patch includes changes required to run devstack on CentOS Stream 9
which has been already published in official repos by CentOS team [1]:

- Add RDO deps repository for CS9.
- remove xinetd package from installation for swift. Note that
  rsync-daemon is installed which should work fine.
- Replace genisoimage by xorriso in CS9.
- Use /etc/os-release to identify the distro in CS9 as it doesn't
  provide lsb_release command.
- Use pip from rpm package instead of from get-pip.py as done in Fedora.
- Add non-voting job devstack-platform-centos-9-stream to the check
  pipeline.

Change-Id: Ic67cddabd5069211dc0611994b8b8360bcd61bef
2021-12-02 09:10:48 +01:00
Michal Berger bfc79dc98b tools: Fix use of continue
continue is not used in a proper context here (outside of loop). Use
null cmd instead to simply fall through the pip installation.

Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Change-Id: Iaea2e5c0177b475edf19d08d71933a74debbb5d9
2021-10-05 15:44:45 +02:00
Ian Wienand 8dac135cb8 Simplify pip install
The uninstall here has been around since
Ibb4b42119dc2e51577c77bbbbffb110863e5324d.  At the time, there might
have been conflicts between packaged and installed pip.  We don't need
it today; get-pip.py keeps itself separate enough in /usr/local on all
platforms.  Thus we can also remove the suse/centos special-casing.

python3-pip is in the RPM list so we don't need to
re-install for Fedora.

Add a note on why we are over-installing pip.

Remove some old setuptools workarounds that are commented out.

Change-Id: Ie3cb81a8ff71cf4b81e23831c380f83b0381de71
2021-08-11 15:00:18 +10:00
Ian Wienand a20971850a install_pip: Use packaged pip on Fedora
This uses the python3-pip package for Fedora but maintains the status
quo for existing distributions (i.e. for Suse we run get-pip.py but
don't uninstall, and for everything else we uninstall python3-pip and
run get-pip.py to be running the latest pip).

As noted inline, installing get-pip.py over Fedora 34's package no
longer works, and likely won't ever work again.  Unlike the LTS
distributions, the Fedora pip should be more up-to-date, so I think
it's best we just avoid any package overwrites.

Change-Id: I84129aadfcf585bb150a3daa39616246d3d84bbd
2021-08-11 14:07:17 +10:00
Ian Wienand 2df2aa0158 install_pip: don't fail when not installed
On some platforms, "python -m pip" isn't available.  Currently this is
run undconditionally from the "get_versions" function; remove the call.

Change-Id: I91d6c66d055f02fa7b4368593b629933f82d8117
2021-08-10 14:36:30 +10:00
Ian Wienand 6b9a564622 Revert "Workaround for new pip 20.3 behavior"
This reverts commit 7a3a7ce876 and
bcd0acf6c0 and part of
f1ed7c77c5 which all cap our pip
installs.

Given the pip ecosystem can often incorporate major changes, tracking
upstream at least generally gives us one problem at a time to solve
rather than trying to handle version jumps when LTS distros update.

The new dependency resolver included some changes that disallow
setting URL's like "file:///path/to/project#egg=project" in
constraints.  Apparently the fact it used to work was an accident of
the requires/constraints mechanism; it does make some sense as the URL
doesn't really have a version-number that the resolver can put in an
ordering graph.

The _setup_package_with_constraints_edit function comment highlights
what this is trying to do

 # Updates the constraints from REQUIREMENTS_DIR to reflect the
 # future installed state of this package. This ensures when we
 # install this package we get the from source version.

In other words; if constraints has "foo==1.2.3" and Zuul has checked
out "foo" for testing, we have to make sure pip doesn't choose version
1.2.3 from pypi.

It seems like removing the entry from upper-requirements.txt is the
important part; adding the URL path to the on-disk version was just
something that seemed to work at the time, but isn't really necessary.
We will install the package in question which will be the latest
version (from Zuul checkout) and without the package in
upper-requirements.txt nothing will try and downgrade it.

Therefore the solution proposed here is to remove the adding of the
URL parts.

This allows us to uncap pip and restore testing with the new
dependency resolver.

Closes-Bug: #1906322
Change-Id: Ib9ba52147199a9d6d0293182d5db50c4a567d677
2021-08-10 14:22:35 +10:00
Elod Illes 7a3a7ce876 Workaround for new pip 20.3 behavior
This patch caps pip version during bootstrap to avoid the issue:

"ERROR: Links are not allowed as constraints"

A proper fix would be to adapt to new pip behavior.

Depends-On: https://review.opendev.org/764811
Change-Id: I1feed4573820436f91f8f654cc189fa3a21956fd
2020-11-30 17:01:20 -06:00
Jens Harbott d7a82f41e4 Drop support for python2
python2 is EOL, let's move on and only support python3.

Change-Id: Ieffda4edea9cc19484c04420ed703f7141ef9f15
2020-06-26 15:27:32 +02:00
Jens Harbott f1ed7c77c5 Use python3 pip module instead of pip binary
Focal only provides a pip3 binary, no pip3.8. Instead of working around
that with a symlink, use the module instead.

Add version information output for this variant.

Change-Id: I7af194ecc40e4d43c10ce067a661bb6ab4ca37d4
2020-06-23 08:02:52 +02:00
Colleen Murphy 782efb0f8a Fix pip distro package removal for focal
Ubuntu Focal doesn't have python-pip, only python3-pip. Trying to
uninstall a package that apt doesn't know about (installed or
uninstalled) results in a nonzero exit code so devstack fails. This
patch makes the package removal safer for both python2 and python3 cases
by checking first if the package exists.

Change-Id: I3b1118888cb0617ffb99b72c7e9a32308033783e
2020-05-11 18:28:32 -07:00
Jens Harbott (frickler) 279a7589b0 Revert "Do not use pip 10 or higher"
This reverts commit f99d1771ba.

Added workarounds that might want to get split into their own patch
before merging:

- Don't install python-psutil
- Don't run peakmem_tracker

Change-Id: If4fb16555e15082a4d97cffdf3cfa608a682997d
2019-11-20 21:02:39 +00:00
Matt Riedemann 9b6d2f20b4 Update (git|review).openstack.org links to opendev
This updates links going to git.openstack.org and review.openstack.org
to go to their respective opendev locations to avoid redirects.

Change-Id: I78e3bb5303718962f591117f9c0ee11f2314b128
Closes-Bug: #1833256
2019-06-21 14:35:16 +10:00
Dirk Mueller 4404f680f2 Add an openSUSE Tumbleweed devstack non-voting check job
This adds the necessary fixes to pass a devstack run
on openSUSE Tumbleweed. Also removes opensuse 42.2 as it
is EOL for some time already and no longer actively tested
in the OpenStack infra.

Depends-On: I1b68c08c07cf6653ea58506f738cbe0054b38f3a
Change-Id: I2894482deef063fd02b0818c695a2ddbf6767039
2018-03-11 14:04:36 +01:00
Ian Wienand 1e7f738f28 Ensure we install setuptools from requirements
Use pip_install_gr so we get the version pinned by requirements.  The
depends-on is an example of where we're trying to pin to workaround
issues.

Depends-On: I9c57c08a150571c5bb62235d502839394d53a4c1
Change-Id: I780cca681b12a3e9d228dbf2fd9fa6e8ab1a82e1
2017-02-27 11:35:43 +11:00
Andreas Scheuring 0063495b00 Make PIP_GET_PIP_URL configurable via local.conf
The default get_pip url regulary times out when starting devstack
from behind company firewalls. Making this a configureable variable,
user can make use of internal git-pip.py mirrors without modifying
any code.

Change-Id: I66a5534d51ab23a4d8586c27d37b4b6b8a6892c9
2016-09-06 14:48:32 +10:00
Attila Fazekas 72b233c1e0 Allow to use Fedora 24 with devstack
Looks like f24 does not have any special change compared to the
previous release, we just need to add f24 where f23 present.

Change-Id: Ia4a58de4973ef228735c48b33453a0562dc65258
2016-06-01 16:52:41 +02:00
Jenkins 22498c19f6 Merge "install_pip.sh: Remove stale comments" 2016-03-30 23:40:06 +00:00
Sean Dague 646085d701 Add colorful PS4
PS4 can include functions, so when running in the LOG_COLORS=True mode
provide a grey function line so that it's easier to visually
distinguish the content from the location.

Also make it so the main prompt chunks off all the common path, which
means we can printf to 40 characters and have a pretty reasonable and
readable PS4.

Change-Id: I4a10a49db97d413349bcfceeb8c4164936fbcc40
2016-03-23 07:37:44 -04:00
YAMAMOTO Takashi 7c98cfb56e install_pip.sh: Remove stale comments
Change-Id: Id91c8e579977bedae1410095d9b4cef9d9ae2178
2016-03-18 21:24:46 +09:00
Jenkins 8c71ffa997 Merge "Never uninstall python-pip on fedora" 2016-01-29 05:19:10 +00:00
Matthew Treinish 1d27155f65 Cap installed pip to be < 8
Pip 8 just release which made uninstalling distutils installed packages
fatal. This was previously a deprecation warning and is now causing all
dsvm jobs to fail.

Depends-On: I511d216d9d8619c7cf919c482aaead4e833cdaac
Change-Id: I22f5c3af1adf96cfbd5747122f915a82e947843a
2016-01-19 21:27:02 -05:00
Doug Hellmann ddc3839bdc Enable optional Python 3 support
Add USE_PYTHON3 and PYTHON3_VERSION variables to allow services to use
python 3 if they indicate support in their python package metadata.

Tested in Heat here -> I837c2fba682ab430d50e9f43913f2fed20325a7a.
Project config change to add a dedicated job to Heat is here -> I0837e62d6ccc66397a5e409f0961edd4be31f467

Change-Id: I079e18b58b214bf8362945c253d6d894ca8b1a6b
2015-12-01 14:52:35 -05:00
Steve Baker bd4048a3c5 Never uninstall python-pip on fedora
Python in f23 and f22 depends on the python-pip package so removing it
results in a nonfunctional system. pip on fedora installs to /usr so pip
can safely override the system pip for all versions of Fedora.

Change-Id: I336c7ffdf00784ca8deba7d6612a08b96a0ad098
Closes-Bug: #1467569
2015-11-18 11:04:27 +13:00
Attila Fazekas 9127c1a56b Do not remove python-pip package on Fedora-23
python on fedora 23 compiled with rewheel support,
in this case the python-pip is a required package, and cannot be
removed.

[1] http://pkgs.fedoraproject.org/cgit/python.git/tree/python.spec?id=3b6fac0339bab69ca5fbf2881568f0565ab0e252#n174

Change-Id: I499b7bec97c4360b32d156079f2b7f3923e3888a
2015-11-05 10:16:52 +01:00
Sean Dague fa41b5b47e make curl fail on pypi errors
This will make curl fail on pypi errors, and should prevent corrupt
images from pypi going offline for a few hours randomly, which it does
from time to time.

Closes-Bug: #1503909

Change-Id: Ib4a740b7d1772e1e36aa701e42d3ac0f0ee12883
2015-10-08 06:06:34 -04:00
Sean Dague 0280f6f6c8 remove corrupt get-pip.py
If get-pip servers fall over and return 503 for a few hours (which
they do medium regularly) we'll cache crud html, and everything will
suck. We know this script should be python, so if it isn't, delete it.

Change-Id: Ia9f6f7c7217939bc1ab5745f4a9d568acfbf04c8
2015-10-08 05:56:14 -04:00
Sean Dague a0cc2918ad fix warning in install_get_pip
we were unconditionally adding -z to the curl command even if the file
doesn't exist that we are referencing. That produces a scary warning
for users. Lets not do that.

Change-Id: Id2860c1c702510b0f8fd496abce579d0fa3ff867
2015-10-07 15:15:16 -04:00
Clark Boylan 05aa3846a0 Just use constraints everywhere
Having behavior on your laptop diverge from behavior in the gate is
confusing. Just use constraints on every devstack run to be consistent.
Users of devstack can edit the requirements repo in order to change
these constraints locally if necessary.

Change-Id: I843208e2e982eb04931b76f5cb4bd219fbcd70de
2015-08-18 09:39:04 -07:00
Dean Troyer dc97cb71e8 Mostly docs cleanups
Fix documentation build errors and RST formatting

Change-Id: Id93153400c5b069dd9d772381558c7085f64c207
2015-03-28 14:35:12 -05:00
Ian Wienand 7c4ce9edba Check for new versions of get-pip.py
People can leave their devstack installs around for a long time, and
in the mean time new versions of pip can be released.

The current check does not download a new version if an old one
exists.  We want to check for new versions, but we also don't want the
gate jobs trying this sometimes unreliable fetch.

So add a flag-file that tells devstack if it downloaded get-pip.py
originally.  If so, on each run check for a new version using curl's
"-z" flag to request only files modified since the file's timestamp.

Change-Id: I91734528f02deafabf3d18d968c3abd749751199
Closes-Bug: #1429943
2015-03-11 09:40:13 +11:00
Davanum Srinivas f5b4154251 Switch on curl retry options for fetching get-pip.py
Let's retry a few times before giving up.

Related-Bug: #1413034

Change-Id: I7c5c1a3936b5c08c5de43edc569b5a53d11b55a7
2015-01-22 07:57:42 -05:00
Adam Gandelman 130efefe6c Call sudo /w -H in install_pip.sh as well
We updated other usage of sudo to pass -H when installing pip things,
to avoid creating a .cache directory in $STACK_USER's $HOME that is
owned by root. get-pip.py also ends up creating a ~/.cache, so we
need to update sudo usage there as well.

Closes-bug: #1405626
Related-bug: #1405732

Change-Id: If791b9b25d6a4280dab19117004184e57e78d038
2014-12-27 14:09:07 -08:00
Jeremy Stanley 35b5283a8f Comment option to enable Setuptools warnings
Change-Id: I9fc247ab343c2cea0a8a5b7a3823b5525d6c311f
2014-12-18 17:41:43 +00:00
Jeremy Stanley b7ebc4765a Revert "Pin version of setuptools"
This reverts commit 3b782d304e.

The blockers for setuptools 8 compatibility should all be resolved
now.

Change-Id: I6d2d63746f98f0f885816395f36022a2706fb9c5
2014-12-18 17:09:25 +00:00
Ruslan Kamaldinov 3b782d304e Pin version of setuptools
Latest release of setuptool 8.0 made several versions used in
requirements.txt of OpenStack projects invalid. Instances:
* SQLAlchemy>=0.8.4,<=0.8.99,>=0.9.7,<=0.9.99 in oslo.db 1.2.0
* python-neutronclient 2.3.9.40.g9ed73c0 in openstackclient

Cap '<8.0' is set as a temporary fix until a better solution
comes up.

Change-Id: I4cfe2e4c86474ec9bf69a3c2007c0277288ea2b6
2014-12-13 23:19:34 +03:00
Franck Yelles 683ff42d3c Support of an alternate pypi server
Currently pip will get the package from the https://pypi.python.org server.
For CI, it's a problem as Internet connection can be down,
the pypi server down, etc...

The usecase is for a company/user that maintain a local pypi mirror
and give the option to use this server instead of the official one

Change-Id: I83aac4646cb78827a92c9636d78238f8a6118642
Implements: blueprint support-local-pypi-server
2014-06-23 15:19:46 -07:00
Jenkins c3fd0b5298 Merge "make get-pip.py download failures more clear" 2014-06-10 15:16:04 +00:00
Mathieu Gagné 76ed427ca1 Update setuptools to latest for .dist-info support
Support for .dist-info directories was added in setuptools 0.6.28.

At this moment, Ubuntu Precise 12.04 provides setuptools 0.6.24
which is too old for our needs.

Six is installed from wheel which uses the .dist-info directory.
For six to be found, we need to install setuptools >= 0.6.28.

Updating setuptools to the latest version using pip will provide use
the needed version to make six discoverable.

Closes-bug: #1326811
Change-Id: I761d0aeb2b8b593cee38d512afc8fed6a2d1fe37
2014-06-05 18:11:16 -04:00
Sean Dague f625ffe24f make get-pip.py download failures more clear
curl dying ends up being a really unclear failure condition, and
hard to fingerprint in the gate. We should make this much more
explicit when we die.

Also, don't trust the upstream filename, because all the rest of
our logic would break if it changes anyway.

Change-Id: Ibc2a96b33471d24c597af0d7af896fb10523156f
2014-06-05 14:01:56 +00:00
Sean Dague 7b63c5ec9e be opinionated: only use get-pip.py
get-pip.py is now on a CDN, and is the prefered way to get pip.

Remove the default path of using pip tarballs from pypi and use
get-pip.py on from here on.

Closes-Bug: #1326539

Change-Id: I0661f7c6913ba6b3e1d00b30e22740d150bfd060
2014-06-04 22:53:25 +00:00
Sean Dague 33ff33b1fb cache the pip tarball
there is no need to download the pip tarball over and over again
on rerun. Use the cached value.

Change-Id: Ibcc1807ba2aca062f69839212f05ac9394db9448
2014-03-28 15:14:56 -04:00
Ian Wienand aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
KIYOHIRO ADACHI a515a70e2b Fixed check method of $USE_GET_PIP
'[[ -n "$USE_GET_PIP" ]]' always TRUE
because $USE_GET_PIP is '0' or '1'.

Change-Id: I73c4c6befe2126882ef21991b2a3fe712b2ac388
Closes-Bug: #1259824
2013-12-11 16:14:00 +09:00
sbauza a49422e33e Fix install_get_pip in order to work behind a proxy
Proxy envvars are not passed to pip when sudo, we need to export
them.

Change-Id: I67622f5ea8ecb948006e032bdc395ecf36914146
Closes-Bug: #1258155
2013-12-05 14:56:14 +01:00
Monty Taylor 480309eea5 Allow overriding USE_GET_PIP via env vars
devstack-gate wants to pre-cache and then use get-pip, but we can't
throw the flag currently. Make the flag default settable via env vars.

Change-Id: I661b52670b6ce494666cbdd611e4eee6b96c8321
Partial-Bug: #1254275
2013-11-25 10:20:04 -05:00
DennyZhang 3931573f2b mute useless console output, when run ./stack.sh
Run ./stack.sh will dump ~400 lines of information, because of
tar xvfz pip-*.tar.gz, and python setup.py install.

We'd better mute stdout for the two steps, to make console cleaner

Change-Id: Icf87947e020acb48d8cbe4cdcc1641f060e50f6d
2013-10-11 00:12:30 -05:00