Git Product home page Git Product logo

charm-test-infra's Introduction

charm-test-infra

A repo for example scripts, test runners and scripts for OpenStack Charm CI builds, jobs, and automation.

See also: OpenStack Charm Guide.

Resolving virtualenv build dependencies on a fresh Bionic host

ubuntu@beisner-bastion:~$ sudo apt install tox python3-dev libffi-dev libssl-dev build-essential bzr

Clients virtualenv via Tox

ubuntu@beisner-bastion:~/git/charm-test-infra$ tox
clients create: /home/ubuntu/git/charm-test-infra/.tox/clients
clients installdeps: -r/home/ubuntu/git/charm-test-infra/py3-clients-requirements.txt
clients installed: aodhclient==1.1.0,appdirs==1.4.3,argcomplete==1.9.4,asn1crypto==0.24.0,async-generator==1.9,Babel==2.6.0,bcrypt==3.1.4,certifi==2018.4.16,cffi==1.11.5,chardet==3.0.4,cliff==2.13.0,cmd2==0.9.3,colorama==0.3.9,cryptography==2.3,debtcollector==1.19.0,decorator==4.3.0,deprecation==2.0.5,distro-info==0.0.0,dnspython==1.15.0,dogpile.cache==0.6.6,futures==3.1.1,hvac==0.6.1,idna==2.7,iso8601==0.1.12,Jinja2==2.10,jmespath==0.9.3,jsonpatch==1.23,jsonpointer==2.0,jsonschema==2.6.0,juju==0.9.1,juju-deployer==0.11.0,juju-wait==2.6.4,jujubundlelib==0.5.6,jujuclient==0.54.0,keystoneauth1==3.9.0,macaroonbakery==1.1.3,MarkupSafe==1.0,mojo==0.4.5,monotonic==1.5,msgpack==0.5.6,munch==2.3.2,netaddr==0.7.19,netifaces==0.10.7,openstacksdk==0.16.0,os-client-config==1.31.2,os-service-types==1.2.0,osc-lib==1.11.0,oslo.config==6.3.0,oslo.context==2.21.0,oslo.i18n==3.20.0,oslo.log==3.39.0,oslo.serialization==2.27.0,oslo.utils==3.36.3,packaging==17.1,paramiko==2.4.1,pbr==4.1.0,pkg-resources==0.0.0,prettytable==0.7.2,protobuf==3.6.0,pyasn1==0.4.3,pycparser==2.18,pyinotify==0.9.6,pylxd==2.0.7,pymacaroons==0.13.0,PyNaCl==1.2.1,pyOpenSSL==18.0.0,pyparsing==2.2.0,pyperclip==1.6.2,pyRFC3339==1.1,python-ceilometerclient==2.9.0,python-cinderclient==3.6.1,python-codetree==0.1.6,python-dateutil==2.7.3,python-designateclient==2.9.0,python-glanceclient==2.11.1,python-heatclient==1.16.0,python-keystoneclient==3.17.0,python-neutronclient==6.9.0,python-novaclient==10.3.0,python-openstackclient==3.15.0,python-swiftclient==3.5.0,pytz==2018.5,PyYAML==3.13,requests==2.19.1,requests-unixsocket==0.1.5,requestsexceptions==1.4.0,rfc3986==1.1.0,simplejson==3.16.0,six==1.11.0,stevedore==1.28.0,tenacity==4.12.0,theblues==0.3.8,urllib3==1.23,warlock==1.3.0,wcwidth==0.1.7,websocket-client==0.48.0,websockets==6.0,wrapt==1.10.11,ws4py==0.5.1,zaza==0.0.2.dev1
clients runtests: PYTHONHASHSEED='0'
clients runtests: commands[0] | mojo --version
0.4.5
clients runtests: commands[1] | openstack --version
openstack 3.15.0
________________________________________________________________________________________ summary ________________________________________________________________________________________
  clients: commands succeeded
  congratulations :)
ubuntu@beisner-bastion:~/git/charm-test-infra$


ubuntu@beisner-bastion:~/git/charm-test-infra$ . clientsrc
(clients) ubuntu@beisner-bastion:~/git/charm-test-infra$ openstack --version
openstack 3.15.0
(clients) ubuntu@beisner-bastion:~/git/charm-test-infra$ mojo --version
0.4.5
(clients) ubuntu@beisner-bastion:~/git/charm-test-infra$ deactivate
ubuntu@beisner-bastion:~/git/charm-test-infra$

charm-test-infra's People

Contributors

ajkavanagh avatar andrewdmcleod avatar chrismacnaughton avatar fnordahl avatar lourot avatar n-pochet avatar ryan-beisner avatar sfeole avatar thedac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

charm-test-infra's Issues

During bootstrap a race condition can expose ContextualVersionConflict

There exists a bug in the requirements such that ContextualVersionConflict can occur while attempting to satisfy package dependencies for 'requests'. Normal use by experienced users or CI procedures will not show it, but If a user attempts to bootstrap the this project without having configured their ssh-agent then this will occur as a result of the delay in entering the ssh key password.

Perhaps the version of 'requests' needs to be bumped somewhere.

Full Error Output:
`clients create: /home/ubuntu/charm-test-infra/.tox/clients
clients installdeps: -r/home/ubuntu/charm-test-infra/py3-clients-requirements.txt
ERROR: invocation failed (exit code 1), logfile: /home/ubuntu/charm-test-infra/.tox/clients/log/clients-1.log
ERROR: actionid: clients
msg: getenv
cmdargs: ['/home/ubuntu/charm-test-infra/.tox/clients/bin/pip', 'install', '-r/home/ubuntu/charm-test-infra/py3-clients-requirements.txt']
env: {'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:.xspf=00;36:', 'SSH_CONNECTION': '10.172.67.136 41536 10.5.0.9 22', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LANG': 'C.UTF-8', 'OLDPWD': '/home/ubuntu', 'XDG_SESSION_ID': '29', 'USER': 'ubuntu', 'PWD': '/home/ubuntu/charm-test-infra', 'HOME': '/home/ubuntu', 'SSH_CLIENT': '10.172.67.136 41536 22', 'XDG_DATA_DIRS': '/usr/local/share:/usr/share:/var/lib/snapd/desktop', 'SSH_TTY': '/dev/pts/0', 'MAIL': '/var/mail/ubuntu', 'TERM': 'screen', 'SHELL': '/bin/bash', 'SHLVL': '1', 'LOGNAME': 'ubuntu', 'XDG_RUNTIME_DIR': '/run/user/1000', 'PATH': '/home/ubuntu/charm-test-infra/.tox/clients/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'PS1': '${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ', 'LESSOPEN': '| /usr/bin/lesspipe %s', '_': '/usr/bin/tox', 'VIRTUAL_ENV': '/home/ubuntu/charm-test-infra/.tox/clients', 'PYTHONHASHSEED': '0'}

Collecting zaza from git+https://github.com/openstack-charmers/zaza.git#egg=zaza (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 2))
Cloning https://github.com/openstack-charmers/zaza.git to /tmp/pip-install-dfxhpppw/zaza
Running command git clone -q https://github.com/openstack-charmers/zaza.git /tmp/pip-install-dfxhpppw/zaza
Collecting juju-crashdump from git+https://github.com/juju/juju-crashdump.git#egg=juju-crashdump (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 5))
Cloning https://github.com/juju/juju-crashdump.git to /tmp/pip-install-dfxhpppw/juju-crashdump
Running command git clone -q https://github.com/juju/juju-crashdump.git /tmp/pip-install-dfxhpppw/juju-crashdump
WARNING: Generating metadata for package juju-crashdump produced metadata for project name jujucrashdump. Fix your #egg=juju-crashdump fragments.
Collecting juju-deployer (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 8))
Using cached https://files.pythonhosted.org/packages/53/cd/df61d73e42a76b62203902dc2707e4b3f1d7d9ccae72b1babeb7e5765244/juju-deployer-0.11.0.tar.gz
Collecting websocket-client!=0.44.0 (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 9))
Using cached https://files.pythonhosted.org/packages/29/19/44753eab1fdb50770ac69605527e8859468f3c0fd7dc5a76dd9c4dbd7906/websocket_client-0.56.0-py2.py3-none-any.whl
Collecting argcomplete>=0.8.1 (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 10))
Using cached https://files.pythonhosted.org/packages/2e/22/374114e3e3692002f6aad1038faa3ca062668942da9c43f25c04100cdfb1/argcomplete-1.9.5-py2.py3-none-any.whl
Collecting jinja2>=2.8 (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 11))
Using cached https://files.pythonhosted.org/packages/1d/e7/fd8b501e7a6dfe492a433deb7b9d833d39ca74916fa8bc63dd1a4947a671/Jinja2-2.10.1-py2.py3-none-any.whl
Collecting setuptools==36.4.0 (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 12))
Using cached https://files.pythonhosted.org/packages/1b/95/e6f28144fdb6c06186c1f0e70cea02791e6ec787682bdfc437ce69b8186c/setuptools-36.4.0-py2.py3-none-any.whl
Collecting codetree from bzr+lp:codetree#egg=codetree (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 13))
Checking out lp:codetree to /tmp/pip-install-dfxhpppw/codetree
Running command bzr branch -q lp:codetree /tmp/pip-install-dfxhpppw/codetree
WARNING: Generating metadata for package codetree produced metadata for project name python-codetree. Fix your #egg=codetree fragments.
Collecting mojo from bzr+lp:~ost-maintainers/mojo/py3#egg=mojo (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 15))
Checking out lp:~ost-maintainers/mojo/py3 to /tmp/pip-install-dfxhpppw/mojo
Running command bzr branch -q 'lp:~ost-maintainers/mojo/py3' /tmp/pip-install-dfxhpppw/mojo
Collecting cmd2!=0.8.3 (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 16))
Using cached https://files.pythonhosted.org/packages/9d/7c/fc946c24dfe4b12ffdcd099216471c413bbcf48f94f86b91b4ea44ccbaa6/cmd2-0.9.12-py3-none-any.whl
Collecting distro-info (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 17))
Using cached https://files.pythonhosted.org/packages/91/e0/ccd731d32238bc18bb8ac80353b4028394f80d5ff7db0f93a5ba488690d3/distro-info-0.10.tar.gz
Collecting dnspython (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 18))
Using cached https://files.pythonhosted.org/packages/ec/d3/3aa0e7213ef72b8585747aa0e271a9523e713813b9a20177ebe1e939deb0/dnspython-1.16.0-py2.py3-none-any.whl
Collecting babel!=2.4.0,>=2.3.4 (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 19))
Using cached https://files.pythonhosted.org/packages/b8/ad/c6f60602d3ee3d92fbed87675b6fb6a6f9a38c223343ababdb44ba201f10/Babel-2.6.0-py2.py3-none-any.whl
Collecting paramiko (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 20))
Using cached https://files.pythonhosted.org/packages/cf/ae/94e70d49044ccc234bfdba20114fa947d7ba6eb68a2e452d89b920e62227/paramiko-2.4.2-py2.py3-none-any.whl
Collecting python-openstackclient>=3.14.0 (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 23))
Using cached https://files.pythonhosted.org/packages/94/0b/ce17ff61441fb091ffbfc7bb9c17cffe175c113aa3717c493cc4687901ff/python_openstackclient-3.18.0-py2.py3-none-any.whl
Collecting aodhclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 24))
Using cached https://files.pythonhosted.org/packages/9b/c6/40058f4bec9fa67f01c6628925dab58f88ee1eebd5a8b41d303715a0d738/aodhclient-1.2.0-py2.py3-none-any.whl
Collecting python-designateclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 25))
Using cached https://files.pythonhosted.org/packages/ef/f8/95423f61960532a1dfc23db69b2bd4e6d00896089695aec55962a54fb81d/python_designateclient-2.11.0-py2.py3-none-any.whl
Collecting python-barbicanclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 26))
Using cached https://files.pythonhosted.org/packages/96/9c/9410b618ba4783fa17e138ebbc584d6d95a1f3d42464bfdaa39ad98610d3/python_barbicanclient-4.8.1-py2.py3-none-any.whl
Collecting python-ceilometerclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 27))
Using cached https://files.pythonhosted.org/packages/62/99/7279d232f5feb96d278d02ba2ac74b04899849681c3463405210b1cd04d1/python_ceilometerclient-2.9.0-py2.py3-none-any.whl
Collecting python-cinderclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 28))
Using cached https://files.pythonhosted.org/packages/45/c8/4ecc0310dbed47d27c366e6915d9c41a91ce97b8fcdba548de94fc9df655/python_cinderclient-4.1.0-py2.py3-none-any.whl
Collecting python-glanceclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 29))
Using cached https://files.pythonhosted.org/packages/95/9f/d89598e6145cd381e24082214fc8a0699bce318f1c8d22001a120c5d92ef/python_glanceclient-2.16.0-py2.py3-none-any.whl
Collecting python-heatclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 30))
Using cached https://files.pythonhosted.org/packages/b7/e3/dcce9798a5212759f1e1e1b1119dfa032708580226e728eb0fe06cb63b8c/python_heatclient-1.17.0-py2.py3-none-any.whl
Collecting python-keystoneclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 31))
Using cached https://files.pythonhosted.org/packages/a1/89/8a05ef1d3b54cbb01268b767b8fc28d3b58c4c831606f5830e76bf50f388/python_keystoneclient-3.19.0-py2.py3-none-any.whl
Collecting python-neutronclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 32))
Using cached https://files.pythonhosted.org/packages/b0/f2/2844e46948e400fed14f83da8f2bc45543e172bcb8c8d4863da6aafefc04/python_neutronclient-6.12.0-py2.py3-none-any.whl
Collecting python-novaclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 33))
Using cached https://files.pythonhosted.org/packages/41/a6/5f820c02c5d148d4d185555522442d2d317b280898efd98af80ab5085bb1/python_novaclient-13.0.0-py2.py3-none-any.whl
Collecting python-swiftclient (from -r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 34))
Using cached https://files.pythonhosted.org/packages/ae/cd/d1512df8d7cd317bf09b8b0e6cefd578475315e83f9fc71e3c23f528ef5f/python_swiftclient-3.7.0-py2.py3-none-any.whl
Collecting async_generator (from zaza->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/71/52/39d20e03abd0ac9159c162ec24b93fbcaa111e8400308f2465432495ca2b/async_generator-1.10-py3-none-any.whl
Collecting cryptography (from zaza->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/5b/12/b0409a94dad366d98a8eee2a77678c7a73aafd8c0e4b835abea634ea3896/cryptography-2.6.1-cp34-abi3-manylinux1_x86_64.whl
Collecting hvac<0.7.0 (from zaza->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/cc/28/25c2daaa6f89ff3a20b8c88490e2e3dff1f141739cbabb17682d11a828f2/hvac-0.6.4-py2.py3-none-any.whl
Collecting juju (from zaza->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/cd/fd/14ffad016ae20288d9a9ec7ba282ce979c96d2423bd5294cb1e5be1e75c5/juju-0.11.5.tar.gz
Collecting juju-wait (from zaza->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/8b/eb/871cdba5247642b94274c30deeead3c2ee5c833ad51ad1a8a33480f2f287/juju_wait-2.7.0-py2.py3-none-any.whl
Collecting PyYAML (from zaza->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/9f/2c/9417b5c774792634834e730932745bc09a7d36754ca00acf1ccd1ac2594d/PyYAML-5.1.tar.gz
Collecting tenacity (from zaza->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/6a/93/dfcf5b1b46ab29196274b78dcba69fab5e54b6dc303a7eed90a79194d277/tenacity-5.0.4-py2.py3-none-any.whl
Collecting oslo.config (from zaza->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/ac/28/c367554ceb317156ac9e4ff390e91a9290af9d67cdc17c2ec1ed5e93089b/oslo.config-6.8.1-py2.py3-none-any.whl
Collecting python-octaviaclient (from zaza->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/86/8e/607ec852af5a254816cf03490bac0a3da710ec53b3c6b65e29de755014d7/python_octaviaclient-1.8.0-py2.py3-none-any.whl
Collecting jujuclient>=0.53 (from juju-deployer->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 8))
Using cached https://files.pythonhosted.org/packages/a1/60/d04bc8c3463fe73a9074ba2978cf1e53ba98b3c388fe3351c5ee1387ca1a/jujuclient-0.54.0.tar.gz
Collecting six (from juju-deployer->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 8))
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2>=2.8->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 11))
Using cached https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting futures (from python-codetree->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 13))
Using cached https://files.pythonhosted.org/packages/cc/26/b61e3a4eb50653e8a7339d84eeaa46d1e93b92951978873c220ae64d0733/futures-3.1.1.tar.gz
Collecting requests (from python-codetree->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 13))
Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
Collecting pylxd<2.1.0 (from mojo->-r /home/ubuntu/charm-test-infra/py3-clients-requirements.txt (line 15))
Using cached https://files.pythonhosted.org/packages/89/d6/b92297c3a29fe3cf0aa8c65d12f6fb669c69c993b86c69b06b4f03d4afdd/pylxd-2.0.7.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR:
Installed /tmp/pip-install-dfxhpppw/pylxd/.eggs/requests_unixsocket-0.1.5-py3.6.egg
Searching for requests!=2.8.0,>=2.5.2
Reading https://pypi.org/simple/requests/
Downloading https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl#sha256=7bf2a778576d825600030a110f3c0e3e8edc51dfaafe1c146e39a2027784957b
Best match: requests 2.21.0
Processing requests-2.21.0-py2.py3-none-any.whl
Installing requests-2.21.0-py2.py3-none-any.whl to /tmp/pip-install-dfxhpppw/pylxd/.eggs
writing requirements to /tmp/pip-install-dfxhpppw/pylxd/.eggs/requests-2.21.0-py3.6.egg/EGG-INFO/requires.txt

Installed /tmp/pip-install-dfxhpppw/pylxd/.eggs/requests-2.21.0-py3.6.egg
Searching for pbr>=1.8
Reading https://pypi.org/simple/pbr/
Downloading https://files.pythonhosted.org/packages/14/09/12fe9a14237a6b7e0ba3a8d6fcf254bf4b10ec56a0185f73d651145e9222/pbr-5.1.3-py2.py3-none-any.whl#sha256=8257baf496c8522437e8a6cfe0f15e00aedc6c0e0e7c9d55eeeeab31e0853843
Best match: pbr 5.1.3
Processing pbr-5.1.3-py2.py3-none-any.whl
Installing pbr-5.1.3-py2.py3-none-any.whl to /tmp/pip-install-dfxhpppw/pylxd/.eggs

Installed /tmp/pip-install-dfxhpppw/pylxd/.eggs/pbr-5.1.3-py3.6.egg
Searching for urllib3>=1.8
Reading https://pypi.org/simple/urllib3/
Downloading https://files.pythonhosted.org/packages/c0/1f/516c14fd47ced1a2e2882edd776241c5b707ffc9051cd372843579829994/urllib3-1.25.1-py2.py3-none-any.whl#sha256=a9645efd62b9fc1c7cad8ed93e162aad4c6bfd90e143966ddd4099b78cd244be
Best match: urllib3 1.25.1
Processing urllib3-1.25.1-py2.py3-none-any.whl
Installing urllib3-1.25.1-py2.py3-none-any.whl to /tmp/pip-install-dfxhpppw/pylxd/.eggs
writing requirements to /tmp/pip-install-dfxhpppw/pylxd/.eggs/urllib3-1.25.1-py3.6.egg/EGG-INFO/requires.txt

Installed /tmp/pip-install-dfxhpppw/pylxd/.eggs/urllib3-1.25.1-py3.6.egg
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-dfxhpppw/pylxd/setup.py", line 34, in <module>
    pbr=True)
  File "/home/ubuntu/charm-test-infra/.tox/clients/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/home/ubuntu/charm-test-infra/.tox/clients/lib/python3.6/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/home/ubuntu/charm-test-infra/.tox/clients/lib/python3.6/site-packages/setuptools/dist.py", line 717, in fetch_build_eggs
    replace_conflicting=True,  pkg_resources.ContextualVersionConflict: (urllib3 1.25.1 (/tmp/pip-install-dfxhpppw/pylxd/.eggs/urllib3-1.25.1-py3.6.egg), Requirement.parse('urllib3<1.25,>=1.21.1'), {'requests'})
  File "/home/ubuntu/charm-test-infra/.tox/clients/lib/python3.6/site-packages/pkg_resources/__init__.py", line 783, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (urllib3 1.25.1 (/tmp/pip-install-dfxhpppw/pylxd/.eggs/urllib3-1.25.1-py3.6.egg), Requirement.parse('urllib3<1.25,>=1.21.1'), {'requests'})
----------------------------------------

ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-dfxhpppw/pylxd/

ERROR: could not install deps [-r/home/ubuntu/charm-test-infra/py3-clients-requirements.txt]; v = InvocationError('/home/ubuntu/charm-test-infra/.tox/clients/bin/pip install -r/home/ubuntu/charm-test-infra/py3-clients-requirements.txt (see /home/ubuntu/charm-test-infra/.tox/clients/log/clients-1.log)', 1)
___________________________________ summary ____________________________________
ERROR: clients: could not install deps [-r/home/ubuntu/charm-test-infra/py3-clients-requirements.txt]; v = InvocationError('/home/ubuntu/charm-test-infra/.tox/clients/bin/pip install -r/home/ubuntu/charm-test-infra/py3-clients-requirements.txt (see /home/ubuntu/charm-test-infra/.tox/clients/log/clients-1.log)', 1)`

