Charm fails to install with error from pip on Bionic

Bug #1912206 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Octavia Charm
Invalid
Undecided
Unassigned

Bug Description

2021-01-18 12:33:59 INFO juju.worker.uniter resolver.go:147 found queued "install" hook
2021-01-18 12:36:24 WARNING install Could not find a version that satisfies the requirement importlib_metadata>=1.7.0 (from osprofiler) (from versions: )
2021-01-18 12:36:25 WARNING install No matching distribution found for importlib_metadata>=1.7.0 (from osprofiler)
2021-01-18 12:36:25 WARNING install Traceback (most recent call last):
2021-01-18 12:36:25 WARNING install File "/var/lib/juju/agents/unit-octavia-0/charm/hooks/install", line 8, in <module>
2021-01-18 12:36:25 WARNING install basic.bootstrap_charm_deps()
2021-01-18 12:36:25 WARNING install File "lib/charms/layer/basic.py", line 208, in bootstrap_charm_deps
2021-01-18 12:36:25 WARNING install env=_get_subprocess_env())
2021-01-18 12:36:25 WARNING install File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
2021-01-18 12:36:25 WARNING install raise CalledProcessError(retcode, cmd)
2021-01-18 12:36:25 WARNING install subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-octavia-0/.venv/bin/pip', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'packaging', 'testtools', 'pecan', 'chardet', 'pyparsing', 'oslo.serialization', 'oslo.context', 'osprofiler', 'waitress', 'oslo.i18n', 'keystoneauth1', 'os-service-types', 'python-mimeparse', 'oslo.log', 'wrapt', 'Paste', 'wcwidth', 'SQLAlchemy', 'cliff', 'wheel', 'Mako', 'fasteners', 'pyaml', 'sortedcontainers', 'tinyrpc', 'sqlparse', 'eventlet', 'pbr', 'zipp', 'oslo.db', 'fixtures', 'pytz', 'os-client-config', 'cffi', 'cryptography', 'os-traits', 'WebTest', 'prettytable', 'munch', 'statsd', 'extras', 'PasteDeploy', 'netifaces', 'os-ken', 'futurist', 'python-neutronclient', 'cachetools', 'argparse', 'urllib3', 'unittest2', 'attrs', 'Tempita', 'alembic', 'pyperclip', 'charms.reactive', 'linecache2', 'osc-lib', 'oslo.policy', 'traceback2', 'Routes', 'openstacksdk', 'dogpile.cache', 'charmhelpers', 'decorator', 'Jinja2', 'psutil', 'kombu', 'pycparser', 'netaddr', 'yappi', 'soupsieve', 'PyYAML', 'pyinotify', 'greenlet', 'msgpack', 'charms.openstack', 'ovs', 'MarkupSafe', 'oslo.config', 'logutils', 'certifi', 'simplejson', 'repoze.lru', 'amqp', 'cmd2', 'python-keystoneclient', 'oslo.versionedobjects', 'rfc3986', 'colorama', 'beautifulsoup4', 'WebOb', 'six', 'oslo.concurrency', 'oslo.messaging', 'testscenarios', 'python-editor', 'oslo.utils', 'python-dateutil', 'iso8601', 'debtcollector', 'jmespath', 'python-novaclient', 'appdirs', 'jsonpatch', 'idna', 'oslo.service', 'dnspython', 'jsonpointer', 'stevedore', 'neutron-lib', 'vine', 'setproctitle', 'sqlalchemy-migrate', 'toml', 'testresources', 'requests', 'requestsexceptions', 'pytest-runner', 'oslo.middleware']' returned non-zero exit status 1.
2021-01-18 12:36:25 ERROR juju.worker.uniter.operation runhook.go:136 hook "install" (via explicit, bespoke hook script) failed: exit status 1

Frode Nordahl (fnordahl)
Changed in charm-octavia:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Frode Nordahl (fnordahl) wrote :

Marking this as invalid, as this only happens when the charm is built on a newer system which would not put the necessary wheels into the wheelhouse.

If you build the charm on a Python 3.5 or Python 3.6 system it works fine.

Changed in charm-octavia:
status: Triaged → Invalid
importance: Critical → Undecided
Revision history for this message
David Ames (thedac) wrote :

I am reviving this bug as I am seeing this after build on bionic with python 3.6

Collecting importlib-metadata
  Installing build dependencies ... error
  Complete output from command /var/lib/juju/agents/unit-octavia-0/.venv/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-shojuba8 --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links wheelhouse -- setuptools>=42 wheel setuptools_scm[toml]>=3.4.1:
  The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  Looking in links: wheelhouse
  Collecting setuptools>=42
    Could not find a version that satisfies the requirement setuptools>=42 (from versions: scm-3.4.1, 41.6.0)
  No matching distribution found for setuptools>=42

This could be a layer basic bug, but it is affecting our ability to deploy octavia.

The above was using charm-tools <2.8.1 which in theory should not be new.

Changed in charm-octavia:
status: Invalid → New
Revision history for this message
David Ames (thedac) wrote :

Frode's fix [0] to the build process is stacked on the 21.01 sync change [1]. If [0] passes its tests both [0] and [1] can be landed.

[0] https://review.opendev.org/c/openstack/charm-octavia/+/773097
[1] https://review.opendev.org/c/openstack/charm-octavia/+/771041

Revision history for this message
Frode Nordahl (fnordahl) wrote :

The root of the issue was a recent change in charm-tools, and should be addressed by https://github.com/juju/charm-tools/pull/598

Changed in charm-octavia:
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.