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

fix setting tuned profile #378

Merged
merged 2 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ private void runAnsibleHostDeployPlaybook() {
}
Cluster hostCluster = clusterDao.get(getClusterId());
boolean isGlusterServiceSupported = hostCluster.supportsGlusterService();
String tunedProfile = isGlusterServiceSupported ? hostCluster.getGlusterTunedProfile() : null;
String tunedProfile = "virtual-host";
if (hostCluster.supportsGlusterService() && StringUtils.isNotBlank(hostCluster.getGlusterTunedProfile())) {
// custom tuned profile is specified for gluster cluster
tunedProfile = hostCluster.getGlusterTunedProfile();
}
String clusterVersion = hostCluster.getCompatibilityVersion().getValue();
AnsibleCommandConfig commandConfig = new AnsibleCommandConfig()
.hosts(vds)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
---
- name: Set profile
set_fact:
profile: >
"{{ 'virtual-host' if (host_deploy_tuned_profile is none and host_deploy_virt_enabled|bool)
else host_deploy_tuned_profile }}"

- name: Get lastest tune package
yum:
name: tuned
Expand All @@ -16,7 +10,7 @@
state: started

- name: Set tune profile
shell: "tuned-adm profile {{ profile }}"
shell: "tuned-adm profile {{ host_deploy_tuned_profile }}"
register: tune_profile_set
tags:
- skip_ansible_lint # E305
Expand Down