Bootstrapping virtualenv via Tox on Focal + Jammie instances

The problem

Running tox inside charm-test-infra throws the following error when when bootstrapping the virtualenv:

Click to see stacktrace
ubuntu@nuccitheboss-bastion:~/charm-test-infra$ tox 
clients create: /home/ubuntu/charm-test-infra/.tox/clients
clients installdeps: -r/home/ubuntu/charm-test-infra/py3-clients-requirements.txt
ERROR: invocation failed (exit code 1), logfile: /home/ubuntu/charm-test-infra/.tox/clients/log/clients-1.log
==========================log start ==========================
Ignoring python-openstackclient: markers 'python_version < "3.6"' don't match your environment
Ignoring aodhclient: markers 'python_version < "3.6"' don't match your environment
Ignoring python-designateclient: markers 'python_version < "3.6"' don't match your environment
Ignoring python-barbicanclient: markers 'python_version < "3.6"' don't match your environment
Ignoring python-cinderclient: markers 'python_version < "3.6"' don't match your environment
Ignoring python-glanceclient: markers 'python_version < "3.6"' don't match your environment
Ignoring python-heatclient: markers 'python_version < "3.6"' don't match your environment
Ignoring python-keystoneclient: markers 'python_version < "3.6"' don't match your environment
Ignoring python-neutronclient: markers 'python_version < "3.6"' don't match your environment
Ignoring python-novaclient: markers 'python_version < "3.6"' don't match your environment
Ignoring python-swiftclient: markers 'python_version < "3.6"' don't match your environment
Ignoring importlib-metadata: markers 'python_version < "3.6"' don't match your environment
Ignoring importlib-resources: markers 'python_version < "3.6"' don't match your environment
Ignoring dogpile.cache: markers 'python_version < "3.6"' don't match your environment
Ignoring openstacksdk: markers 'python_version < "3.6"' don't match your environment
Ignoring oslo.utils: markers 'python_version < "3.6"' don't match your environment
Collecting zaza
Cloning https://github.com/openstack-charmers/zaza.git to /tmp/pip-install-9fviw0v_/zaza
Running command git clone -q https://github.com/openstack-charmers/zaza.git /tmp/pip-install-9fviw0v_/zaza
Collecting zaza.openstack
Cloning https://github.com/openstack-charmers/zaza-openstack-tests.git to /tmp/pip-install-9fviw0v_/zaza.openstack
Running command git clone -q https://github.com/openstack-charmers/zaza-openstack-tests.git /tmp/pip-install-9fviw0v_/zaza.openstack
Collecting jujucrashdump
Cloning https://github.com/juju/juju-crashdump.git (to revision dba9ff0e6d71d25d37d9011d032d5fcc1af21c5c) to /tmp/pip-install-9fviw0v_/jujucrashdump
Running command git clone -q https://github.com/juju/juju-crashdump.git /tmp/pip-install-9fviw0v_/jujucrashdump
Running command git checkout -q dba9ff0e6d71d25d37d9011d032d5fcc1af21c5c
Collecting juju-deployer
Using cached juju-deployer-0.11.0.tar.gz (72 kB)
Collecting websocket-client!=0.44.0
Using cached websocket_client-1.3.2-py3-none-any.whl (54 kB)
Collecting argcomplete>=0.8.1
Using cached argcomplete-2.0.0-py2.py3-none-any.whl (37 kB)
Collecting jinja2>=2.8
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting setuptools==36.4.0
Using cached setuptools-36.4.0-py2.py3-none-any.whl (478 kB)
Collecting python-codetree
Checking out lp:codetree to /tmp/pip-install-9fviw0v_/python-codetree
Running command bzr branch -q lp:codetree /tmp/pip-install-9fviw0v_/python-codetree
brz: ERROR: AttributeError: module 'urllib' has no attribute 'proxy_bypass'

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 1016, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 1202, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 759, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 784, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/cleanup.py", line 136, in run_simple
    return _do_with_cleanups(
  File "/usr/lib/python3/dist-packages/breezy/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/builtins.py", line 1465, in run
    accelerator_tree, br_from = controldir.ControlDir.open_tree_or_branch(
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 799, in open_tree_or_branch
    controldir = klass.open(location)
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 705, in open
    t = _mod_transport.get_transport(base, possible_transports)
  File "/usr/lib/python3/dist-packages/breezy/transport/__init__.py", line 1573, in get_transport
    _mod_location.location_to_url(base, purpose=purpose),
  File "/usr/lib/python3/dist-packages/breezy/location.py", line 61, in location_to_url
    location = directories.dereference(location, purpose)
  File "/usr/lib/python3/dist-packages/breezy/directory_service.py", line 89, in dereference
    return directory.look_up(name, url, purpose=purpose)
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/lp_directory.py", line 122, in look_up
    return self._resolve(url)
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/lp_directory.py", line 178, in _resolve
    result = self._resolve_via_xmlrpc(path, url, _request_factory)
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/lp_directory.py", line 154, in _resolve_via_xmlrpc
    result = resolve.submit(service)
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/lp_registration.py", line 244, in submit
    return service.send_request(self._methodname, self._request_params())
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/lp_registration.py", line 173, in send_request
    result = method(*method_params)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1109, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1450, in __request
    response = self.__transport.request(
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/lp_registration.py", line 100, in request
    response = self._opener.open(request)
  File "/usr/lib/python3.8/urllib/request.py", line 522, in open
    req = meth(req)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/_urllib2_wrappers.py", line 1116, in <lambda>
    lambda request: self.set_proxy(request, scheme))
  File "/usr/lib/python3/dist-packages/breezy/transport/http/_urllib2_wrappers.py", line 1193, in set_proxy
    if self.proxy_bypass(host):
  File "/usr/lib/python3/dist-packages/breezy/transport/http/_urllib2_wrappers.py", line 1151, in proxy_bypass
    return urllib.proxy_bypass(host)
AttributeError: module 'urllib' has no attribute 'proxy_bypass'

Cause of the problem

Issue is a discrepancy with the bzr package between Bionic, Focal, and Jammie. The bzr package in Bionic installs Bazaar with python 2 while it installs Breezy with python 3 in Focal and Jammie. The discrepancy is demonstrated below in fresh LXD instances:

bzr in Bionic
root@test-container:~/charm-test-infra# cat /etc/os-release 
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@test-container:~/charm-test-infra# bzr version
Bazaar (bzr) 2.8.0dev1
  Python interpreter: /usr/bin/python 2.7.17
  Python standard library: /usr/lib/python2.7
  Platform: Linux-5.15.0-37-generic-x86_64-with-Ubuntu-18.04-bionic
  bzrlib: /usr/lib/python2.7/dist-packages/bzrlib
  Bazaar configuration: /root/.bazaar
  Bazaar log file: /root/.bzr.log

Copyright 2005-2012 Canonical Ltd.
http://bazaar.canonical.com/

bzr comes with ABSOLUTELY NO WARRANTY.  bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Bazaar is part of the GNU Project to produce a free operating system.
bzr in Focal
root@test-container:~# cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
root@test-container:~# bzr version
Breezy (brz) 3.0.2
  Python interpreter: /usr/bin/python3 3.8.10
  Python standard library: /usr/lib/python3.8
  Platform: Linux-5.15.0-37-generic-x86_64-with-glibc2.29
  breezy: /usr/lib/python3/dist-packages/breezy
  Breezy configuration: /root/.config/breezy
  Breezy log file: /root/.brz.log

Copyright 2005-2012 Canonical Ltd.
https://www.breezy-vcs.org/

brz comes with ABSOLUTELY NO WARRANTY.  brz is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

The problem is that urllib.proxy_bypass() is an attribute of urllib in python 2, but it is not an attribute in python 3. Therefore, if Breezy encounters legacy code when working with a project, it will throw an error.

Potential solution

The easiest short-term solution is to include step to install Bazaar for if you are bootstrapping the virtualenv on a system that does not have Bazaar in its standard repositories. This would probably look like a simple shell script that retrieves the necessary files and builds bzr.

Long-term solution would be to rework the dependencies in py3-clients-requirements.txt so that they are not referring to legacy python 2 code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.