Project

Profile

Help

Issue #6623

closed

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

Added by bmbouter over 4 years ago. Updated over 4 years ago.

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

Description

Here's one report: https://www.redhat.com/archives/pulp-list/2020-April/msg00054.html

Another report came on Slack from @chouse, here's his output:

RUNNING HANDLER [pulp : Collect static content] ******************************************************************************************************************************************
fatal: [18.210.15.117]: FAILED! => {"changed": true, "cmd": ["/usr/local/lib/pulp/bin/django-admin", "collectstatic", "--noinput", "--link"], "delta": "0:00:00.531262", "end": "2020-04-30 15:46:17.472493", "msg": "non-zero return code", "rc": 1, "start": "2020-04-30 15:46:16.941231", "stderr": "Traceback (most recent call last):\n  File \"/usr/local/lib/pulp/bin/django-admin\", line 8, in <module>\n    sys.exit(execute_from_command_line())\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/core/management/__init__.py\", line 381, in execute_from_command_line\n    utility.execute()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/core/management/__init__.py\", line 325, in execute\n    settings.INSTALLED_APPS\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/conf/__init__.py\", line 79, in __getattr__\n    self._setup(name)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/conf/__init__.py\", line 66, in _setup\n    self._wrapped = Settings(settings_module)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/conf/__init__.py\", line 157, in __init__\n    mod = importlib.import_module(self.SETTINGS_MODULE)\n  File \"/usr/lib64/python3.6/importlib/__init__.py\", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 994, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 955, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 665, in _load_unlocked\n  File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n  File \"/usr/local/lib/pulp/src/pulpcore/pulpcore/app/settings.py\", line 73, in <module>\n    plugin_app_config = entry_point.load()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pkg_resources/__init__.py\", line 2317, in load\n    self.require(*args, **kwargs)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pkg_resources/__init__.py\", line 2340, in require\n    items = working_set.resolve(reqs, env, installer, extras=self.extras)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pkg_resources/__init__.py\", line 779, in resolve\n    raise VersionConflict(dist, req).with_context(dependent_req)\npkg_resources.VersionConflict: (pulpcore 3.3.0 (/usr/local/lib/pulp/src/pulpcore), Requirement.parse('pulpcore<3.3,>=3.0'))", "stderr_lines": ["Traceback (most recent call last):", "  File \"/usr/local/lib/pulp/bin/django-admin\", line 8, in <module>", "    sys.exit(execute_from_command_line())", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/core/management/__init__.py\", line 381, in execute_from_command_line", "    utility.execute()", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/core/management/__init__.py\", line 325, in execute", "    settings.INSTALLED_APPS", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/conf/__init__.py\", line 79, in __getattr__", "    self._setup(name)", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/conf/__init__.py\", line 66, in _setup", "    self._wrapped = Settings(settings_module)", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/conf/__init__.py\", line 157, in __init__", "    mod = importlib.import_module(self.SETTINGS_MODULE)", "  File \"/usr/lib64/python3.6/importlib/__init__.py\", line 126, in import_module", "    return _bootstrap._gcd_import(name[level:], package, level)", "  File \"<frozen importlib._bootstrap>\", line 994, in _gcd_import", "  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load", "  File \"<frozen importlib._bootstrap>\", line 955, in _find_and_load_unlocked", "  File \"<frozen importlib._bootstrap>\", line 665, in _load_unlocked", "  File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module", "  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed", "  File \"/usr/local/lib/pulp/src/pulpcore/pulpcore/app/settings.py\", line 73, in <module>", "    plugin_app_config = entry_point.load()", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pkg_resources/__init__.py\", line 2317, in load", "    self.require(*args, **kwargs)", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pkg_resources/__init__.py\", line 2340, in require", "    items = working_set.resolve(reqs, env, installer, extras=self.extras)", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pkg_resources/__init__.py\", line 779, in resolve", "    raise VersionConflict(dist, req).with_context(dependent_req)", "pkg_resources.VersionConflict: (pulpcore 3.3.0 (/usr/local/lib/pulp/src/pulpcore), Requirement.parse('pulpcore<3.3,>=3.0'))"], "stdout": "", "stdout_lines": []}

The pre-flight check is broken, multiple issues that can cause this have been identified.

3 of the 4 issues are false negatives; the pre-flight should fail and terminate the install, but currently the pre-flight succceeds and the instal fails later on.

#6643 seems like it can only cause false positives; the pre-flight should succeed and the install would succeed, but the pre-flight fails and terminates the install.

My current proposed approach is 1 PR with 4 commits 4 each issue: https://github.com/pulp/pulp_installer/pull/284


Sub-issues 4 (0 open4 closed)

