Darshan N has uploaded a new change for review.

Change subject: tune: Set tuned profile based on environment variable.
......................................................................

tune: Set tuned profile based on environment variable.

This patch adds a new environment variable under gluster,
which will be used to set the tuned profile when gluster
is enabled. This is done because, different use cases of
gluster node need different tuned profile.

Change-Id: Ib2a6d69f52c4cbbc03cb14c7cb719f43846ef526
Bug-Url: https://bugzilla.redhat.com/1209418
Signed-off-by: ndarshan <dnara...@redhat.com>
---
M ChangeLog
M src/ovirt_host_deploy/constants.py
M src/plugins/ovirt-host-deploy/tune/tuned.py
3 files changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-host-deploy 
refs/changes/99/39599/1

diff --git a/ChangeLog b/ChangeLog
index fd0e451..cc63217 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
 ????-??-?? - Version 1.4.0
 
+ * tune: tuned: set the tuned profile based on environment variable,
+   when gluster is enabled, rhbz#1209418.
 
 2015-01-15 - Version 1.3.1
 
diff --git a/src/ovirt_host_deploy/constants.py 
b/src/ovirt_host_deploy/constants.py
index ce561cc..46570ee 100644
--- a/src/ovirt_host_deploy/constants.py
+++ b/src/ovirt_host_deploy/constants.py
@@ -133,6 +133,7 @@
     ENABLE = 'GLUSTER/enable'
     MONITORING_ENABLE = 'GLUSTER/monitoringEnable'
     MONITORING_SERVER = 'GLUSTER/monitoringServer'
+    TUNED_PROFILE = 'GLUSTER/tunedProfile'
 
 
 @util.export
diff --git a/src/plugins/ovirt-host-deploy/tune/tuned.py 
b/src/plugins/ovirt-host-deploy/tune/tuned.py
index d61195f..bbe6f1e 100644
--- a/src/plugins/ovirt-host-deploy/tune/tuned.py
+++ b/src/plugins/ovirt-host-deploy/tune/tuned.py
@@ -55,6 +55,10 @@
     def _setup(self):
         self.command.detect('tuned-adm')
         self._enabled = True
+        self.environment.setdefault(
+            odeploycons.GlusterEnv.TUNED_PROFILE,
+            None
+        )
 
     @plugin.event(
         stage=plugin.Stages.STAGE_VALIDATION,
@@ -62,7 +66,9 @@
     )
     def _validation(self):
         if self.environment[odeploycons.GlusterEnv.ENABLE]:
-            self._profile = 'rhs-virtualization'
+            self._profile = self.environment[
+                odeploycons.GlusterEnv.TUNED_PROFILE
+            ]
         else:
             self._profile = 'virtual-host'
 


-- 
To view, visit https://gerrit.ovirt.org/39599
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2a6d69f52c4cbbc03cb14c7cb719f43846ef526
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-host-deploy
Gerrit-Branch: master
Gerrit-Owner: Darshan N <dnara...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to