Skip to content

Commit

Permalink
[BACKPORT 2.18.3][PLAT-10527] Reverting systemd reboot workaround
Browse files Browse the repository at this point in the history
Summary:
Issues were seen after adding systemd reboot workaround to set ulimits on RHEL8 user mode systemd
setups. The reboot would get run unintentionally on YBC upgrades or systemd upgrades and could
potentially cause downtime as all the nodes would go down. This diff reverts all the changes while
we figure out a more correct fix.

Original diff: eaa4e16 / D29103
This reverts commit d2e6e12.
This reverts commit 5cd5e7b.

Test Plan: Run systemd upgrade and YBC install during software upgrade, make sure there is no reboot.

Reviewers: svarshney, amalyshev, vbansal, nbhatia

Reviewed By: nbhatia

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D29170
  • Loading branch information
mchiddy committed Oct 11, 2023
1 parent 8cb6480 commit c2c8416
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions managed/devops/roles/provision-cluster-server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,37 +142,6 @@
become_method: sudo
shell:
cmd: "loginctl enable-linger {{ user_name }}"

- block:
- name: Set ulimits for user scope in system.conf
lineinfile:
dest: /etc/systemd/system.conf
regexp: '^DefaultLimitNOFILE*'
line: 'DefaultLimitNOFILE=1048576'
create: yes
state: present
insertafter: 'EOF'

- name: Set ulimits for user scope in user.conf
lineinfile:
dest: /etc/systemd/user.conf
regexp: '^DefaultLimitNOFILE*'
line: 'DefaultLimitNOFILE=1048576'
create: yes
state: present
insertafter: 'EOF'

- name: Reboot the system for new ulimits
reboot:
pre_reboot_delay: 60
post_reboot_delay: 60
reboot_timeout: 300
register: reboot

- name: Log reboot time
debug:
msg: System took {{ reboot.elapsed }} seconds to reboot
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == '8'
# Do not configure user scope for setting up systemd in centos7/amazonLinux:2.
when: ansible_os_family != 'RedHat' or (ansible_distribution_major_version != '7' and not (ansible_distribution == 'Amazon' and ansible_distribution_major_version == '2'))
- block:
Expand Down Expand Up @@ -242,8 +211,7 @@
line: "#includedir /etc/sudoers.d"
state: present
validate: "/usr/sbin/visudo -cf %s"
when: (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7') or
(ansible_os_family == 'Amazon' and ansible_distribution_major_version == '2')
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7'

- name: setup-postgres-cgroups
include_role:
Expand Down

0 comments on commit c2c8416

Please sign in to comment.