Actions
Issue #9548
closedpulp installer is trying to create /var/lib/pulp
Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Category:
Installer - Moved to GitHub issues
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
On fresh debian 11 install I get this error
RUNNING HANDLER [pulp.pulp_installer.pulp_common : Collect static content] ************************************************************
[WARNING]: Using world-readable permissions for temporary files Ansible needs to create when becoming an unprivileged user. This may
be insecure. For information on securing this, see https://docs.ansible.com/ansible/user_guide/become.html#risks-of-becoming-an-
unprivileged-user
fatal: [repo-mirror.wasd.tv]: FAILED! => {"changed": true, "cmd": ["/opt/pulp/lib/bin/pulpcore-manager", "collectstatic", "--clear", "--noinput", "--link"], "delta": "0:00:02.437759", "end": "2021-11-02 14:30:43.872728", "msg": "non-zero return code", "rc": 1, "start": "2021-11-02 14:30:41.434969", "stderr": "Traceback (most recent call last):\n File \"/opt/pulp/lib/bin/pulpcore-manager\", line 8, in <module>\n sys.exit(manage())\n File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/manage.py\", line 11, in manage\n execute_from_command_line(sys.argv)\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/__init__.py\", line 419, in execute_from_command_line\n utility.execute()\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/__init__.py\", line 413, in execute\n self.fetch_command(subcommand).run_from_argv(self.argv)\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/base.py\", line 354, in run_from_argv\n self.execute(*args, **cmd_options)\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/base.py\", line 398, in execute\n output = self.handle(*args, **options)\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py\", line 187, in handle\n collected = self.collect()\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py\", line 114, in collect\n handler(path, prefixed_path, storage)\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py\", line 312, in link_file\n os.makedirs(os.path.dirname(full_path), exist_ok=True)\n File \"/usr/lib/python3.9/os.py\", line 215, in makedirs\n makedirs(head, exist_ok=exist_ok)\n File \"/usr/lib/python3.9/os.py\", line 215, in makedirs\n makedirs(head, exist_ok=exist_ok)\n File \"/usr/lib/python3.9/os.py\", line 215, in makedirs\n makedirs(head, exist_ok=exist_ok)\n File \"/usr/lib/python3.9/os.py\", line 225, in makedirs\n mkdir(name, mode)\nPermissionError: [Errno 13] Permission denied: '/var/lib/pulp'", "stderr_lines": ["Traceback (most recent call last):", " File \"/opt/pulp/lib/bin/pulpcore-manager\", line 8, in <module>", " sys.exit(manage())", " File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/manage.py\", line 11, in manage", " execute_from_command_line(sys.argv)", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/__init__.py\", line 419, in execute_from_command_line", " utility.execute()", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/__init__.py\", line 413, in execute", " self.fetch_command(subcommand).run_from_argv(self.argv)", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/base.py\", line 354, in run_from_argv", " self.execute(*args, **cmd_options)", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/base.py\", line 398, in execute", " output = self.handle(*args, **options)", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py\", line 187, in handle", " collected = self.collect()", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py\", line 114, in collect", " handler(path, prefixed_path, storage)", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py\", line 312, in link_file", " os.makedirs(os.path.dirname(full_path), exist_ok=True)", " File \"/usr/lib/python3.9/os.py\", line 215, in makedirs", " makedirs(head, exist_ok=exist_ok)", " File \"/usr/lib/python3.9/os.py\", line 215, in makedirs", " makedirs(head, exist_ok=exist_ok)", " File \"/usr/lib/python3.9/os.py\", line 215, in makedirs", " makedirs(head, exist_ok=exist_ok)", " File \"/usr/lib/python3.9/os.py\", line 225, in makedirs", " mkdir(name, mode)", "PermissionError: [Errno 13] Permission denied: '/var/lib/pulp'"], "stdout": "", "stdout_lines": []}
my playbook
- name: pulp
hosts:
- "pulp"
roles:
- pulp.pulp_installer.pulp_all_services
vars:
ansible_shell_allow_world_readable_temp: true
ansible_python_interpreter: /usr/bin/python3
pulp_media_root: /opt/pulp/media
pulp_cache_dir: /opt/pulp/cache
pulp_user_home: /opt/pulp/home
pulp_install_dir: /opt/pulp/lib
pulp_config_dir: /opt/pulp/etc
pulp_settings:
secret_key: "secret"
content_origin: https://repo-mirror
pulp_default_admin_password: "xxx"
pulp_install_plugins:
# galaxy-ng: {}
# pulp-2to3-migration: {}
pulp-ansible: {}
# pulp-certguard: {}
pulp-container: {}
# pulp-cookbook: {}
pulp-deb: {}
pulp-file: {}
# pulp-gem: {}
# pulp-maven: {}
pulp-npm:
source_dir: /tmp/pulp-src/pulp-npm
git_url: https://github.com/pulp/pulp_npm
git_revision: b91ad5e7972a02321b90337dc04f4a7afc185849
pulp-python: {}
pulp-rpm: {}
### webserver
pulp_webserver_server: nginx
pulp_configure_firewall: none
pulp_webserver_https_port: 4444
pulp_client_max_body_size: 1024M
pulp_webserver_tls_files_remote: true
pulp_webserver_tls_cert: /etc/ssl/crt
pulp_webserver_tls_key: /etc/ssl/key
pulp_webserver_httpd_servername: repo-mirror
environment:
DJANGO_SETTINGS_MODULE: pulpcore.app.settings
Updated by fao89 about 2 years ago
- Category set to Installer - Moved to GitHub issues
Updated by andrewm41 about 2 years ago
when I try to change back to default pulp_user_home, I get next error
TASK [pulp.pulp_installer.pulp_database_config : Run database migrations] *************************************************************
[WARNING]: Using world-readable permissions for temporary files Ansible needs to create when becoming an unprivileged user. This may
be insecure. For information on securing this, see https://docs.ansible.com/ansible/user_guide/become.html#risks-of-becoming-an-
unprivileged-user
fatal: [repo-mirror]: FAILED! => {"changed": true, "cmd": ["/opt/pulp/lib/bin/pulpcore-manager", "migrate", "--no-input"], "delta": "0:00:02.280418", "end": "2021-11-03 14:35:33.372975", "msg": "non-zero return code", "rc": 1, "start": "2021-11-03 14:35:31.092557", "stderr": "Traceback (most recent call last):\n File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/settings.py\", line 331, in <module>\n with open(DB_ENCRYPTION_KEY, \"rb\") as key_file:\nFileNotFoundError: [Errno 2] No such file or directory: '/etc/pulp/certs/database_fields.symmetric.key'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/opt/pulp/lib/bin/pulpcore-manager\", line 8, in <module>\n sys.exit(manage())\n File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/manage.py\", line 11, in manage\n execute_from_command_line(sys.argv)\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/__init__.py\", line 419, in execute_from_command_line\n utility.execute()\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/__init__.py\", line 395, in execute\n django.setup()\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/__init__.py\", line 24, in setup\n apps.populate(settings.INSTALLED_APPS)\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/apps/registry.py\", line 114, in populate\n app_config.import_models()\n File \"/opt/pulp/lib/lib/python3.9/site-packages/django/apps/config.py\", line 301, in import_models\n self.models_module = import_module(models_module_name)\n File \"/usr/lib/python3.9/importlib/__init__.py\", line 127, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n File \"<frozen importlib._bootstrap>\", line 1030, in _gcd_import\n File \"<frozen importlib._bootstrap>\", line 1007, in _find_and_load\n File \"<frozen importlib._bootstrap>\", line 986, in _find_and_load_unlocked\n File \"<frozen importlib._bootstrap>\", line 680, in _load_unlocked\n File \"<frozen importlib._bootstrap_external>\", line 790, in exec_module\n File \"<frozen importlib._bootstrap>\", line 228, in _call_with_frames_removed\n File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/models/__init__.py\", line 24, in <module>\n from .exporter import ( # noqa\n File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/models/exporter.py\", line 11, in <module>\n from pulpcore.app.models.repository import Repository\n File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/models/repository.py\", line 22, in <module>\n from pulpcore.cache import Cache\n File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/cache/__init__.py\", line 1, in <module>\n from .cache import Cache, AsyncCache, ContentCache, CacheKeys # noqa\n File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/cache/cache.py\", line 7, in <module>\n from pulpcore.app.settings import settings\n File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/settings.py\", line 334, in <module>\n raise ImproperlyConfigured(\ndjango.core.exceptions.ImproperlyConfigured: Could not load DB_ENCRYPTION_KEY file '/etc/pulp/certs/database_fields.symmetric.key': [Errno 2] No such file or directory: '/etc/pulp/certs/database_fields.symmetric.key'", "stderr_lines": ["Traceback (most recent call last):", " File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/settings.py\", line 331, in <module>", " with open(DB_ENCRYPTION_KEY, \"rb\") as key_file:", "FileNotFoundError: [Errno 2] No such file or directory: '/etc/pulp/certs/database_fields.symmetric.key'", "", "During handling of the above exception, another exception occurred:", "", "Traceback (most recent call last):", " File \"/opt/pulp/lib/bin/pulpcore-manager\", line 8, in <module>", " sys.exit(manage())", " File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/manage.py\", line 11, in manage", " execute_from_command_line(sys.argv)", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/__init__.py\", line 419, in execute_from_command_line", " utility.execute()", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/core/management/__init__.py\", line 395, in execute", " django.setup()", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/__init__.py\", line 24, in setup", " apps.populate(settings.INSTALLED_APPS)", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/apps/registry.py\", line 114, in populate", " app_config.import_models()", " File \"/opt/pulp/lib/lib/python3.9/site-packages/django/apps/config.py\", line 301, in import_models", " self.models_module = import_module(models_module_name)", " File \"/usr/lib/python3.9/importlib/__init__.py\", line 127, in import_module", " return _bootstrap._gcd_import(name[level:], package, level)", " File \"<frozen importlib._bootstrap>\", line 1030, in _gcd_import", " File \"<frozen importlib._bootstrap>\", line 1007, in _find_and_load", " File \"<frozen importlib._bootstrap>\", line 986, in _find_and_load_unlocked", " File \"<frozen importlib._bootstrap>\", line 680, in _load_unlocked", " File \"<frozen importlib._bootstrap_external>\", line 790, in exec_module", " File \"<frozen importlib._bootstrap>\", line 228, in _call_with_frames_removed", " File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/models/__init__.py\", line 24, in <module>", " from .exporter import ( # noqa", " File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/models/exporter.py\", line 11, in <module>", " from pulpcore.app.models.repository import Repository", " File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/models/repository.py\", line 22, in <module>", " from pulpcore.cache import Cache", " File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/cache/__init__.py\", line 1, in <module>", " from .cache import Cache, AsyncCache, ContentCache, CacheKeys # noqa", " File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/cache/cache.py\", line 7, in <module>", " from pulpcore.app.settings import settings", " File \"/opt/pulp/lib/lib/python3.9/site-packages/pulpcore/app/settings.py\", line 334, in <module>", " raise ImproperlyConfigured(", "django.core.exceptions.ImproperlyConfigured: Could not load DB_ENCRYPTION_KEY file '/etc/pulp/certs/database_fields.symmetric.key': [Errno 2] No such file or directory: '/etc/pulp/certs/database_fields.symmetric.key'"], "stdout": "", "stdout_lines": []}
Installer is trying to find /etc/pulp/certs/ but it is in pulp_config_dir: /opt/pulp/etc
Updated by dkliban@redhat.com about 2 years ago
- Status changed from NEW to CLOSED - DUPLICATE
Thank you for filing this issue. We now track installer issues on github issues. : https://github.com/pulp/pulp_installer/issues/801
Actions