Project

Profile

Help

Issue #6642

closed

Issue #6623: pulpcore and plugin pre-flight check seems to not be enforcing and then installer fails at collectstatic

pre-flight check does not check older pulp 3 installs properly

Added by mdepaulo@redhat.com almost 4 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
Installer - Moved to GitHub issues
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 72
Quarter:

Description

Consider the following scenario:

  1. Pulp 3.1.1 & pulp-file 0.1.1 were installed prior to the pre-flight check being implemented in pulp_installer 3.2.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.1.1 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.


Related issues

Related to Pulp - Issue #6689: pre-flight check errors when a package is installed system-wide at a version that is not available on PyPICLOSED - CURRENTRELEASEmdepaulo@redhat.comActions
Actions #1

Updated by mdepaulo@redhat.com almost 4 years ago

  • Tags Pulp 3 installer added
Actions #2

Updated by mdepaulo@redhat.com almost 4 years ago

  • Description updated (diff)
Actions #3

Updated by mdepaulo@redhat.com almost 4 years ago

  • Subject changed from pre-flight check does not analyze older pulp 3 systems properly to pre-flight check does not analyze older pulp 3 installs properly
Actions #4

Updated by mdepaulo@redhat.com almost 4 years ago

  • Subject changed from pre-flight check does not analyze older pulp 3 installs properly to pre-flight check does not check older pulp 3 installs properly
Actions #5

Updated by mdepaulo@redhat.com almost 4 years ago

  • Description updated (diff)
Actions #6

Updated by fao89 almost 4 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 72
Actions #7

Updated by mdepaulo@redhat.com almost 4 years ago

  • Status changed from ASSIGNED to POST

Added by Mike DePaulo almost 4 years ago

Revision 0ad5fc2f | View on GitHub

Problem: pre-flight check does not check older pulp 3 installs properly

Solution: Always generate a requirements.txt from pip freeze

fixes: #6642 pre-flight check does not analyze older pulp 3 installs properly https://pulp.plan.io/issues/6642

re: https://pulp.plan.io/issues/6623 pulpcore and plugin pre-flight check seems to not be enforcing and then installer fails at collectstatic

Added by Mike DePaulo almost 4 years ago

Revision 0ad5fc2f | View on GitHub

Problem: pre-flight check does not check older pulp 3 installs properly

Solution: Always generate a requirements.txt from pip freeze

fixes: #6642 pre-flight check does not analyze older pulp 3 installs properly https://pulp.plan.io/issues/6642

re: https://pulp.plan.io/issues/6623 pulpcore and plugin pre-flight check seems to not be enforcing and then installer fails at collectstatic

Actions #8

Updated by mdepaulo@redhat.com almost 4 years ago

  • Description updated (diff)
Actions #9

Updated by Anonymous almost 4 years ago

  • Status changed from POST to MODIFIED
Actions #10

Updated by mdepaulo@redhat.com almost 4 years ago

  • Related to Issue #6689: pre-flight check errors when a package is installed system-wide at a version that is not available on PyPI added

Added by Mike DePaulo almost 4 years ago

Revision 37aab669 | View on GitHub

Problem: pre-flight check errors when a package is installed

system-wide at a version that is not available on PyPI, and

This happens for old pulp_rpm prereqs.

This is a regression implemented in the referenced issue's fix.

Solution: Have pip freeze not list system-site packages. pip-compile will fail if compatible packages are not available on PyPI. However, they are, and Pulp does not rely on system-site packages anymore.

This makes the check behave like before the referenced issue's fix.

fixes: #6689 pre-flight check errors when a package is installed system-wide at a version that is not available on PyPI https://pulp.plan.io/issues/6689

re: #6642 pre-flight check does not analyze older pulp 3 installs properly https://pulp.plan.io/issues/6642

Added by Mike DePaulo almost 4 years ago

Revision 37aab669 | View on GitHub

Problem: pre-flight check errors when a package is installed

system-wide at a version that is not available on PyPI, and

This happens for old pulp_rpm prereqs.

This is a regression implemented in the referenced issue's fix.

Solution: Have pip freeze not list system-site packages. pip-compile will fail if compatible packages are not available on PyPI. However, they are, and Pulp does not rely on system-site packages anymore.

This makes the check behave like before the referenced issue's fix.

fixes: #6689 pre-flight check errors when a package is installed system-wide at a version that is not available on PyPI https://pulp.plan.io/issues/6689

re: #6642 pre-flight check does not analyze older pulp 3 installs properly https://pulp.plan.io/issues/6642

Actions #11

Updated by bmbouter almost 4 years ago

  • Category set to Installer - Moved to GitHub issues
  • Tags deleted (Pulp 3 installer)
Actions #12

Updated by dkliban@redhat.com almost 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF