Whamcloud - gitweb
EX-5406 lipe: fix some compatibility issue in lpcc
authorLei Feng <flei@whamcloud.com>
Sat, 18 Jun 2022 00:41:30 +0000 (08:41 +0800)
committerLi Xi <lixi@ddn.com>
Tue, 21 Jun 2022 00:31:56 +0000 (00:31 +0000)
- use absolute path of program in lpcc.service
- replace yaml.load() with yaml.safe_load()

Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial testlist=sanity-pcc
Change-Id: Iad3fa408f5b19e7370c0a5b069ad7637611118a7
Reviewed-on: https://review.whamcloud.com/47678
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lipe/lpcc
lipe/systemd/lpcc.service

index 462efff..bd856b8 100755 (executable)
--- 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:
index 1d7a6c8..f791d45 100644 (file)
@@ -8,7 +8,7 @@ ConditionPathExists=/etc/lpcc.conf
 
 [Service]
 Type=simple
-ExecStart=lpcc monitor
+ExecStart=/usr/bin/lpcc monitor
 ExecStop=kill $MAINPID
 
 [Install]