From 9cb481718f304d8a44b00176f5255020f8d9c455 Mon Sep 17 00:00:00 2001 From: Lei Feng Date: Sat, 18 Jun 2022 08:41:30 +0800 Subject: [PATCH] EX-5406 lipe: fix some compatibility issue in lpcc - use absolute path of program in lpcc.service - replace yaml.load() with yaml.safe_load() Signed-off-by: Lei Feng Test-Parameters: trivial testlist=sanity-pcc Change-Id: Iad3fa408f5b19e7370c0a5b069ad7637611118a7 Reviewed-on: https://review.whamcloud.com/47678 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Li Xi Reviewed-by: Andreas Dilger --- lipe/lpcc | 2 +- lipe/systemd/lpcc.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lipe/lpcc b/lipe/lpcc index 462efff..bd856b82 100755 --- a/lipe/lpcc +++ b/lipe/lpcc @@ -224,7 +224,7 @@ class LpccService: return result result['status'] = "stopped" - pcclist = yaml.load(output) + pcclist = yaml.safe_load(output) if pcclist is not None and 'pcc' in pcclist: for pcc in pcclist['pcc']: if pcc['pccpath'] == self.lpcc_cache: diff --git a/lipe/systemd/lpcc.service b/lipe/systemd/lpcc.service index 1d7a6c8..f791d45 100644 --- a/lipe/systemd/lpcc.service +++ b/lipe/systemd/lpcc.service @@ -8,7 +8,7 @@ ConditionPathExists=/etc/lpcc.conf [Service] Type=simple -ExecStart=lpcc monitor +ExecStart=/usr/bin/lpcc monitor ExecStop=kill $MAINPID [Install] -- 1.8.3.1