Comment 17 for bug 1829403

Revision history for this message
ChenjieXu (midone) wrote : Re: compute node keeps offline after unlock due to vswitch error

Hi Peng,
According to your response, the hugepages can be allocated manually but ovs-vswitch still failed to start. The following line in the log "ovs-vswitchd.log" explains why ovs-vswitch can't start:

2019-05-27T17:23:40.222Z|00012|dpdk|INFO|EAL ARGS: ovs-vswitchd -n 4 -c 7 --huge-dir /mnt/huge-1048576kB --socket-mem 0,0 --socket-limit 0,0.
2019-05-27T17:23:40.223Z|00013|dpdk|INFO|EAL: Detected 88 lcore(s)
2019-05-27T17:23:40.223Z|00014|dpdk|INFO|EAL: Detected 2 NUMA nodes
2019-05-27T17:23:40.223Z|00015|dpdk|ERR|EAL: invalid parameters for --socket-mem

The socket memory has been set to 0 for both numa node. And the value should be 1024,1024. You can set this value by the following commands:
sudo ovs-vsctl --no-wait set Open_vSwitch . "other_config:dpdk-socket-mem="1024,1024"
sudo ovs-vsctl --no-wait set Open_vSwitch . "other_config:dpdk-socket-limit="1024,1024"

Could you please change the socket memory and then restart ovs-vswitchd again?
1. allocate hugepages on each numa node:
   sudo bash
   echo 3 > /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/nr_hugepages
   echo 3 > /sys/devices/system/node/node1/hugepages/hugepages-1048576kB/nr_hugepages
   echo 5000 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
   echo 5000 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
2. make sure hugepages have been allocated by checking nr_hugepages and free_hugepages:
   cat /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/nr_hugepages
   cat /sys/devices/system/node/node1/hugepages/hugepages-1048576kB/nr_hugepages
   cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
   cat /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
   cat /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/free_hugepages
   cat /sys/devices/system/node/node1/hugepages/hugepages-1048576kB/free_hugepages
   cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/free_hugepages
   cat /sys/devices/system/node/node1/hugepages/hugepages-2048kB/free_hugepages
3. Make sure ovsdb-server is running
   systemctl status ovsdb-server
4. change the socket memory from 0 to 1024MB for 2 numa nodes
   sudo ovs-vsctl --no-wait set Open_vSwitch . "other_config:dpdk-socket-mem="1024,1024"
   sudo ovs-vsctl --no-wait set Open_vSwitch . "other_config:dpdk-socket-limit="1024,1024"
5. restart ovs-vswitchd
   systemctl status ovs-vswitchd
   sudo systemctl restart ovs-vswitchd
   systemctl status ovs-vswitchd