You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migration script fail connect to postgres with custom password.
Expected behavior
Migration script should use password set from deployment.
Actual behavior
Error log psycopg2.OperationalError: FATAL: password authentication failed for user "postgres" The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "/python-runtime/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/python-runtime/django/core/management/__init__.py", line 395, in execute django.setup() File "/python-runtime/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/python-runtime/django/apps/registry.py", line 122, in populate app_config.ready() File "/code/posthog/apps.py", line 52, in ready in_range, version = service_version_requirement.is_service_in_accepted_version() File "/code/posthog/version_requirement.py", line 28, in is_service_in_accepted_version service_version = self.get_service_version() File "/code/posthog/version_requirement.py", line 33, in get_service_version return get_postgres_version() File "/code/posthog/version_requirement.py", line 45, in get_postgres_version with connection.cursor() as cursor: File "/python-runtime/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/python-runtime/django/db/backends/base/base.py", line 259, in cursor return self._cursor() File "/python-runtime/django/db/backends/base/base.py", line 235, in _cursor self.ensure_connection() File "/python-runtime/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/python-runtime/django/db/backends/base/base.py", line 219, in ensure_connection self.connect() File "/python-runtime/django/db/utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/python-runtime/django/db/backends/base/base.py", line 219, in ensure_connection self.connect() File "/python-runtime/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/python-runtime/django/db/backends/base/base.py", line 200, in connect self.connection = self.get_new_connection(conn_params) File "/python-runtime/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/python-runtime/django/db/backends/postgresql/base.py", line 187, in get_new_connection connection = Database.connect(**conn_params) File "/python-runtime/psycopg2/__init__.py", line 127, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError: FATAL: password authentication failed for user "postgres"
How to reproduce
Deploy app version 1.41.3 with postgresqlPassword
Upgrade to 1.43.0
Environment
Deployment platform (AWS/Azure/DigitalOcean/GCP/...): Digital Ocean
k8s version (server version from kubectl version): Kubernetes 1.24.4-do.0
Chart version/commit (helm list -n posthog): posthog-30.3.2
Posthog version: 1.43.0
Additional context
We also saw another error while upgrading as below: Error: UPGRADE FAILED: cannot patch "posthog-posthog-kafka" with kind StatefulSet: StatefulSet.apps "posthog-posthog-kafka" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden && cannot patch "posthog-posthog-postgresql" with kind StatefulSet: StatefulSet.apps "posthog-posthog-postgresql" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden
We've tried to rollback to 1.41.3 but posthog-plugins and posthog-worker do not restart. Please help on this. Thanks!
The text was updated successfully, but these errors were encountered:
Bug description
Migration script fail connect to postgres with custom password.
Expected behavior
Migration script should use password set from deployment.
Actual behavior
Error log
psycopg2.OperationalError: FATAL: password authentication failed for user "postgres" The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "/python-runtime/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/python-runtime/django/core/management/__init__.py", line 395, in execute django.setup() File "/python-runtime/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/python-runtime/django/apps/registry.py", line 122, in populate app_config.ready() File "/code/posthog/apps.py", line 52, in ready in_range, version = service_version_requirement.is_service_in_accepted_version() File "/code/posthog/version_requirement.py", line 28, in is_service_in_accepted_version service_version = self.get_service_version() File "/code/posthog/version_requirement.py", line 33, in get_service_version return get_postgres_version() File "/code/posthog/version_requirement.py", line 45, in get_postgres_version with connection.cursor() as cursor: File "/python-runtime/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/python-runtime/django/db/backends/base/base.py", line 259, in cursor return self._cursor() File "/python-runtime/django/db/backends/base/base.py", line 235, in _cursor self.ensure_connection() File "/python-runtime/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/python-runtime/django/db/backends/base/base.py", line 219, in ensure_connection self.connect() File "/python-runtime/django/db/utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/python-runtime/django/db/backends/base/base.py", line 219, in ensure_connection self.connect() File "/python-runtime/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/python-runtime/django/db/backends/base/base.py", line 200, in connect self.connection = self.get_new_connection(conn_params) File "/python-runtime/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File "/python-runtime/django/db/backends/postgresql/base.py", line 187, in get_new_connection connection = Database.connect(**conn_params) File "/python-runtime/psycopg2/__init__.py", line 127, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError: FATAL: password authentication failed for user "postgres"
How to reproduce
Environment
kubectl version
): Kubernetes 1.24.4-do.0helm list -n posthog
): posthog-30.3.2Additional context
We also saw another error while upgrading as below:
Error: UPGRADE FAILED: cannot patch "posthog-posthog-kafka" with kind StatefulSet: StatefulSet.apps "posthog-posthog-kafka" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden && cannot patch "posthog-posthog-postgresql" with kind StatefulSet: StatefulSet.apps "posthog-posthog-postgresql" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden
We've tried to rollback to 1.41.3 but posthog-plugins and posthog-worker do not restart. Please help on this. Thanks!
The text was updated successfully, but these errors were encountered: