pulp / pulp/oci_env

Non-fatal error during compose-up calling postgres-prepare

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
11
Forks
39
Avg merge
18d 18h
Merged PRs (30d)
1

Description

I see this error (seemingly from dynaconf) during compose up. It doesn't stop the machine from launching so not sure what is going on. Using pulpcore & pulp_file on main.

pulp_1   | Calling /etc/init/postgres-prepare
pulp_1   | 2022-09-28 20:17:15.957 UTC [596] LOG:  starting PostgreSQL 12.11 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-13), 64-bit
pulp_1   | 2022-09-28 20:17:15.958 UTC [596] LOG:  listening on IPv4 address "127.0.0.1", port 5432
pulp_1   | 2022-09-28 20:17:15.958 UTC [596] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
pulp_1   | 2022-09-28 20:17:15.958 UTC [596] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
pulp_1   | 2022-09-28 20:17:15.959 UTC [596] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
pulp_1   | 2022-09-28 20:17:15.961 UTC [596] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
pulp_1   | 2022-09-28 20:17:15.968 UTC [596] LOG:  redirecting log output to logging collector process
pulp_1   | 2022-09-28 20:17:15.968 UTC [596] HINT:  Future log output will appear in directory "log".
pulp_1   | Traceback (most recent call last):
pulp_1   |   File "/usr/local/bin/pulpcore-manager", line 8, in <module>
pulp_1   |     sys.exit(manage())
pulp_1   |   File "/src/pulpcore/pulpcore/app/manage.py", line 11, in manage
pulp_1   |     execute_from_command_line(sys.argv)
pulp_1   |   File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
pulp_1   |     utility.execute()
pulp_1   |   File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 363, in execute
pulp_1   |     settings.INSTALLED_APPS
pulp_1   |   File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
pulp_1   |     self._setup(name)
pulp_1   |   File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 69, in _setup
pulp_1   |     self._wrapped = Settings(settings_module)
pulp_1   |   File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 170, in __init__
pulp_1   |     mod = importlib.import_module(self.SETTINGS_MODULE)
pulp_1   |   File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
pulp_1   |     return _bootstrap._gcd_import(name[level:], package, level)
pulp_1   |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
pulp_1   |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
pulp_1   |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
pulp_1   |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
pulp_1   |   File "<frozen importlib._bootstrap_external>", line 843, in exec_module
pulp_1   |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
pulp_1   |   File "/src/pulpcore/pulpcore/app/settings.py", line 299, in <module>
pulp_1   |     from dynaconf import DjangoDynaconf, Validator  # noqa
pulp_1   |   File "/usr/local/lib/python3.8/site-packages/dynaconf/__init__.py", line 3, in <module>
pulp_1   |     from dynaconf.base import LazySettings  # noqa
pulp_1   |   File "/usr/local/lib/python3.8/site-packages/dynaconf/base.py", line 17, in <module>
pulp_1   |     from dynaconf.loaders import env_loader
pulp_1   |   File "/usr/local/lib/python3.8/site-packages/dynaconf/loaders/env_loader.py", line 8, in <module>
pulp_1   |     from dynaconf.vendor.dotenv import cli as dotenv_cli
pulp_1   |   File "/usr/local/lib/python3.8/site-packages/dynaconf/vendor/dotenv/cli.py", line 16, in <module>
pulp_1   |     @click.option('-f','--file',default=os.path.join(os.getcwd(),'.env'),type=click.Path(exists=_A),help='Location of the .env file, defaults to .env file in current working directory.')
pulp_1   | FileNotFoundError: [Errno 2] No such file or directory
pulp_1   | Operations to perform:
pulp_1   |   Apply all migrations: auth, contenttypes, core, file, python, sessions
pulp_1   | Running migrations:
pulp_1   |   No migrations to apply.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing compose up and tracing /etc/init/postgres-prepare into pulpcore/pulpcore/app/settings.py:299 and the dynaconf import shown in the traceback. Done means identifying the cause of the FileNotFoundError and IPv6 bind message, then documenting or correcting the expected compose behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, docker-compose, postgresql, python
Domain
backend, databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.