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-13553 Revert the upgrade of kong #3319

Merged
merged 6 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions build/ansible/roles/dashboards/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
- name: Stop and remove Grafana from Supervisor
shell: "supervisorctl {{ item }} grafana"
- name: Stop Grafana
community.general.supervisorctl:
name: grafana
state: stopped
become: true
become_user: pmm
become_method: su
loop:
- stop
- remove

- name: Retrieve Percona plugins
find:
Expand Down Expand Up @@ -42,12 +41,12 @@
owner: pmm
group: pmm
mode: 0644
remote_src: yes
remote_src: yes

- name: Restart Grafana service with new plugins
shell: "supervisorctl {{ item }} grafana"
- name: Start Grafana
community.general.supervisorctl:
name: grafana
state: started
become: true
become_user: pmm
become_method: su
loop:
- add
9 changes: 8 additions & 1 deletion build/ansible/roles/pmm-images/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@
option: autostart
value: "false"

- name: Disable grafana
ini_file:
path: /etc/supervisord.d/grafana.ini
section: program:grafana
option: autostart
value: "false"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's enable it after initialization

Copy link
Member Author

@ademidoff ademidoff Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems to be redundant, since pmm-managed generates grafana.ini anyway. Therefore, it will get enabled before we know it. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will slowdown first initialization and we will loose time that we win by running initialization during build time

Copy link
Member Author

@ademidoff ademidoff Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, the block above is not even necessary given the current initial grafana.ini config.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moreover, setting autostart:true does not do anything on its own - the service will not restart without supervisord, which either needs to restart or to reread the config.


# During build time, this will be the first start of supervisord.
- name: Start supervisord
shell: supervisord -c /etc/supervisord.conf &
Expand All @@ -166,7 +173,7 @@

- name: Run initialization playbook
include_role:
name: initialization
name: initialization

- name: Check supervisord logs
shell: sleep 10 && tail -n 200 /srv/logs/supervisord.log
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/ClickHouse/clickhouse-go/v2 v2.30.0
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/alecthomas/kingpin/v2 v2.4.0
github.com/alecthomas/kong v1.4.0
github.com/alecthomas/kong v1.3.0
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9
github.com/aws/aws-sdk-go v1.55.5
github.com/blang/semver v3.5.1+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBK
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/kong v1.4.0 h1:UL7tzGMnnY0YRMMvJyITIRX1EpO6RbBRZDNcCevy3HA=
github.com/alecthomas/kong v1.4.0/go.mod h1:p2vqieVMeTAnaC83txKtXe8FLke2X07aruPWXyMPQrU=
github.com/alecthomas/kong v1.3.0 h1:YJKuU6/TV2XOBtymafSeuzDvLAFR8cYMZiXVNLhAO6g=
github.com/alecthomas/kong v1.3.0/go.mod h1:IDc8HyiouDdpdiEiY81iaEJM8rSIW6LzX8On4FCO0bE=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
Expand Down
Loading