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

sap_hana_preconfigure: Enable TSX also for RHEL 9 #797

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 6 additions & 4 deletions roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
when:
- ansible_architecture == 'x86_64'
- ansible_distribution == 'RedHat'
- ansible_distribution_major_version == '8'
- (ansible_distribution_major_version >= '9') or
(ansible_distribution_major_version == '8' and
__sap_hana_preconfigure_fact_ansible_distribution_minor_version | int >= 3)
- __sap_hana_preconfigure_fact_ansible_distribution_minor_version | int >= 3
Copy link
Contributor

@ja9fuchs ja9fuchs Jul 9, 2024

Choose a reason for hiding this comment

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

This last conditional is a leftover and conflicts with the logic of the new line 8.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, thanks for catching this! Will fix it soon.

block:

# There are CPUs which are not capable of enabling the rtm flag, so we just report the status:
- name: Get all CPU flags
ansible.builtin.shell: set -o pipefail && lscpu | grep "^Flags:"
register: __sap_hana_preconfigure_register_lscpu_flags
changed_when: no
changed_when: false

- name: Report that the rtm CPU flag exists
ansible.builtin.debug:
Expand All @@ -30,7 +32,7 @@
- name: TSX - Get contents of GRUB_CMDLINE_LINUX in /etc/default/grub
ansible.builtin.command: grep GRUB_CMDLINE_LINUX /etc/default/grub
register: __sap_hana_preconfigure_register_default_grub_cmdline_tsx_assert
changed_when: no
changed_when: false

- name: Assert that tsx=on is in GRUB_CMDLINE_LINUX in /etc/default/grub
ansible.builtin.assert:
Expand All @@ -57,7 +59,7 @@
- name: TSX - Get contents of /proc/cmdline
ansible.builtin.command: cat /proc/cmdline
register: __sap_hana_preconfigure_register_proc_cmdline_tsx_assert
changed_when: no
changed_when: false

- name: Assert that tsx=on is in /proc/cmdline
ansible.builtin.assert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
when:
- ansible_architecture == 'x86_64'
- ansible_distribution == 'RedHat'
- ansible_distribution_major_version == '8'
- __sap_hana_preconfigure_fact_ansible_distribution_minor_version|int >= 3
- (ansible_distribution_major_version >= '9') or
(ansible_distribution_major_version == '8' and
__sap_hana_preconfigure_fact_ansible_distribution_minor_version | int >= 3)
- not ( __sap_hana_preconfigure_register_proc_cmdline['content'] | b64decode | regex_findall('tsx=on') )
tags: grubconfig
Loading