Robust dependency checks

Registered by Alexej Ababilov

1. Currently, Anvil handles dependencies this way:

for pack in packages
     install deps for pack

This can lead to errors. nova needs kombu>=1.0.4, so, anvil installs the latest one. Than comes quantum and requests kombu==1.0.4. Anvil detects that another version is already installed and fails.

2. It would be good to install all packages from RPMs and to freeze their versions, e.g., for a given OpenStack release so that one can install OpenStack twice and all dependencies would be guaranteed to have the same versions.

3. Here is the plan how to do it.

Stage I. First installation - performed by Anvil

1. Anvil aggregates _all_ dependencies for _all_ packages.
2. Anvil tries to install the deps with yum and pip. All conflicts are reported. This is an updated `smithy -a install`
3. Anvil builds RPMs from packages installed by pip. These package will have appropriate `Requires: ' generated from actual Python package requirements. It is an enhancement of `smithy -a package`.
4. Anvil writes `pip freeze' file and builds an openstack-deps.rpm - an RPM that `Requires' frozen versions of requirements.

Stage II.

Variant A. Anvil analyzes `pip freeze` file and installs frozen dependencies with yum and pip.
Variant B. User installs openstack-deps.rpm and all deps will be installed from a previously generated YUM repo.

We can force Anvil on I.1 to use additional version restrictions for some packages: just mention them in *.yaml (as it is done now) or give a fragment of `pip freeze` file.

Comment.
On step I.2, Anvil gives pip the gathered requirements, so, all dependency handling is done by pip. It saves from writing Just Another Package Management System. Pip reports what versions are to be installed. Anvil can try to use RPM for some packages if they are available.
Option. Anvil can suggest pip to use versions of available RPM packages.

This bug is included into current blueprint:
Add advanced dependency checking: https://bugs.launchpad.net/anvil/+bug/1157871

Blueprint information

Status:
Complete
Approver:
Joshua Harlow
Priority:
High
Drafter:
None
Direction:
Approved
Assignee:
Alexej Ababilov
Definition:
New
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Alexej Ababilov
Completed by
Alexej Ababilov

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bug/1157871,n,z

Addressed by: https://review.openstack.org/30620
    Build RPMs and use YUM to handle dependencies

Addressed by: https://review.openstack.org/30451
    Build RPMs and use YUM to handle dependencies

Addressed by: https://review.openstack.org/31343
    Build RPMs and use YUM to handle dependencies

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.