Browse Source

Fix devstack plugin

Disable systemd for lagopus process.
This patch also adds some options for devstack and
fixes README how to run devstack.

Change-Id: Icd7457136457987b15bbcb8b08ea77895656355f
Hirofumi Ichihara 1 year ago
parent
commit
6df5472e9f
4 changed files with 60 additions and 6 deletions
  1. 12
    3
      devstack/README.rst
  2. 10
    2
      devstack/lagopus
  3. 35
    0
      devstack/sample-local.conf
  4. 3
    1
      devstack/settings

+ 12
- 3
devstack/README.rst View File

@@ -6,8 +6,17 @@
6 6
 
7 7
 2. Copy the sample local.conf over::
8 8
 
9
-    cp devstack/local.conf.example local.conf
9
+    $ cp devstack/sample-local.conf local.conf
10 10
 
11
-3. Copy the lagopus_agent over::
11
+3. Run stack.sh::
12 12
 
13
-    cp devstack/lagopus_agent %{DEVSTACK_HOME}/lib/neutron_plugins/
13
+    $ ./stack.sh
14
+
15
+4. Edit libvirtd conf and restart::
16
+
17
+    $ sudo vi /etc/libvirt/qemu.conf
18
+    ...
19
+    security_driver = "none"
20
+    ...
21
+    $ sudo service libvirtd stop
22
+    $ sudo service libvirtd start

+ 10
- 2
devstack/lagopus View File

@@ -35,12 +35,20 @@ function generate_dsl {
35 35
 function run_lagopus {
36 36
     echo "run_lagopus"
37 37
     generate_dsl
38
-    _run_under_systemd lagopus "/usr/local/sbin/lagopus -d -C $LAGOPUS_CONF_DIR/$LAGOPUS_CONF -- -c $LAGOPUS_CORE_MASK -n1 --socket-mem $LAGOPUS_SOCKET_MEM --huge-dir $LAGOPUS_HUGEPAGE_MOUNT -- --core-assign balance" "" root
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"
39
+    if [ -n "$LAGOPUS_SOCKET_MEM" ]; then
40
+        command="$command --socket-mem $LAGOPUS_SOCKET_MEM"
41
+    fi
42
+    command="$command --huge-dir $LAGOPUS_HUGEPAGE_MOUNT --"
43
+    if [ "$LAGOPUS_CORE_BALANCE" == "True" ]; then
44
+        command="$command --core-assign balance"
45
+    fi
46
+    eval ${command} &
39 47
 }
40 48
 
41 49
 function stop_lagopus {
42 50
     echo "stop_lagopus"
43
-    sudo systemctl stop devstack@lagopus.service
51
+    sudo pkill -15 -f "lagopus -C $LAGOPUS_CONF_DIR/$LAGOPUS_CONF"
44 52
     sudo rm -f /tmp/sock*
45 53
 }
46 54
 

+ 35
- 0
devstack/sample-local.conf View File

@@ -0,0 +1,35 @@
1
+[[local|localrc]]
2
+HOST_IP=127.0.0.1
3
+MYSQL_PASSWORD=mysql
4
+RABBIT_PASSWORD=rabbitmq
5
+ADMIN_PASSWORD=secret
6
+SERVICE_PASSWORD=secret
7
+SERVICE_TOKEN=tokenAdmin
8
+
9
+LOGFILE=/opt/stack/logs/stack.sh.log
10
+LOGDAYS=1
11
+
12
+NEUTRON_CREATE_INITIAL_NETWORKS=False
13
+ENABLE_ISOLATED_METADATA=True
14
+ENABLE_METADATA_NETWORK=True
15
+
16
+NOVA_VNC_ENABLED=True
17
+VNCSERVER_PROXYCLIENT_ADDRESS=$HOST_IP
18
+VNCSERVER_LISTEN=0.0.0.0
19
+
20
+LAGOPUS_NUM_HUGEPAGES=2560
21
+DPDK_PORT_MAPPINGS=01:00.0#phys1,01:00.1#phys2
22
+LAGOPUS_SOCKET_MEM=1024
23
+LAGOPUS_INSTALL=True
24
+LAGOPUS_RUN=True
25
+
26
+enable_plugin networking-lagopus https://github.com/openstack/networking-lagopus master
27
+
28
+[[post-config|/$Q_PLUGIN_CONF_FILE]]
29
+[ml2]
30
+type_drivers=flat
31
+tenant_network_types=flat
32
+mechanism_drivers=lagopus
33
+
34
+[ml2_type_flat]
35
+flat_networks=phys1,phys2

+ 3
- 1
devstack/settings View File

@@ -27,6 +27,8 @@ LAGOPUS_ALLOCATE_HUGEPAGES=${LAGOPUS_ALLOCATE_HUGEPAGES:-True}
27 27
 LAGOPUS_HUGEPAGE_MOUNT=${LAGOPUS_HUGEPAGE_MOUNT:-/mnt/huge}
28 28
 LAGOPUS_CORE_MASK=${LAGOPUS_CORE_MASK:-3}
29 29
 LAGOPUS_SOCKET_MEM=${LAGOPUS_SOCKET_MEM:-512}
30
+LAGOPUS_CORE_BALANCE=${LAGOPUS_CORE_BALANCE:-False}
31
+LAGOPUS_MEM_CHANNELS=${LAGOPUS_MEM_CHANNELS:-1}
30 32
 
31
-DPDK_PORT_MAPPINGS=${DPDK_PORT_MAPPINGS:-""}
33
+DPDK_PORT_MAPPINGS=${DPDK_PORT_MAPPINGS:-}
32 34
 DPDK_DIR=${DPDK_DIR:-$LAGOPUS_DIR/src/dpdk}

Loading…
Cancel
Save