Project

Profile

Help

Issue #5869

closed

Cannot import name Model

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

Status:
CLOSED - NOTABUG
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

I am trying to install pulp3 with rpm_plugin on Centos 7 using the ansible installer and am unable to get a working install. The first issue I hit was the libcomps error referenced here https://pulp.plan.io/issues/5853 and here https://github.com/pulp/pulp_rpm_prerequisites/pull/19/files

I eventually managed to get past that by manually adding the copr repo from mikedep333.

Now it seems I have hit another error and am at a complete loss. Can someone advise how to install the rpm plugin successfully?

I have tested installing without the plugin and this was successful though we need to be able to host rpms.


RUNNING HANDLER [pulp : Collect static content] *****************************************************************************************************************************************************************************************
fatal: [10.15.0.122]: FAILED! => {"changed": true, "cmd": ["/usr/local/lib/pulp/bin/django-admin", "collectstatic", "--noinput", "--link"], "delta": "0:00:01.325170", "end": "2019-12-11 17:15:38.058083", "msg": "non-zero return code", "rc": 1, "start": "2019-12-11 17:15:36.732913", "stderr": "Traceback (most recent call last):\n  File \"/usr/local/lib/pulp/bin/django-admin\", line 11, 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 357, in execute\n    django.setup()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/__init__.py\", line 24, in setup\n    apps.populate(settings.INSTALLED_APPS)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/apps/registry.py\", line 114, in populate\n    app_config.import_models()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/apps/config.py\", line 211, in import_models\n    self.models_module = import_module(models_module_name)\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/lib64/python3.6/site-packages/pulp_rpm/app/models.py\", line 14, in <module>\n    from pulpcore.plugin.models import (\nImportError: cannot import name 'Model'", "stderr_lines": ["Traceback (most recent call last):", "  File \"/usr/local/lib/pulp/bin/django-admin\", line 11, 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 357, in execute", "    django.setup()", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/__init__.py\", line 24, in setup", "    apps.populate(settings.INSTALLED_APPS)", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/apps/registry.py\", line 114, in populate", "    app_config.import_models()", "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/apps/config.py\", line 211, in import_models", "    self.models_module = import_module(models_module_name)", "  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/lib64/python3.6/site-packages/pulp_rpm/app/models.py\", line 14, in <module>", "    from pulpcore.plugin.models import (", "ImportError: cannot import name 'Model'"], "stdout": "", "stdout_lines": []}

This is my playbook vars.

---
pulp_use_system_wide_pkgs: true
pulp_install_plugins:
pulp-file: {}
pulp-rpm:
prereq_role: "ae.pulp_rpm_prerequisites"
pulp_settings:
secret_key: secret
content_origin: "http://pulp.actual-experience.com:24816"
default_file_storage: "storages.backends.s3boto3.S3Boto3Storage"
aws_storage_bucket_name: "bucketname"
pulp_default_admin_password: PASSWORD

Also available in: Atom PDF