Skip to content

Commit

Permalink
[PLAT-15328] Configure cgroup for non rhel9 machines as part of provi…
Browse files Browse the repository at this point in the history
…sion

Summary: v1 cGroup implementation requires sudo access (this is used in non rhel9 machines). Given that we have moved the systemd configuration as part of configure phase, this was failing. With this diff we move the cgroup configuration for non rhel 9 machines during provision phase.

Test Plan:
Created rhel8/9 universes on azure with cgroup value configured.
iTest pipeline

Reviewers: dshubin, daniel, sanketh

Reviewed By: dshubin, daniel

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D38166
  • Loading branch information
Vars-07 committed Sep 19, 2024
1 parent 8d228a8 commit 903d793
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@
shell:
cmd: "loginctl enable-linger {{ user_name }}"

- name: Configure | setup-postgres-cgroups
include_role:
name: setup-cgroup

- name: Configure | Setup OpenTelemetry Collector
include_role:
name: manage_otel_collector
Expand Down Expand Up @@ -297,6 +293,11 @@
when: (systemd_option and not ((ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7')
or (ansible_distribution == 'Amazon' and ansible_distribution_major_version == '2')))

- name: Configure | setup-postgres-cgroups
include_role:
name: setup-cgroup
when: systemd_option and ansible_distribution_major_version >= "9"

- block:
# Remove old cron jobs that clean cores, purge logs and collect metrics
- name: Remove old cron job that cleans cores (for upgrades)
Expand Down
3 changes: 2 additions & 1 deletion managed/devops/roles/provision-cluster-server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@
- name: setup-postgres-cgroups
include_role:
name: setup-cgroup
when: not systemd_option
when: not systemd_option or (ansible_os_family == 'RedHat' and
ansible_distribution_major_version < "9")

- name: Grant traverse permission on yb_home directory
file:
Expand Down

0 comments on commit 903d793

Please sign in to comment.