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

orahost: new approach for setting hugepages during setup #232

Merged
merged 1 commit into from
May 27, 2021
Merged
Changes from all 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
20 changes: 20 additions & 0 deletions roles/orahost/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,28 @@
- name: Oracle hugepages
sysctl: name={{ item.name }} value="{{ item.value }}" state=present reload=yes ignoreerrors=yes
with_items: "{{oracle_hugepages}}"
register: systclcmd
tags: sysctl,hugepages

# There is no safe way to allocate Hugepages in a running system.
# => A reboot should be done after changing the configuration
# => we won't reboot during installation
# Work Arroud:
# => Flush File Cache
# => retry a sysctl -p
- block:
- name: Flush Buffer Cache when hugepages have been changed
command: echo 2 > /proc/sys/vm/drop_caches
tags: sysctl,hugepages

- name: Try sysctl again
sysctl: name={{ item.name }} value="{{ item.value }}" state=present reload=yes
with_items: "{{oracle_hugepages}}"
tags: sysctl,hugepages
when:
- systclcmd is defined
- systclcmd.changed
tags: sysctl,hugepages

- name: Oracle-recommended PAM config
lineinfile: dest=/etc/pam.d/login state=present line="session required pam_limits.so"
Expand Down