Issue #6642: pre-flight check does not check older pulp 3 installs properlyCLOSED - CURRENTRELEASEmdepaulo@redhat.comActions
Issue #6643: pre-flight check does not understand the plugin "upgrade" booleanCLOSED - CURRENTRELEASEmdepaulo@redhat.comActions
Issue #6644: pre-flight check does not check plugins that are installed but not listed in pulp_install_pluginsCLOSED - CURRENTRELEASEmdepaulo@redhat.comActions
Issue #6645: pre-flight check does not work properly when it needs a prereq roleCLOSED - CURRENTRELEASEmdepaulo@redhat.comActions

Related issues

Related to Pulp - Story #6688: pulp_installer: preflight check and system-wide packages are incompatibleNEWmdepaulo@redhat.com

Actions
Actions #1

Updated by fao89 over 4 years ago

The pre-flight checks the plugins that are currently to be installed, but it does not check the already installed ones which result in failure during collect static

Actions #2

Updated by fao89 over 4 years ago

  • Sprint Candidate changed from No to Yes
Actions #3

Updated by mdepaulo@redhat.com over 4 years ago

  • Assignee set to mdepaulo@redhat.com

Per our sprint planning, this is like highest priority for me.

Actions #4

Updated by mdepaulo@redhat.com over 4 years ago

  • Description updated (diff)
Actions #5

Updated by mdepaulo@redhat.com over 4 years ago

  • Description updated (diff)
Actions #6

Updated by fao89 over 4 years ago

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

Updated by mdepaulo@redhat.com over 4 years ago

  • Description updated (diff)
  • Status changed from NEW to ASSIGNED

Added by Mike DePaulo over 4 years ago

Revision 62a809dc | View on GitHub

Add 6623.bugfix for the parent task

so as to satisfy the commit message check requiring it for the "re:" lines in the sub-tasks' commit messages.

fixes: #6623

Added by Mike DePaulo over 4 years ago

Revision 28d6b80f | View on GitHub

Problem: pre-flight check does not work properly when it needs a prereq role

Solution: Run it only once and allow no errors if there are 0 prereq roles. Run it 2x and allow errors (but not failures) only on the 1st time if there are prereq roles.

fixes: #6645 pre-flight check does not work properly when it needs a prereq role https://pulp.plan.io/issues/6645

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

Added by Mike DePaulo over 4 years ago

Revision 62a809dc | View on GitHub

Add 6623.bugfix for the parent task

so as to satisfy the commit message check requiring it for the "re:" lines in the sub-tasks' commit messages.

fixes: #6623

Added by Mike DePaulo over 4 years ago

Revision 28d6b80f | View on GitHub

Problem: pre-flight check does not work properly when it needs a prereq role

Solution: Run it only once and allow no errors if there are 0 prereq roles. Run it 2x and allow errors (but not failures) only on the 1st time if there are prereq roles.

fixes: #6645 pre-flight check does not work properly when it needs a prereq role https://pulp.plan.io/issues/6645

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

Actions #8

Updated by mdepaulo@redhat.com over 4 years ago

  • Related to Story #6688: pulp_installer: preflight check and system-wide packages are incompatible added

Added by Mike DePaulo over 4 years ago

Revision 0c5f7ac8 | View on GitHub

Problem: pre-flight check does not check plugins that are installed but not listed in pulp_install_plugins

Solution: List them in requirements.in Implementation includes:

  1. New non-user-facing variable pulp_install_plugins_normalized with plugin names corrected from underscores to dashes.
  2. Having the entire repo use pulp_install_plugins_normalized (a safety measure so that the same values used for pre-flight checks is used for installation.)
  3. A currently unadvertised variable pulp_irregularly_named_plugins containing a list of pip packages that are plugins but do not begin with "pulp-".
  4. Print pulp_install_plugins variables to facilitate debugging, only if verbosity level is at least 1 (-v).

fixes: #6644 pre-flight check does not check plugins that are installed but not listed in pulp_install_plugins https://pulp.plan.io/issues/6644

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

Added by Mike DePaulo over 4 years ago

Revision 0c5f7ac8 | View on GitHub

Problem: pre-flight check does not check plugins that are installed but not listed in pulp_install_plugins

Solution: List them in requirements.in Implementation includes:

  1. New non-user-facing variable pulp_install_plugins_normalized with plugin names corrected from underscores to dashes.
  2. Having the entire repo use pulp_install_plugins_normalized (a safety measure so that the same values used for pre-flight checks is used for installation.)
  3. A currently unadvertised variable pulp_irregularly_named_plugins containing a list of pip packages that are plugins but do not begin with "pulp-".
  4. Print pulp_install_plugins variables to facilitate debugging, only if verbosity level is at least 1 (-v).

fixes: #6644 pre-flight check does not check plugins that are installed but not listed in pulp_install_plugins https://pulp.plan.io/issues/6644

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

Actions #9

Updated by Anonymous over 4 years ago

  • Status changed from ASSIGNED to MODIFIED
Actions #10

Updated by bmbouter over 4 years ago

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

Updated by dkliban@redhat.com over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF