1
0
Fork 0

scsi_host: fixed probing of ALPM, missing ALPM logged as info

Resolves: rhbz#1416712

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2017-03-06 10:46:02 +01:00
parent 64decfe756
commit 6350862bbd
No known key found for this signature in database
GPG key ID: D8E1C00E076E840B

View file

@ -9,7 +9,7 @@ import re
log = tuned.logs.get()
class DiskPlugin(hotplug.Plugin):
class SCSIHostPlugin(hotplug.Plugin):
"""
Plugin for tuning options of SCSI hosts.
"""
@ -76,12 +76,12 @@ class DiskPlugin(hotplug.Plugin):
if os.path.exists(policy_file):
self._cmd.write_to_file(policy_file, policy)
else:
log.warn("ALPM control file ('%s') not found, skipping ALPM setting for '%s'" % (policy_file, str(device)))
log.info("ALPM control file ('%s') not found, skipping ALPM setting for '%s'" % (policy_file, str(device)))
return None
return policy
@command_get("alpm")
def _get_alpm(self, device):
policy_file = self._get_alpm_policy_file(device)
policy = self._cmd.read_file(policy_file).strip()
policy = self._cmd.read_file(policy_file, no_error = True).strip()
return policy if policy != "" else None