Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM Upgrades doesn't work with external postgresql db for grafana #2918

Open
1 task done
GenLN opened this issue Mar 21, 2024 · 0 comments · May be fixed by #2929
Open
1 task done

PMM Upgrades doesn't work with external postgresql db for grafana #2918

GenLN opened this issue Mar 21, 2024 · 0 comments · May be fixed by #2929
Assignees
Labels
bug Bug report

Comments

@GenLN
Copy link

GenLN commented Mar 21, 2024

Description

Trying pmm upgrade with helm chart (helm upgrade doesn't works, so I need to run uninstall/install helm chart)
pmm-upgrade fail
TASK [initialization : Change default admin id] ******************************** fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database: connection to server on socket \"/var/run/postgresql/.s.PGSQL.5432\" failed: FATAL: database \"grafana\" does not exist\n"}

Where does this task have defined or use this config for postgresql? How to change it?

Expected Results

Upgrade done

Actual Results

Failed/stuck/no revert to previous version

Version

PMM Server 2.41.0 -> 2.41.1

Steps to reproduce

define grafana external postgres db using pmmEnv in values file:

GF_DATABASE_HOST:
GF_DATABASE_NAME:
GF_DATABASE_TYPE:
GF_DATABASE_USER:
GF_DATABASE_PASSWORD:

Relevant logs

TASK [dashboards_upgrade : Copy plugins to the plugin directory] ***************
changed: [localhost]

TASK [dashboards_upgrade : Set permissions for the plugin directory] ***********
changed: [localhost]

TASK [dashboards_upgrade : Check that the SQLite grafana database exists] ******
ok: [localhost]

TASK [dashboards_upgrade : Restart grafana before deleting data EL7] ***********
skipping: [localhost]

TASK [dashboards_upgrade : Restart grafana before deleting data EL9] ***********
skipping: [localhost]

TASK [dashboards_upgrade : Remove old DBaaS dashboard (Before provisioning times)] ***
skipping: [localhost]

TASK [dashboards_upgrade : Remove old PMM Inventory (Before provisioning times)] ***
skipping: [localhost]

TASK [dashboards_upgrade : Remove old PMM Add Instance dashboard (Before provisioning times)] ***
skipping: [localhost]

TASK [dashboards_upgrade : Remove old PMM Database Checks dashboard (Before provisioning times)] ***
skipping: [localhost]

TASK [dashboards_upgrade : Remove old PMM Settings dashboard (Before provisioning times)] ***
skipping: [localhost]

TASK [dashboards_upgrade : Remove the old clickhouse plugin] *******************
changed: [localhost]

TASK [dashboards_upgrade : Restart grafana with new plugins EL7] ***************
skipping: [localhost]

TASK [dashboards_upgrade : Restart grafana with new plugins EL9] ***************
changed: [localhost]

TASK [initialization : Create backup directory] ********************************
ok: [localhost]

TASK [initialization : Check if Postgres 11 exists] ****************************
ok: [localhost]

TASK [Upgrade Postgres database] ***********************************************
skipping: [localhost]

TASK [initialization : Create grafana database in postgres] ********************
skipping: [localhost]

TASK [initialization : Create grafana user in postgres] ************************
skipping: [localhost]

TASK [initialization : Upgrade grafana database (Get the latest schema)] *******
skipping: [localhost]

TASK [initialization : Create working directory for Alertmanager] **************
ok: [localhost]

TASK [initialization : Create working directory for VictoriaMetrics] ***********
ok: [localhost]

TASK [initialization : Create empty configuration file for VictoriaMetrics] ****
changed: [localhost]

TASK [initialization : Check that the SQLite grafana database exists] **********
ok: [localhost]

TASK [initialization : Remove database options (SQLite is default)] ************
skipping: [localhost]

TASK [initialization : Remove database host] ***********************************
skipping: [localhost]

TASK [initialization : Remove database user] ***********************************
skipping: [localhost]

TASK [initialization : Remove database password] *******************************
skipping: [localhost]

TASK [initialization : Upgrade grafana database (Get the latest schema)] *******
skipping: [localhost]

TASK [initialization : Start grafana again] ************************************
skipping: [localhost]

TASK [initialization : Wait for grafana] ***************************************
skipping: [localhost]

TASK [Migrate Grafana database from SQLite to Postgresql] **********************
skipping: [localhost]

TASK [initialization : Change default admin id] ********************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database: connection to server on socket \"/var/run/postgresql/.s.PGSQL.5432\" failed: FATAL:  database \"grafana\" does not exist\n"}

PLAY RECAP *********************************************************************
localhost                  : ok=27   changed=8    unreachable=0    failed=1    skipped=25   rescued=0    ignored=0   

time="2024-03-21T10:41:22Z" level=fatal msg="RunPlaybook failed: exit status 2"
ProjectName: pmm-update
Version: 2.41.1
PMMVersion: 2.41.1
Timestamp: 2024-01-29 13:32:29 (UTC)
FullCommit: f4004eac5c03e97327ae235dbf40f91e31ba2208

Code of Conduct

  • I agree to follow Percona Community Code of Conduct
@GenLN GenLN added the bug Bug report label Mar 21, 2024
BupycHuk added a commit that referenced this issue Mar 25, 2024
@BupycHuk BupycHuk linked a pull request Mar 25, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants