Issue #6642
Updated by mdepaulo@redhat.com over 4 years ago
Consider the following scenario:
1. Pulp & pulp-file were installed prior to the pre-flight check being implemented in pulp_installer, like Pulp 3.0.
2. The user runs the latest pulp_installer (3.3), to upgrade pulpcore (3.3) & the overall pulp install.
3. The user specifies to install pulp-file in pulp_install_plugins, but does not specify "upgrade" or "version" for it. This instructs the installer to not upgrade pulp-file.
This causes the following to happen
1. /usr/local/lib/pulp/requirements.txt does not already exist from the Pulp 3.0 install run.
2. pip-compile sees "pulp-file" in requirements.in that pulp_installer generates, but no pulp-file in requirements.txt. It therefore assumes that no pulp-file is installed, and the latest pulp-file will be installed by our later install task. The pip-compile pre-flight check passes.
3. When pip goes to install, it sees that an older pulp-file is installed, and leaves it at the older version.
4. The old pulp-file is actually incompatible with current pulpcore 3.3, and later tasks fail with a failed import.
Similar mishap could happen if the user modified the virtualenv manually with pip commands and not pip-compile.
I propose we address this by always generating requirements.txt via `pip freeze`.