repo_build cannot refer to variables in Creating OSA requirement wheels

Bug #1557682 reported by Steve Lewis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Won't Fix
Wishlist
Kevin Carter

Bug Description

Background:
Gnocchi's setup.py allows storage driver choice to customize requirements.
This allows us to only install the additional libraries required for the storage drivers we care about (file, swift, ceph,...).
This should allow us to do the following in role defaults:

gnocchi_pip_packages:
  - "gnocchi[mysql,{{ gnocchi_storage_driver }}]"
  - keystonemiddleware
  - gnocchiclient
  - python-memcached

Where {{ gnocchi_storage_driver }} is defined in the scope of the repo_build role, either through group_vars or an entry
in the user_*.yml files.

Expected:
The repo should build wheels and venvs.

Actual:
During repo_build there is incomplete interpretation occurring when this detail is extracted from the os_roles.

> root@host:/opt/openstack-ansible/playbooks# openstack-ansible repo-build.yml -e repo_build_venv_force_rebuild=true -e gnocchi_storage_driver=file

TASK: [repo_build | Create OpenStack-Ansible requirement wheels] **************
failed: [aio1_repo_container-6e4b000f] => {"changed": true, "cmd": "pip wheel --timeout 120 --wheel-dir /tmp/openstack-wheel-output --find-links /tmp/openstack-wheel-output --constraint /var/www/repo/os-releases/master/requirements_constraints.txt --index-url https://rpc-repo.rackspace.com/pools --trusted-host rpc-repo.rackspace.com --extra-index-url https://pypi.python.org/simple --trusted-host pypi.python.org --build /tmp/openstack-builder --log /var/log/repo/repo_builder.log --requirement /var/www/repo/os-releases/master/requirements_local_filtered.txt", "delta": "0:00:01.263887", "end": "2016-03-15 17:31:45.641337", "rc": 1, "start": "2016-03-15 17:31:44.377450", "warnings": []}
stderr: Ignoring dnspython3: markers "python_version=='3.4'" don't match your environment
Ignoring os-win: markers "python_version=='3.4'" don't match your environment
Ignoring python-ironic-inspector-client: markers "python_version=='3.4'" don't match your environment
Ignoring requestsexceptions: markers "python_version=='3.4'" don't match your environment
Invalid requirement: 'gnocchi[mysql,{# gnocchi_storage_driver'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 76, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3036, in parse
    req, = parse_requirements(s)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2976, in parse_requirements
    DISTRO, CBRACKET, line, p, (1,), "'extra' name"
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2945, in scan_list
    raise RequirementParseError(msg, line, "at", line[p:])
RequirementParseError: Expected 'extra' name in gnocchi[mysql,{# gnocchi_storage_driver at {# gnocchi_storage_driver

Workaround:
Roles can install all optional libraries all the time:

gnocchi_pip_packages:
  - "gnocchi[mysql,file,swift,ceph]"
  - keystonemiddleware
  - gnocchiclient
  - python-memcached

Changed in openstack-ansible:
importance: Undecided → Wishlist
assignee: nobody → Kevin Carter (kevin-carter)
Changed in openstack-ansible:
status: New → Triaged
Revision history for this message
Jonathan Rosser (jrosser) wrote :

The repo_build process is no longer present and all supported releases take a different approach.

Changed in openstack-ansible:
status: Triaged → Won't Fix
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.