Browse Source

Merge "use systemd for lagopus"

Zuul 1 year ago
parent
commit
44dbe3d1fe
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      devstack/lagopus

+ 4
- 4
devstack/lagopus View File

@@ -35,7 +35,7 @@ function generate_dsl {
35 35
 function run_lagopus {
36 36
     echo "run_lagopus"
37 37
     generate_dsl
38
-    local command="sudo /usr/local/sbin/lagopus -d -C $LAGOPUS_CONF_DIR/$LAGOPUS_CONF -l $LAGOPUS_LOG -- -c$LAGOPUS_CORE_MASK -n$LAGOPUS_MEM_CHANNELS"
38
+    local command="/usr/local/sbin/lagopus -d -C $LAGOPUS_CONF_DIR/$LAGOPUS_CONF -- -c$LAGOPUS_CORE_MASK -n$LAGOPUS_MEM_CHANNELS"
39 39
     if [ -n "$LAGOPUS_SOCKET_MEM" ]; then
40 40
         command="$command --socket-mem $LAGOPUS_SOCKET_MEM"
41 41
     fi
@@ -43,13 +43,13 @@ function run_lagopus {
43 43
     if [ "$LAGOPUS_CORE_BALANCE" == "True" ]; then
44 44
         command="$command --core-assign balance"
45 45
     fi
46
-    eval ${command} &
46
+    _run_under_systemd lagopus "$command" "" root
47 47
 }
48 48
 
49 49
 function stop_lagopus {
50 50
     echo "stop_lagopus"
51
-    sudo pkill -15 -f "lagopus -C $LAGOPUS_CONF_DIR/$LAGOPUS_CONF"
52
-    sudo rm -f /tmp/sock*
51
+    sudo systemctl stop devstack@lagopus.service
52
+    sudo systemctl disable devstack@lagopus.service
53 53
 }
54 54
 
55 55
 function free_hugepages(){

Loading…
Cancel
Save